@@ -164,24 +164,6 @@ impl From<CAChannelLabel> for mixer::Channel {
164164 }
165165}
166166
167- fn set_notification_runloop ( ) {
168- let address = AudioObjectPropertyAddress {
169- mSelector : kAudioHardwarePropertyRunLoop,
170- mScope : kAudioObjectPropertyScopeGlobal,
171- mElement : kAudioObjectPropertyElementMaster,
172- } ;
173-
174- // Ask HAL to manage its own thread for notification by setting the run_loop to NULL.
175- // Otherwise HAL may use main thread to fire notifications.
176- let run_loop: CFRunLoopRef = ptr:: null_mut ( ) ;
177- let size = mem:: size_of :: < CFRunLoopRef > ( ) ;
178- let status =
179- audio_object_set_property_data ( kAudioObjectSystemObject, & address, size, & run_loop) ;
180- if status != NO_ERR {
181- cubeb_log ! ( "Could not make global CoreAudio notifications use their own thread." ) ;
182- }
183- }
184-
185167fn clamp_latency ( latency_frames : u32 ) -> u32 {
186168 cmp:: max (
187169 cmp:: min ( latency_frames, SAFE_MAX_LATENCY_FRAMES ) ,
@@ -1955,7 +1937,6 @@ impl AudioUnitContext {
19551937
19561938impl ContextOps for AudioUnitContext {
19571939 fn init ( _context_name : Option < & CStr > ) -> Result < Context > {
1958- set_notification_runloop ( ) ;
19591940 let ctx = Box :: new ( AudioUnitContext :: new ( ) ) ;
19601941 Ok ( unsafe { Context :: from_ptr ( Box :: into_raw ( ctx) as * mut _ ) } )
19611942 }
0 commit comments