#[cfg(not(target_os = "macos"))]
use crate::{arc, cf, cm, os};
#[cfg(not(target_os = "macos"))]
impl cm::Clock {
#[doc(alias = "CMAudioClockCreate")]
#[inline]
pub unsafe fn with_default_audio_output_in(
clock_out: *mut Option<arc::R<Self>>,
allocator: Option<&cf::Allocator>,
) -> os::Result {
unsafe { CMAudioClockCreate(allocator, clock_out).result() }
}
#[inline]
pub fn with_default_audio_output() -> os::Result<arc::R<Self>> {
unsafe { os::result_unchecked(|res| Self::with_default_audio_output_in(res, None)) }
}
}
#[cfg(not(target_os = "macos"))]
#[link(name = "CoreMedia", kind = "framework")]
unsafe extern "C-unwind" {
fn CMAudioClockCreate(
allocator: Option<&cf::Allocator>,
clock_out: *mut Option<arc::R<cm::Clock>>,
) -> os::Status;
}