From 37819472254c6104fecd377e4859e920ea72d286 Mon Sep 17 00:00:00 2001 From: Paul Adenot Date: Tue, 29 Jul 2014 18:45:06 +0200 Subject: [PATCH] Bug 1045018 - Make webrtc.org code use mozilla_set_coreaudio_notification_runloop. r=gcp --- .../webrtc/modules/audio_device/mac/audio_device_mac.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/media/webrtc/trunk/webrtc/modules/audio_device/mac/audio_device_mac.cc b/media/webrtc/trunk/webrtc/modules/audio_device/mac/audio_device_mac.cc index b07c94dd11c..0bd9cb59a0a 100644 --- a/media/webrtc/trunk/webrtc/modules/audio_device/mac/audio_device_mac.cc +++ b/media/webrtc/trunk/webrtc/modules/audio_device/mac/audio_device_mac.cc @@ -23,6 +23,9 @@ #include // mach_task_self() #include // sysctlbyname() +#ifdef MOZILLA_INTERNAL_API +#include +#endif namespace webrtc @@ -384,10 +387,14 @@ int32_t AudioDeviceMac::Init() kAudioHardwarePropertyRunLoop, kAudioObjectPropertyScopeGlobal, kAudioObjectPropertyElementMaster }; +#ifdef MOZILLA_INTERNAL_API + mozilla_set_coreaudio_notification_runloop_if_needed(); +#else CFRunLoopRef runLoop = NULL; UInt32 size = sizeof(CFRunLoopRef); WEBRTC_CA_RETURN_ON_ERR(AudioObjectSetPropertyData(kAudioObjectSystemObject, &propertyAddress, 0, NULL, size, &runLoop)); +#endif // Listen for any device changes. propertyAddress.mSelector = kAudioHardwarePropertyDevices;