int audio_output_open ( void   ) 

Open the sound device for audio output.

Definition at line 55 of file audio_output_ao.c.

00056 {
00057         const char *host;
00058         char *henv, *hend;
00059 
00060         ao_initialize();
00061 
00062         /* We always expect 16 bits native endian PCM */
00063         devfmt.bits = 16;
00064         devfmt.byte_format = AO_FMT_NATIVE;
00065 
00066         host = config_getopt("audio.output.ao.host");
00067         if (strcmp(host, "env_ssh") == 0) {
00068                 /* Fetch "host" option from SSH_CLIENT variable */
00069                 henv = g_strdup(getenv("SSH_CLIENT"));
00070                 if (henv != NULL) {
00071                         /* Remove the trailing port number */
00072                         if ((hend = strchr(henv, ' ')) != NULL)
00073                                 *hend = '\0';
00074                         ao_append_option(&devopt, "host", henv);
00075                         g_free(henv);
00076                 }
00077         } else if (host[0] != '\0') {
00078                 /* Use the value as the hostname */
00079                 ao_append_option(&devopt, "host", host);
00080         }
00081 
00082         return (0);
00083 }

Here is the call 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