Search
lxdream.org :: lxdream/src/drivers/audio_pulse.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/drivers/audio_pulse.c
changeset 736:a02d1475ccfd
prev710:f6eaa3bcfa5b
next1024:c67f2d61ab97
author nkeynes
date Mon Jul 14 07:44:42 2008 +0000 (14 years ago)
permissions -rw-r--r--
last change Re-indent everything consistently
Fix include guards for consistency as well
file annotate diff log raw
1.1 --- a/src/drivers/audio_pulse.c Wed Jun 25 10:42:43 2008 +0000
1.2 +++ b/src/drivers/audio_pulse.c Mon Jul 14 07:44:42 2008 +0000
1.3 @@ -39,18 +39,18 @@
1.4 } else {
1.5 ss.format = PA_SAMPLE_U8;
1.6 }
1.7 -
1.8 +
1.9 if( format & AUDIO_FMT_STEREO ) {
1.10 - ss.channels = 2;
1.11 + ss.channels = 2;
1.12 } else {
1.13 ss.channels = 1;
1.14 }
1.15
1.16 pulse_server = pa_simple_new(NULL, APP_NAME, PA_STREAM_PLAYBACK,
1.17 - NULL, "Audio", &ss, NULL, NULL, NULL);
1.18 + NULL, "Audio", &ss, NULL, NULL, NULL);
1.19 if( pulse_server == NULL ) {
1.20 - ERROR( "Unable to open audio output (pulseaudio)" );
1.21 - return FALSE;
1.22 + ERROR( "Unable to open audio output (pulseaudio)" );
1.23 + return FALSE;
1.24 }
1.25 return TRUE;
1.26 }
1.27 @@ -60,18 +60,18 @@
1.28 if( pulse_server != NULL ) {
1.29 int error;
1.30 pa_simple_write( pulse_server, buffer->data, buffer->length, &error );
1.31 - return TRUE;
1.32 + return TRUE;
1.33 } else {
1.34 - ERROR( "Pulseaudio not initialized" );
1.35 - return FALSE;
1.36 + ERROR( "Pulseaudio not initialized" );
1.37 + return FALSE;
1.38 }
1.39 }
1.40
1.41 gboolean audio_pulse_shutdown()
1.42 {
1.43 - pa_simple_free(pulse_server);
1.44 - pulse_server = NULL;
1.45 - return TRUE;
1.46 + pa_simple_free(pulse_server);
1.47 + pulse_server = NULL;
1.48 + return TRUE;
1.49 }
1.50
1.51 struct audio_driver audio_pulse_driver = {
.