applied Anders Semb Hermansen's patch

This commit is contained in:
Christopher Lansdown
1999-06-27 22:17:37 +00:00
parent 551d49e092
commit 2a4fa6ef11
2 changed files with 9 additions and 8 deletions
+8 -7
View File
@@ -51,7 +51,7 @@ int init_cards()
{
int i,j,k;
int err;
void *handle;
snd_ctl_t *handle;
cards = snd_cards();
card = calloc(cards, sizeof(Card));
@@ -256,12 +256,13 @@ int misc_group_hack(Mixer *mixer, int index)
}
mixer->group[index].element[idx].eid = mixer->group[index].group.pelements[idx];
if((err = snd_mixer_element_build(mixer->handle,
&mixer->group[index].element[idx])) < 0) {
printf("Unable to read element %s! ",
mixer->group[index].group.pelements[idx].name);
printf("Error: %s.\n", snd_strerror(err));
}
if(snd_mixer_element_has_control(&mixer->group[index].element[idx].eid))
if((err = snd_mixer_element_build(mixer->handle,
&mixer->group[index].element[idx])) < 0) {
printf("Unable to read element %s! ",
mixer->group[index].group.pelements[idx].name);
printf("Error: %s.\n", snd_strerror(err));
}
init_element_route(mixer->handle,
&mixer->group[index].routes[idx],
+1 -1
View File
@@ -21,7 +21,7 @@ typedef struct _Group Group;
struct _Mixer
{
int number; /* The number of the mixer device */
void *handle;
snd_mixer_t *handle;
snd_mixer_info_t info; /* The info for the mixer */
int cnum; /* The number of channels present */
int snum; /* The number of mixer switches present */