fix(native): invalid call to set mute behavior (#11764)

the error is only visible when turning build debug mode on
This commit is contained in:
pengx17
2025-04-18 02:03:06 +00:00
parent ec58850aca
commit 04c0fa3de1
@@ -30,11 +30,14 @@ impl CATapDescription {
NSArray::from_retained_slice(&[NSNumber::initWithUnsignedInt(NSNumber::alloc(), process)]);
let obj: *mut AnyObject =
unsafe { msg_send![obj, initStereoMixdownOfProcesses: &*processes_array] };
let obj: *mut AnyObject = unsafe { msg_send![obj, setMuteBehavior: 0 ] };
if obj.is_null() {
return Err(CoreAudioError::InitStereoMixdownOfProcessesFailed);
}
unsafe {
let _: () = msg_send![obj, setMuteBehavior: 0_i64];
}
Ok(Self { inner: obj })
}