]> git.alsa-project.org Git - alsa-utils.git/commitdiff
Changed data type of alsa-lib handles from 'void *' to the specific type for
authorFrank van de Pol <fvdpol@home.nl>
Wed, 2 Jun 1999 00:40:31 +0000 (00:40 +0000)
committerFrank van de Pol <fvdpol@home.nl>
Wed, 2 Jun 1999 00:40:31 +0000 (00:40 +0000)
the handle in use. This should be more type-safe as the compiler will perform
checking on type now.

alsactl/merge.c
alsactl/setup.c
amixer/amixer.c
aplay/aplay.c

index daf2226436b21deeb32b34187e4ffd69466ec3c3..9720455292b7579dcddcb3224f69230aa4fbeb4b 100644 (file)
@@ -364,7 +364,7 @@ int soundcard_setup_merge_data(int cardno)
        return 0;
 }
 
-static int soundcard_open_ctl(void **ctlhandle, struct soundcard *soundcard)
+static int soundcard_open_ctl(snd_ctl_t **ctlhandle, struct soundcard *soundcard)
 {
        int err;
 
@@ -377,7 +377,7 @@ static int soundcard_open_ctl(void **ctlhandle, struct soundcard *soundcard)
        return 0;
 }
 
-static int soundcard_open_mix(void **mixhandle, struct soundcard *soundcard, struct mixer *mixer)
+static int soundcard_open_mix(snd_mixer_t **mixhandle, struct soundcard *soundcard, struct mixer *mixer)
 {
        int err;
 
@@ -393,7 +393,7 @@ static int soundcard_open_mix(void **mixhandle, struct soundcard *soundcard, str
 int soundcard_setup_process_switches(int cardno)
 {
        int err;
-       void *ctlhandle = NULL;
+       snd_ctl_t *ctlhandle = NULL;
        struct soundcard *soundcard;
        struct ctl_switch *ctlsw;
        struct mixer *mixer;
@@ -461,8 +461,8 @@ int soundcard_setup_process_switches(int cardno)
 int soundcard_setup_process_data(int cardno)
 {
        int err;
-       void *ctlhandle = NULL;
-       void *mixhandle = NULL;
+       snd_ctl_t *ctlhandle = NULL;
+       snd_mixer_t *mixhandle = NULL;
        struct soundcard *soundcard;
        struct mixer *mixer;
        struct mixer_element *element;
index d59e500665d971e51b3a89d476d5d51b9fcd0d52..e0b7da9ef1f1be0daba1ef1cb7d2772701b40c00 100644 (file)
@@ -325,7 +325,8 @@ static int determine_switches(void *handle, struct ctl_switch **csw, int interfa
 
 static int soundcard_setup_collect_switches1(int cardno)
 {
-       void *handle, *mhandle;
+       snd_ctl_t *handle;
+       snd_mixer_t *mhandle;
        struct soundcard *card, *first, *prev;
        int err, device;
        struct mixer *mixer, *mixerprev;
@@ -495,7 +496,8 @@ int soundcard_setup_collect_switches(int cardno)
 
 static int soundcard_setup_collect_data1(int cardno)
 {
-       void *handle, *mhandle;
+       snd_ctl_t *handle; 
+       snd_mixer_t *mhandle;
        struct soundcard *card;
        int err, idx;
        struct mixer *mixer;
index c2983f45994c7ba38d48bdb1a6be08f5454786e7..4b0e6eb864bc5cff74371b3770f40a64fce987a5 100644 (file)
@@ -101,7 +101,7 @@ static void help(void)
 int info(void)
 {
        int err;
-       void *handle;
+       snd_mixer_t *handle;
        snd_mixer_info_t info;
        
        if ((err = snd_mixer_open(&handle, card, device)) < 0) {
@@ -645,7 +645,7 @@ int show_element_contents(void *handle, snd_mixer_eid_t *eid, const char *space)
 int elements(void)
 {
        int err, idx;
-       void *handle;
+       snd_mixer_t *handle;
        snd_mixer_elements_t elements;
        snd_mixer_eid_t *element;
        
@@ -683,7 +683,7 @@ int elements(void)
 int elements_contents(void)
 {
        int err, idx;
-       void *handle;
+       snd_mixer_t *handle;
        snd_mixer_elements_t elements;
        snd_mixer_eid_t *element;
        
@@ -761,7 +761,7 @@ int show_group(void *handle, snd_mixer_gid_t *gid, const char *space)
 int groups(void)
 {
        int err, idx;
-       void *handle;
+       snd_mixer_t *handle;
        snd_mixer_groups_t groups;
        snd_mixer_gid_t *group;
        
@@ -1091,7 +1091,7 @@ int eset_mux1(int argc, char *argv[], void *handle, snd_mixer_eid_t *eid)
 int eset(int argc, char *argv[])
 {
        int err;
-       void *handle;
+       snd_mixer_t *handle;
        snd_mixer_eid_t eid;
 
        if (argc < 1) {
@@ -1147,7 +1147,7 @@ int eset(int argc, char *argv[])
 int eget(int argc, char *argv[])
 {
        int err;
-       void *handle;
+       snd_mixer_t *handle;
        snd_mixer_eid_t eid;
 
        if (argc < 1) {
index a74288f63a6ad60d07cbc8805b09a145791969fa..2e2db9437a26c56b6152a4016c5316902b3e098e 100644 (file)
@@ -51,7 +51,7 @@
 /* global data */
 
 char *command;
-void *pcm_handle;
+snd_pcm_t *pcm_handle;
 struct snd_pcm_playback_info pinfo;
 struct snd_pcm_record_info rinfo;
 snd_pcm_format_t rformat, format;
@@ -160,7 +160,7 @@ static void usage(char *command)
 
 static void device_list(void)
 {
-       void *handle;
+       snd_ctl_t *handle;
        int card, err, dev, idx;
        unsigned int mask;
        struct snd_ctl_hw_info info;