aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/cubeb_osx_run_loop.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/cubeb_osx_run_loop.cpp')
-rw-r--r--src/cubeb_osx_run_loop.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/cubeb_osx_run_loop.cpp b/src/cubeb_osx_run_loop.cpp
index de4e439..5828db6 100644
--- a/src/cubeb_osx_run_loop.cpp
+++ b/src/cubeb_osx_run_loop.cpp
@@ -5,31 +5,29 @@
* accompanying file LICENSE for details.
*/
-#include <cubeb/cubeb.h>
#include "cubeb_osx_run_loop.h"
#include "cubeb_log.h"
#include <AudioUnit/AudioUnit.h>
#include <CoreAudio/AudioHardware.h>
#include <CoreAudio/HostTime.h>
#include <CoreFoundation/CoreFoundation.h>
+#include <cubeb/cubeb.h>
-void cubeb_set_coreaudio_notification_runloop()
+void
+cubeb_set_coreaudio_notification_runloop()
{
/* This is needed so that AudioUnit listeners get called on this thread, and
* not the main thread. If we don't do that, they are not called, or a crash
* occur, depending on the OSX version. */
AudioObjectPropertyAddress runloop_address = {
- kAudioHardwarePropertyRunLoop,
- kAudioObjectPropertyScopeGlobal,
- kAudioObjectPropertyElementMaster
- };
+ kAudioHardwarePropertyRunLoop, kAudioObjectPropertyScopeGlobal,
+ kAudioObjectPropertyElementMaster};
CFRunLoopRef run_loop = nullptr;
OSStatus r;
- r = AudioObjectSetPropertyData(kAudioObjectSystemObject,
- &runloop_address,
- 0, NULL, sizeof(CFRunLoopRef), &run_loop);
+ r = AudioObjectSetPropertyData(kAudioObjectSystemObject, &runloop_address, 0,
+ NULL, sizeof(CFRunLoopRef), &run_loop);
if (r != noErr) {
LOG("Could not make global CoreAudio notifications use their own thread.");
}