filename | src/drivers/audio_alsa.c |
changeset | 1073:92dfe34665ed |
prev | 1024:c67f2d61ab97 |
author | nkeynes |
date | Tue Feb 28 18:22:52 2012 +1000 (12 years ago) |
permissions | -rw-r--r-- |
last change | Add a GL-only video driver for android usage (since the Java code is responsible for creating the context) |
file | annotate | diff | log | raw |
1.1 --- a/src/drivers/audio_alsa.c Sat Jun 13 00:50:48 2009 +00001.2 +++ b/src/drivers/audio_alsa.c Tue Feb 28 18:22:52 2012 +10001.3 @@ -31,10 +31,10 @@1.4 static int frame_bytes;1.7 -static struct lxdream_config_entry alsa_config[] = {1.8 - {"device", N_("Audio output device"), CONFIG_TYPE_FILE, "default"},1.9 - {NULL, CONFIG_TYPE_NONE}1.10 -};1.11 +static struct lxdream_config_group alsa_config = {1.12 + "alsa", NULL, NULL, NULL,1.13 + {{"device", N_("Audio output device"), CONFIG_TYPE_FILE, "default"},1.14 + {NULL, CONFIG_TYPE_NONE}} };1.17 static gboolean audio_alsa_init( )1.18 @@ -50,13 +50,13 @@1.21 // Open the device we were told to open.1.22 - err = snd_pcm_open( &_soundDevice, alsa_config[0].value,1.23 + err = snd_pcm_open( &_soundDevice, alsa_config.params[0].value,1.24 SND_PCM_STREAM_PLAYBACK, 0 );1.26 // Check for error on open.1.27 if ( err < 0 ) {1.28 ERROR( "Init: cannot open audio device %s (%s)\n",1.29 - alsa_config[0].value, snd_strerror( err ) );1.30 + alsa_config.params[0].value, snd_strerror( err ) );1.31 return FALSE;1.32 } else {1.33 DEBUG( "Audio device opened successfully." );1.34 @@ -197,7 +197,7 @@1.36 static gboolean audio_alsa_static_init( void )1.37 {1.38 - lxdream_register_config_group( "alsa", alsa_config );1.39 + lxdream_register_config_group( "alsa", &alsa_config );1.40 audio_register_driver( &audio_alsa_driver );1.41 return TRUE;1.42 }
.