Search
lxdream.org :: lxdream/src/drivers/audio_alsa.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/drivers/audio_alsa.c
changeset 1024:c67f2d61ab97
prev1021:848db285a184
next1073:92dfe34665ed
author nkeynes
date Sat Jun 13 00:50:48 2009 +0000 (13 years ago)
permissions -rw-r--r--
last change Build drivers with library dependencies as shared objects (ie plugins)
file annotate diff log raw
1.1 --- a/src/drivers/audio_alsa.c Wed Jun 03 11:37:10 2009 +0000
1.2 +++ b/src/drivers/audio_alsa.c Sat Jun 13 00:50:48 2009 +0000
1.3 @@ -31,13 +31,13 @@
1.4 static int frame_bytes;
1.5
1.6
1.7 -struct lxdream_config_entry alsa_config[] = {
1.8 +static struct lxdream_config_entry alsa_config[] = {
1.9 {"device", N_("Audio output device"), CONFIG_TYPE_FILE, "default"},
1.10 {NULL, CONFIG_TYPE_NONE}
1.11 };
1.12
1.13
1.14 -gboolean audio_alsa_init( )
1.15 +static gboolean audio_alsa_init( )
1.16 {
1.17 int err;
1.18 snd_pcm_hw_params_t *hw_params;
1.19 @@ -156,7 +156,7 @@
1.20 return TRUE;
1.21 }
1.22
1.23 -gboolean audio_alsa_process_buffer( audio_buffer_t buffer )
1.24 +static gboolean audio_alsa_process_buffer( audio_buffer_t buffer )
1.25 {
1.26 int err;
1.27 int length;
1.28 @@ -175,16 +175,17 @@
1.29 }
1.30
1.31
1.32 -gboolean audio_alsa_shutdown( )
1.33 +static gboolean audio_alsa_shutdown( )
1.34 {
1.35 return TRUE;
1.36 }
1.37
1.38
1.39
1.40 -struct audio_driver audio_alsa_driver = {
1.41 +static struct audio_driver audio_alsa_driver = {
1.42 "alsa",
1.43 N_("Linux ALSA system driver"),
1.44 + 40,
1.45 DEFAULT_SAMPLE_RATE,
1.46 DEFAULT_SAMPLE_FORMAT,
1.47 audio_alsa_init,
1.48 @@ -193,3 +194,12 @@
1.49 NULL,
1.50 audio_alsa_shutdown
1.51 };
1.52 +
1.53 +static gboolean audio_alsa_static_init( void )
1.54 +{
1.55 + lxdream_register_config_group( "alsa", alsa_config );
1.56 + audio_register_driver( &audio_alsa_driver );
1.57 + return TRUE;
1.58 +}
1.59 +
1.60 +DEFINE_PLUGIN( PLUGIN_AUDIO_DRIVER, "alsa", audio_alsa_static_init );
.