static void audio_output_volume_open ( void   )  [static]

Open the ALSA mixer device, making it possible to adjust the volume.

Definition at line 109 of file audio_output_alsa.c.

00110 {
00111         snd_mixer_selem_id_t *mixer;
00112 
00113         /* Open mixer device */
00114         if (snd_mixer_open(&mixhnd, 0) != 0)
00115                 return;
00116         if (snd_mixer_attach(mixhnd,
00117             config_getopt("audio.output.alsa.device")) != 0)
00118                 goto bad;
00119         if (snd_mixer_selem_register(mixhnd, NULL, NULL) < 0)
00120                 goto bad;
00121         if (snd_mixer_load(mixhnd) < 0)
00122                 goto bad;
00123 
00124         /* Obtain mixer element */
00125         snd_mixer_selem_id_alloca(&mixer);
00126         snd_mixer_selem_id_set_name(mixer, config_getopt("audio.output.alsa.mixer"));
00127 
00128         elem = snd_mixer_find_selem(mixhnd, mixer);
00129         if (elem != NULL)
00130                 return;
00131 bad:
00132         snd_mixer_close(mixhnd);
00133         mixhnd = NULL;
00134 }

Here is the call graph for this function:

Here is the caller graph for this function:

 All Data Structures Files Functions Variables Defines
Generated on Mon Mar 15 04:45:05 2010 for herrie by  doxygen 1.6.3