Search
lxdream.org :: lxdream/src/drivers/audio_osx.m :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/drivers/audio_osx.m
changeset 1024:c67f2d61ab97
prev964:f2f3c7612d06
author nkeynes
date Sat Feb 25 21:30:49 2012 +1000 (12 years ago)
permissions -rw-r--r--
last change Android support WIP
file annotate diff log raw
1.1 --- a/src/drivers/audio_osx.m Thu Jan 15 04:15:11 2009 +0000
1.2 +++ b/src/drivers/audio_osx.m Sat Feb 25 21:30:49 2012 +1000
1.3 @@ -27,7 +27,7 @@
1.4 static volatile audio_buffer_t output_buffer = NULL;
1.5 static uint32_t buffer_size;
1.6
1.7 -OSStatus audio_osx_callback( AudioDeviceID inDevice,
1.8 +static OSStatus audio_osx_callback( AudioDeviceID inDevice,
1.9 const AudioTimeStamp *inNow,
1.10 const AudioBufferList *inInputData,
1.11 const AudioTimeStamp *inInputTime,
1.12 @@ -101,22 +101,23 @@
1.13 return FALSE;
1.14 }
1.15
1.16 -void audio_osx_start()
1.17 +static void audio_osx_start()
1.18 {
1.19 if( output_buffer != NULL ) {
1.20 AudioDeviceStart(output_device, audio_osx_callback);
1.21 }
1.22 }
1.23
1.24 -void audio_osx_stop()
1.25 +static void audio_osx_stop()
1.26 {
1.27 AudioDeviceStop( output_device, audio_osx_callback );
1.28 }
1.29
1.30
1.31 -struct audio_driver audio_osx_driver = {
1.32 +static struct audio_driver audio_osx_driver = {
1.33 "osx",
1.34 N_("OS X CoreAudio system driver"),
1.35 + 1, // Preferred on OS X
1.36 DEFAULT_SAMPLE_RATE,
1.37 AUDIO_FMT_FLOATST,
1.38 audio_osx_init,
1.39 @@ -125,3 +126,4 @@
1.40 audio_osx_stop,
1.41 audio_osx_shutdown};
1.42
1.43 +AUDIO_DRIVER( "osx", audio_osx_driver );
.