We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8247ec7 commit 51c8a88Copy full SHA for 51c8a88
src/backend/mod.rs
@@ -1955,7 +1955,15 @@ impl AudioUnitContext {
1955
1956
impl ContextOps for AudioUnitContext {
1957
fn init(_context_name: Option<&CStr>) -> Result<Context> {
1958
- set_notification_runloop();
+ // set_notification_runloop (kAudioHardwarePropertyRunLoop) doesn't work since 10.7.
1959
+ if let Ok(v) = os_version() {
1960
+ if let Ok(v) = v.parse::<f32>() {
1961
+ const MAC_OS_LION: f32 = 10.7;
1962
+ if v < MAC_OS_LION {
1963
+ set_notification_runloop();
1964
+ }
1965
1966
1967
let ctx = Box::new(AudioUnitContext::new());
1968
Ok(unsafe { Context::from_ptr(Box::into_raw(ctx) as *mut _) })
1969
}
0 commit comments