moonbit-community/moon_cpal/macos does not have a README file

    DeviceId

    type DeviceId = UInt

    CoreAudio device discovery (macOS, native backend only).

    This is intentionally a small, testable slice: device enumeration and names.

    CoreAudioError

    pub suberror CoreAudioError {
    CoreAudioError(String, Int)
    DeviceNotAvailable(String, Int)
    }

    Device

    pub struct Device {
    id : UInt
    } derive(Eq,
    Debug
    )

    impl Show for Device

    Device::equal

    fn Device::equal(Device, Device) -> Bool

    Device::name

    fn Device::name(self : Device) -> String raise CoreAudioError

    Device::not_equal

    fn Device::not_equal(x : Device, y : Device) -> Bool

    Device::output

    fn Device::output(self : Device, logger : &Logger) -> Unit

    Device::supported_input_configs

    Device::supported_output_configs

    Device::supports_input

    fn Device::supports_input(self : Device) -> Bool

    Device::supports_output

    fn Device::supports_output(self : Device) -> Bool

    Device::to_repr

    Device::to_string

    fn Device::to_string(self : Device) -> String

    Host

    pub struct Host {
    _unit : Unit
    } derive(Eq,
    Debug
    )

    CPAL-like host/device surface for macOS (CoreAudio).

    Includes device enumeration, config queries and native stream I/O (AudioQueue) with MoonBit callback bridging.
    impl Show for Host

    Host::default_input_device

    fn Host::default_input_device(_self : Host) -> Device?

    Host::default_output_device

    fn Host::default_output_device(_self : Host) -> Device?

    Host::devices

    fn Host::devices(_self : Host) -> Array[Device] raise CoreAudioError

    Host::equal

    fn Host::equal(Host, Host) -> Bool

    Host::not_equal

    fn Host::not_equal(x : Host, y : Host) -> Bool

    Host::output

    fn Host::output(self : Host, logger : &Logger) -> Unit

    Host::to_repr

    Host::to_string

    fn Host::to_string(self : Host) -> String

    Stream

    pub struct Stream {
    kind : StreamKind
    handle : UInt64
    owner : StreamOwner
    }

    impl Eq for Stream
    impl Show for Stream

    Stream::close

    fn Stream::close(self : Stream) -> Unit

    Stream::equal

    fn Stream::equal(self : Stream, other : Stream) -> Bool

    Stream::not_equal

    fn Stream::not_equal(x : Stream, y : Stream) -> Bool

    Stream::output

    fn Stream::output(self : Stream, logger : &Logger) -> Unit

    Stream::to_repr

    Stream::to_string

    fn Stream::to_string(self : Stream) -> String

    StreamKind

    pub enum StreamKind {
    Output
    Input
    } derive(Eq,
    Debug
    )

    impl Show for StreamKind

    StreamKind::equal

    fn StreamKind::equal(StreamKind, StreamKind) -> Bool

    StreamKind::not_equal

    fn StreamKind::not_equal(x : StreamKind, y : StreamKind) -> Bool

    StreamKind::output

    fn StreamKind::output(self : StreamKind, logger : &Logger) -> Unit

    StreamKind::to_string

    fn StreamKind::to_string(self : StreamKind) -> String

    StreamOwner

    type StreamOwner

    default_host

    fn default_host() -> Host

    default_input_device_id

    fn default_input_device_id() -> UInt?

    default_output_device_id

    fn default_output_device_id() -> UInt?

    device_ids

    fn device_ids() -> Array[UInt] raise CoreAudioError

    device_interface_type_tag

    fn device_interface_type_tag(device_id : UInt) -> Int

    device_is_aggregate

    fn device_is_aggregate(device_id : UInt) -> Bool

    device_manufacturer

    fn device_manufacturer(device_id : UInt) -> String?

    device_name

    fn device_name(device_id : UInt) -> String raise CoreAudioError

    device_transport_type_u32

    fn device_transport_type_u32(device_id : UInt) -> UInt

    device_uid

    fn device_uid(device_id : UInt) -> String?

    supported_configs_error_from_osstatus

    fn supported_configs_error_from_osstatus(op : String, status : Int) ->
    SupportedStreamConfigsError

    Map CoreAudio OSStatus into a cross-platform SupportedStreamConfigsError.

    This mirrors CPAL's intent: classify only the small set of errors that have stable meaning across backends, and fall back to a backend-specific error for the rest.

    supported_input_configs

    supported_output_configs