Update of /cvsroot/alsa/alsa-lib/src/control
In directory sc8-pr-cvs1:/tmp/cvs-serv5084/src/control
Modified Files:
hcontrol.c
Log Message:
Added snd_hctl_open_ctl() function.
alisp massive extensions and tested ALSA function bindings.
Index: hcontrol.c
===================================================================
RCS file: /cvsroot/alsa/alsa-lib/src/control/hcontrol.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- hcontrol.c 12 Mar 2002 20:14:33 -0000 1.29
+++ hcontrol.c 27 Jul 2003 20:20:26 -0000 1.30
@@ -69,18 +69,32 @@
*/
int snd_hctl_open(snd_hctl_t **hctlp, const char *name, int mode)
{
- snd_hctl_t *hctl;
snd_ctl_t *ctl;
int err;
- assert(hctlp);
- *hctlp = NULL;
if ((err = snd_ctl_open(&ctl, name, mode)) < 0)
return err;
- if ((hctl = (snd_hctl_t *)calloc(1, sizeof(snd_hctl_t))) == NULL) {
+ err = snd_hctl_open_ctl(hctlp, ctl);
+ if (err < 0)
snd_ctl_close(ctl);
+ return err;
+}
+
+/**
+ * \brief Opens an HCTL
+ * \param hctlp Returned HCTL handle
+ * \param ctl underlying CTL handle
+ * \return 0 on success otherwise a negative error code
+ */
+int snd_hctl_open_ctl(snd_hctl_t **hctlp, snd_ctl_t *ctl)
+{
+ snd_hctl_t *hctl;
+ int err;
+
+ assert(hctlp);
+ *hctlp = NULL;
+ if ((hctl = (snd_hctl_t *)calloc(1, sizeof(snd_hctl_t))) == NULL)
return -ENOMEM;
- }
INIT_LIST_HEAD(&hctl->elems);
hctl->ctl = ctl;
*hctlp = hctl;
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog