Sign in

    Milky2018/moon_cpal/core does not have a README file

    ChannelCount

    type ChannelCount = Int

    FrameCount

    type FrameCount = Int

    SampleRate

    type SampleRate = Int

    FromSample

    pub trait FromSample : Sample {
    fn from_sample(Float) -> Self
    }

    impl FromSample for Byte
    impl FromSample for Int16
    impl FromSample for Float

    Sample

    pub trait Sample {
    fn equilibrium() -> Self
    fn to_f32(Self) -> Float
    fn from_f32(Float) -> Self
    }

    impl Sample for Byte
    impl Sample for Int16
    impl Sample for UInt16
    impl Sample for Float
    impl Sample for Double

    SizedSample

    pub trait SizedSample : Sample {
    fn format(Self) -> SampleFormat
    }

    impl SizedSample for Byte

    BuildStreamError

    pub suberror BuildStreamError {
    DeviceNotAvailable
    DeviceBusy
    StreamConfigNotSupported
    InvalidArgument
    StreamIdOverflow
    BackendSpecific(BackendSpecificError)
    } derive(Eq,
    Debug
    )

    Error that can happen when creating a stream.

    BuildStreamError::to_string

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

    DefaultStreamConfigError

    pub suberror DefaultStreamConfigError {
    DeviceNotAvailable
    DeviceBusy
    StreamTypeNotSupported
    BackendSpecific(BackendSpecificError)
    } derive(Eq,
    Debug
    )

    May occur when attempting to request the default input or output stream config from a device.

    DefaultStreamConfigError::to_string

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

    DeviceIdError

    pub suberror DeviceIdError {
    UnsupportedPlatform
    BackendSpecific(BackendSpecificError)
    } derive(Eq,
    Debug
    )

    DeviceIdError::to_string

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

    DeviceNameError

    pub suberror DeviceNameError {
    BackendSpecific(BackendSpecificError)
    } derive(Eq,
    Debug
    )

    An error that may occur while attempting to retrieve a device name.

    DeviceNameError::to_string

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

    DevicesError

    pub suberror DevicesError {
    BackendSpecific(BackendSpecificError)
    } derive(Eq,
    Debug
    )

    An error that might occur while attempting to enumerate devices.

    DevicesError::to_string

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

    HostUnavailable

    pub suberror HostUnavailable {
    HostUnavailable
    } derive(Eq,
    Debug
    )

    HostUnavailable::to_string

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

    PauseStreamError

    pub suberror PauseStreamError {
    DeviceNotAvailable
    BackendSpecific(BackendSpecificError)
    } derive(Eq,
    Debug
    )

    PauseStreamError::to_string

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

    PlayStreamError

    pub suberror PlayStreamError {
    DeviceNotAvailable
    BackendSpecific(BackendSpecificError)
    } derive(Eq,
    Debug
    )

    PlayStreamError::to_string

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

    StreamError

    pub suberror StreamError {
    DeviceNotAvailable
    StreamInvalidated
    BufferUnderrun
    BackendSpecific(BackendSpecificError)
    } derive(Eq,
    Debug
    )

    impl Show for StreamError

    StreamError::to_string

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

    SupportedStreamConfigsError

    pub suberror SupportedStreamConfigsError {
    DeviceNotAvailable
    DeviceBusy
    InvalidArgument
    BackendSpecific(BackendSpecificError)
    } derive(Eq,
    Debug
    )

    Error that can happen when enumerating the list of supported configs.

    SupportedStreamConfigsError::to_string

    BackendSpecificError

    pub struct BackendSpecificError {
    description : String
    } derive(Eq,
    Debug
    )

    BackendSpecificError::BackendSpecificError

    fn BackendSpecificError::BackendSpecificError(description : String) -> BackendSpecificError

    BackendSpecificError::description

    fn BackendSpecificError::description(self : BackendSpecificError) -> String

    BackendSpecificError::new

    fn BackendSpecificError::new(description : String) -> BackendSpecificError

    BackendSpecificError::to_string

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

    BufferSize

    pub enum BufferSize {
    Default
    Fixed(Int)
    } derive(Eq,
    Debug
    )

    The buffer size requests the callback size for audio streams.

    Mirrors upstream cpal::BufferSize:
    • Default uses the host's default callback size.
    • Fixed(n) requests approximately n frames per callback.

    The actual callback size depends on the backend/host implementation and may differ from or vary around the requested size.
    impl Show for BufferSize

    BufferSize::default

    fn BufferSize::default() -> BufferSize

    BufferSize::fixed

    fn BufferSize::fixed(n : Int) -> BufferSize

    Data

    pub struct Data {
    sample_format : SampleFormat
    bytes : FixedArray[Byte]
    } derive(Eq,
    Debug
    )

    impl Show for Data

    Data::Data

    fn Data::Data(sample_format : SampleFormat, bytes : FixedArray[Byte]) -> Data

    Data::bytes

    fn Data::bytes(self : Data) -> FixedArray[Byte]

    Data::clear

    fn Data::clear(self : Data) -> Unit

    Fill the underlying buffer with the sample-format equilibrium value (silence).

    Data::len

    fn Data::len(self : Data) -> Int

    Number of samples in the buffer (floor if the byte length is not aligned to the sample size).

    Data::new

    fn Data::new(sample_format : SampleFormat, bytes : FixedArray[Byte]) -> Data

    Data::sample_format

    fn Data::sample_format(self : Data) -> SampleFormat

    Data::try_as_f32

    fn Data::try_as_f32(self : Data) -> Array[Float]?

    Data::try_as_f64

    fn Data::try_as_f64(self : Data) -> Array[Double]?

    Data::try_as_i16

    fn Data::try_as_i16(self : Data) -> Array[Int16]?

    Data::try_as_i24

    fn Data::try_as_i24(self : Data) -> Array[I24]?

    Data::try_as_i32

    fn Data::try_as_i32(self : Data) -> Array[Int]?

    Data::try_as_i64

    fn Data::try_as_i64(self : Data) -> Array[Int64]?

    Data::try_as_i8

    fn Data::try_as_i8(self : Data) -> Array[Int]?

    Data::try_as_u16

    fn Data::try_as_u16(self : Data) -> Array[UInt16]?

    Data::try_as_u24

    fn Data::try_as_u24(self : Data) -> Array[U24]?

    Data::try_as_u32

    fn Data::try_as_u32(self : Data) -> Array[UInt]?

    Data::try_as_u64

    fn Data::try_as_u64(self : Data) -> Array[UInt64]?

    Data::try_as_u8

    fn Data::try_as_u8(self : Data) -> Array[Byte]?

    Data::write_f32

    fn Data::write_f32(self : Data, samples : Array[Float]) -> Bool

    Best-effort encoder for F32 (IEEE-754, little-endian) output buffers.

    Data::write_f64

    fn Data::write_f64(self : Data, samples : Array[Double]) -> Bool

    Best-effort encoder for F64 (IEEE-754, little-endian).

    Data::write_i16

    fn Data::write_i16(self : Data, samples : Array[Int16]) -> Bool

    Best-effort encoder for I16 (little-endian) output buffers.

    Data::write_i24

    fn Data::write_i24(self : Data, samples : Array[I24]) -> Bool

    Best-effort encoder for I24 (little-endian, stored in the low 24 bits of a 32-bit word).

    Data::write_i32

    fn Data::write_i32(self : Data, samples : Array[Int]) -> Bool

    Best-effort encoder for I32 (little-endian).

    Data::write_i64

    fn Data::write_i64(self : Data, samples : Array[Int64]) -> Bool

    Best-effort encoder for I64 (little-endian).

    Data::write_i8

    fn Data::write_i8(self : Data, samples : Array[Int]) -> Bool

    Best-effort encoder for I8 output buffers.

    Data::write_u16

    fn Data::write_u16(self : Data, samples : Array[UInt16]) -> Bool

    Best-effort encoder for U16 (little-endian) output buffers.

    Data::write_u24

    fn Data::write_u24(self : Data, samples : Array[U24]) -> Bool

    Best-effort encoder for U24 (little-endian, stored in the low 24 bits of a 32-bit word).

    Data::write_u32

    fn Data::write_u32(self : Data, samples : Array[UInt]) -> Bool

    Best-effort encoder for U32 (little-endian).

    Data::write_u64

    fn Data::write_u64(self : Data, samples : Array[UInt64]) -> Bool

    Best-effort encoder for U64 (little-endian).

    Data::write_u8

    fn Data::write_u8(self : Data, samples : Array[Byte]) -> Bool

    Best-effort encoder for U8 output buffers.

    DeviceDescription

    pub struct DeviceDescription {
    name : String
    manufacturer : String?
    driver : String?
    device_type : DeviceType
    interface_type : InterfaceType
    direction : DeviceDirection
    address : String?
    extended : Array[String]
    } derive(Eq,
    Debug
    )

    DeviceDescription::DeviceDescription

    fn DeviceDescription::DeviceDescription(name : String, manufacturer? : String?, driver? : String?, device_type? : DeviceType, interface_type? : InterfaceType, direction? : DeviceDirection, address? : String?, extended? : Array[String]) -> DeviceDescription

    DeviceDescription::address

    fn DeviceDescription::address(self : DeviceDescription) -> String?

    DeviceDescription::device_type

    DeviceDescription::direction

    DeviceDescription::driver

    fn DeviceDescription::driver(self : DeviceDescription) -> String?

    DeviceDescription::extended

    fn DeviceDescription::extended(self : DeviceDescription) -> Array[String]

    DeviceDescription::interface_type

    fn DeviceDescription::interface_type(self : DeviceDescription) -> InterfaceType

    DeviceDescription::manufacturer

    fn DeviceDescription::manufacturer(self : DeviceDescription) -> String?

    DeviceDescription::name

    fn DeviceDescription::name(self : DeviceDescription) -> String

    DeviceDescription::new

    fn DeviceDescription::new(name : String, manufacturer? : String?, driver? : String?, device_type? : DeviceType, interface_type? : InterfaceType, direction? : DeviceDirection, address? : String?, extended? : Array[String]) -> DeviceDescription

    DeviceDescription::supports_input

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

    DeviceDescription::supports_output

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

    DeviceDescription::to_string

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

    DeviceDescriptionBuilder

    pub struct DeviceDescriptionBuilder {
    name : String
    manufacturer : String?
    driver : String?
    device_type : DeviceType
    interface_type : InterfaceType
    direction : DeviceDirection
    address : String?
    extended : Array[String]
    } derive(Eq,
    Debug
    )

    Builder for constructing a DeviceDescription.

    This is primarily intended for backend implementations to gradually build up descriptions with whatever metadata is available.

    DeviceDescriptionBuilder::DeviceDescriptionBuilder

    fn DeviceDescriptionBuilder::DeviceDescriptionBuilder(name : String) -> DeviceDescriptionBuilder

    DeviceDescriptionBuilder::add_extended_line

    fn DeviceDescriptionBuilder::add_extended_line(self : DeviceDescriptionBuilder, line : String) -> DeviceDescriptionBuilder

    DeviceDescriptionBuilder::address

    DeviceDescriptionBuilder::build

    DeviceDescriptionBuilder::device_type

    DeviceDescriptionBuilder::direction

    DeviceDescriptionBuilder::driver

    DeviceDescriptionBuilder::extended

    DeviceDescriptionBuilder::interface_type

    DeviceDescriptionBuilder::manufacturer

    fn DeviceDescriptionBuilder::manufacturer(self : DeviceDescriptionBuilder, manufacturer : String) -> DeviceDescriptionBuilder

    DeviceDescriptionBuilder::new

    DeviceDirection

    pub enum DeviceDirection {
    Input
    Output
    Duplex
    Unknown
    } derive(Eq,
    Debug
    )

    DeviceDirection::duplex

    DeviceDirection::input

    DeviceDirection::output

    DeviceDirection::to_string

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

    DeviceDirection::unknown

    DeviceId

    pub struct DeviceId {
    host_id : HostId
    device_id : String
    } derive(Eq,
    Debug
    )

    impl Show for DeviceId

    DeviceId::DeviceId

    fn DeviceId::DeviceId(host_id : HostId, device_id : String) -> DeviceId

    DeviceId::device_id

    fn DeviceId::device_id(self : DeviceId) -> String

    DeviceId::from_string

    fn DeviceId::from_string(s : String) -> DeviceId raise DeviceIdError

    DeviceId::host_id

    fn DeviceId::host_id(self : DeviceId) -> HostId

    DeviceId::new

    fn DeviceId::new(host_id : HostId, device_id : String) -> DeviceId

    DeviceId::to_string

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

    DeviceType

    pub enum DeviceType {
    Speaker
    Microphone
    Headphones
    Headset
    Earpiece
    Handset
    HearingAid
    Dock
    Tuner
    Virtual
    Unknown
    } derive(Eq,
    Debug
    )

    impl Show for DeviceType

    DeviceType::dock

    fn DeviceType::dock() -> DeviceType

    DeviceType::earpiece

    fn DeviceType::earpiece() -> DeviceType

    DeviceType::handset

    fn DeviceType::handset() -> DeviceType

    DeviceType::headphones

    fn DeviceType::headphones() -> DeviceType

    DeviceType::headset

    fn DeviceType::headset() -> DeviceType

    DeviceType::hearing_aid

    fn DeviceType::hearing_aid() -> DeviceType

    DeviceType::microphone

    fn DeviceType::microphone() -> DeviceType

    DeviceType::speaker

    fn DeviceType::speaker() -> DeviceType

    DeviceType::to_string

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

    DeviceType::tuner

    fn DeviceType::tuner() -> DeviceType

    DeviceType::unknown

    fn DeviceType::unknown() -> DeviceType

    DeviceType::virtual_

    fn DeviceType::virtual_() -> DeviceType

    Duration

    pub struct Duration {
    secs : UInt64
    nanos : Int
    } derive(Eq,
    Debug
    )

    A minimal duration type used by the ported StreamInstant arithmetic.

    Upstream uses std::time::Duration (non-negative). Here we keep the same invariant.
    impl Show for Duration

    Duration::Duration

    fn Duration::Duration(secs : UInt64, nanos : Int) -> Duration

    Duration::from_secs

    fn Duration::from_secs(secs : UInt64) -> Duration

    Duration::new

    fn Duration::new(secs : UInt64, nanos : Int) -> Duration

    HostId

    pub(all) enum HostId {
    AAudio
    Alsa
    Asio
    CoreAudio
    Custom
    Emscripten
    Jack
    Null
    Wasapi
    WebAudio
    AudioWorklet
    } derive(Eq,
    Debug
    )

    impl Show for HostId

    HostId::from_string

    fn HostId::from_string(s : String) -> HostId?

    HostId::from_view

    fn HostId::from_view(v : StringView) -> HostId?

    HostId::name

    fn HostId::name(self : HostId) -> String

    Upstream HostId::name() returns the variant name (before lowercase display).

    HostId::parse

    fn HostId::parse(s : String) -> HostId raise HostUnavailable

    HostId::to_string

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

    I24

    pub struct I24 {
    raw : Int
    } derive(Eq,
    Debug
    )

    impl FromSample for I24
    impl Sample for I24
    impl SizedSample for I24
    impl Show for I24

    I24::I24

    fn I24::I24(raw : Int) -> I24

    I24::new

    fn I24::new(raw : Int) -> I24

    I24::to_int

    fn I24::to_int(self : I24) -> Int

    InputCallbackInfo

    pub struct InputCallbackInfo {
    timestamp : InputStreamTimestamp
    } derive(Eq,
    Debug
    )

    Information relevant to a single call to the user's input stream data callback.

    InputCallbackInfo::InputCallbackInfo

    fn InputCallbackInfo::InputCallbackInfo(timestamp : InputStreamTimestamp) -> InputCallbackInfo

    InputCallbackInfo::new

    InputCallbackInfo::timestamp

    InputStreamTimestamp

    pub struct InputStreamTimestamp {
    callback : StreamInstant
    capture : StreamInstant
    } derive(Eq,
    Debug
    )

    A timestamp associated with a call to an input stream's data callback.

    InputStreamTimestamp::InputStreamTimestamp

    fn InputStreamTimestamp::InputStreamTimestamp(callback : StreamInstant, capture : StreamInstant) -> InputStreamTimestamp

    InputStreamTimestamp::callback

    InputStreamTimestamp::capture

    InputStreamTimestamp::new

    InterfaceType

    pub enum InterfaceType {
    BuiltIn
    Usb
    Bluetooth
    Pci
    FireWire
    Thunderbolt
    Hdmi
    Line
    Spdif
    Network
    Virtual
    DisplayPort
    Aggregate
    Unknown
    } derive(Eq,
    Debug
    )

    InterfaceType::aggregate

    fn InterfaceType::aggregate() -> InterfaceType

    InterfaceType::bluetooth

    fn InterfaceType::bluetooth() -> InterfaceType

    InterfaceType::built_in

    fn InterfaceType::built_in() -> InterfaceType

    InterfaceType::display_port

    fn InterfaceType::display_port() -> InterfaceType

    InterfaceType::fire_wire

    fn InterfaceType::fire_wire() -> InterfaceType

    InterfaceType::hdmi

    InterfaceType::line

    InterfaceType::network

    fn InterfaceType::network() -> InterfaceType

    InterfaceType::pci

    InterfaceType::spdif

    InterfaceType::thunderbolt

    fn InterfaceType::thunderbolt() -> InterfaceType

    InterfaceType::to_string

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

    InterfaceType::unknown

    fn InterfaceType::unknown() -> InterfaceType

    InterfaceType::usb

    InterfaceType::virtual_

    fn InterfaceType::virtual_() -> InterfaceType

    NativeOs

    pub(all) enum NativeOs {
    Unknown
    Macos
    Windows
    Linux
    } derive(Eq,
    Debug
    )

    impl Show for NativeOs

    OutputCallbackInfo

    pub struct OutputCallbackInfo {
    timestamp : OutputStreamTimestamp
    } derive(Eq,
    Debug
    )

    Information relevant to a single call to the user's output stream data callback.

    OutputCallbackInfo::OutputCallbackInfo

    fn OutputCallbackInfo::OutputCallbackInfo(timestamp : OutputStreamTimestamp) -> OutputCallbackInfo

    OutputCallbackInfo::new

    OutputCallbackInfo::timestamp

    OutputStreamTimestamp

    pub struct OutputStreamTimestamp {
    callback : StreamInstant
    playback : StreamInstant
    } derive(Eq,
    Debug
    )

    A timestamp associated with a call to an output stream's data callback.

    OutputStreamTimestamp::OutputStreamTimestamp

    fn OutputStreamTimestamp::OutputStreamTimestamp(callback : StreamInstant, playback : StreamInstant) -> OutputStreamTimestamp

    OutputStreamTimestamp::callback

    OutputStreamTimestamp::new

    OutputStreamTimestamp::playback

    SampleFormat

    pub(all) enum SampleFormat {
    I8
    I16
    I24
    I32
    I64
    U8
    U16
    U24
    U32
    U64
    F32
    F64
    DsdU8
    DsdU16
    DsdU32
    } derive(Eq,
    Debug
    )

    SampleFormat::bits_per_sample

    fn SampleFormat::bits_per_sample(self : SampleFormat) -> Int

    SampleFormat::is_dsd

    fn SampleFormat::is_dsd(self : SampleFormat) -> Bool

    SampleFormat::is_float

    fn SampleFormat::is_float(self : SampleFormat) -> Bool

    SampleFormat::is_int

    fn SampleFormat::is_int(self : SampleFormat) -> Bool

    SampleFormat::is_uint

    fn SampleFormat::is_uint(self : SampleFormat) -> Bool

    SampleFormat::sample_size

    fn SampleFormat::sample_size(self : SampleFormat) -> Int

    SampleFormat::to_debug_string

    fn SampleFormat::to_debug_string(self : SampleFormat) -> String

    SampleFormat::to_string

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

    StreamConfig

    pub struct StreamConfig {
    channels : Int
    sample_rate : Int
    buffer_size : BufferSize
    } derive(Eq,
    Debug
    )

    StreamConfig::StreamConfig

    fn StreamConfig::StreamConfig(channels : Int, sample_rate : Int, buffer_size : BufferSize) -> StreamConfig

    StreamConfig::new

    fn StreamConfig::new(channels : Int, sample_rate : Int, buffer_size : BufferSize) -> StreamConfig

    StreamInstant

    pub struct StreamInstant {
    secs : Int64
    nanos : Int
    } derive(Eq,
    Debug
    )

    Monotonic timestamp associated with a stream.

    StreamInstant::StreamInstant

    fn StreamInstant::StreamInstant(secs : Int64, nanos : Int) -> StreamInstant

    StreamInstant::add

    fn StreamInstant::add(self : StreamInstant, duration : Duration) -> StreamInstant?

    Return the instant after the given duration has passed.

    StreamInstant::duration_since

    fn StreamInstant::duration_since(self : StreamInstant, earlier : StreamInstant) -> Duration?

    The amount of time elapsed from another instant to this one.

    Returns None if earlier is later than self.

    StreamInstant::new

    fn StreamInstant::new(secs : Int64, nanos : Int) -> StreamInstant

    StreamInstant::sub

    fn StreamInstant::sub(self : StreamInstant, duration : Duration) -> StreamInstant?

    Return the instant one duration ago.

    SupportedBufferSize

    pub(all) enum SupportedBufferSize {
    Range(min~ : Int, max~ : Int)
    Unknown
    } derive(Eq,
    Debug
    )

    SupportedBufferSize::contains

    fn SupportedBufferSize::contains(self : SupportedBufferSize, frames : Int) -> Bool

    SupportedStreamConfig

    pub struct SupportedStreamConfig {
    buffer_size : SupportedBufferSize
    channels : Int
    sample_rate : Int
    sample_format : SampleFormat
    } derive(Eq,
    Debug
    )

    A single supported stream configuration (as opposed to a range).

    Mirrors cpal's SupportedStreamConfig shape used by default_*_config.

    SupportedStreamConfig::SupportedStreamConfig

    fn SupportedStreamConfig::SupportedStreamConfig(channels : Int, sample_rate : Int, buffer_size : SupportedBufferSize, sample_format : SampleFormat) -> SupportedStreamConfig

    SupportedStreamConfig::buffer_size

    SupportedStreamConfig::channels

    fn SupportedStreamConfig::channels(self : SupportedStreamConfig) -> Int

    SupportedStreamConfig::config

    SupportedStreamConfig::new

    fn SupportedStreamConfig::new(channels : Int, sample_rate : Int, buffer_size : SupportedBufferSize, sample_format : SampleFormat) -> SupportedStreamConfig

    SupportedStreamConfig::sample_format

    SupportedStreamConfig::sample_rate

    fn SupportedStreamConfig::sample_rate(self : SupportedStreamConfig) -> Int

    SupportedStreamConfigRange

    pub struct SupportedStreamConfigRange {
    buffer_size : SupportedBufferSize
    channels : Int
    min_sample_rate : Int
    max_sample_rate : Int
    sample_format : SampleFormat
    } derive(Eq,
    Debug
    )

    SupportedStreamConfigRange::SupportedStreamConfigRange

    fn SupportedStreamConfigRange::SupportedStreamConfigRange(channels : Int, min_sample_rate : Int, max_sample_rate : Int, buffer_size : SupportedBufferSize, sample_format : SampleFormat) -> SupportedStreamConfigRange

    SupportedStreamConfigRange::buffer_size

    SupportedStreamConfigRange::channels

    SupportedStreamConfigRange::cmp_default_heuristics

    fn SupportedStreamConfigRange::cmp_default_heuristics(self : SupportedStreamConfigRange, other : SupportedStreamConfigRange) -> Int

    Compare two supported config ranges using the same "default config" heuristics as upstream.

    Returns:
    • negative if self has lower priority
    • 0 if equal priority
    • positive if self has higher priority

    SupportedStreamConfigRange::max_sample_rate

    fn SupportedStreamConfigRange::max_sample_rate(self : SupportedStreamConfigRange) -> Int

    SupportedStreamConfigRange::min_sample_rate

    fn SupportedStreamConfigRange::min_sample_rate(self : SupportedStreamConfigRange) -> Int

    SupportedStreamConfigRange::new

    fn SupportedStreamConfigRange::new(channels : Int, min_sample_rate : Int, max_sample_rate : Int, buffer_size : SupportedBufferSize, sample_format : SampleFormat) -> SupportedStreamConfigRange

    Public constructor for black-box tests and downstream users.

    SupportedStreamConfigRange::sample_format

    SupportedStreamConfigRange::try_with_sample_rate

    fn SupportedStreamConfigRange::try_with_sample_rate(self : SupportedStreamConfigRange, sample_rate : Int) -> SupportedStreamConfig?

    Retrieve a SupportedStreamConfig with the given sample rate.

    Returns None if sample_rate is outside [min_sample_rate, max_sample_rate].

    SupportedStreamConfigRange::with_max_sample_rate

    Turns this range into a SupportedStreamConfig corresponding to the maximum sample rate.

    SupportedStreamConfigRange::with_sample_rate

    fn SupportedStreamConfigRange::with_sample_rate(self : SupportedStreamConfigRange, sample_rate : Int) -> SupportedStreamConfig

    Retrieve a SupportedStreamConfig with the given sample rate.

    Panics

    Panics if sample_rate is outside [min_sample_rate, max_sample_rate].

    U24

    pub struct U24 {
    raw : Int
    } derive(Eq,
    Debug
    )

    impl FromSample for U24
    impl Sample for U24
    impl SizedSample for U24
    impl Show for U24

    U24::U24

    fn U24::U24(raw : Int) -> U24

    U24::new

    fn U24::new(raw : Int) -> U24

    U24::to_int

    fn U24::to_int(self : U24) -> Int

    build_stream_error_backend_specific

    fn build_stream_error_backend_specific(description : String) -> BuildStreamError

    build_stream_error_device_busy

    fn build_stream_error_device_busy() -> BuildStreamError

    build_stream_error_device_not_available

    fn build_stream_error_device_not_available() -> BuildStreamError

    build_stream_error_invalid_argument

    fn build_stream_error_invalid_argument() -> BuildStreamError

    build_stream_error_stream_config_not_supported

    fn build_stream_error_stream_config_not_supported() -> BuildStreamError

    build_stream_error_stream_id_overflow

    fn build_stream_error_stream_id_overflow() -> BuildStreamError

    common_sample_rates

    fn common_sample_rates() -> Array[Int]

    default_stream_config_error_backend_specific

    fn default_stream_config_error_backend_specific(description : String) -> DefaultStreamConfigError

    default_stream_config_error_device_busy

    fn default_stream_config_error_device_busy() -> DefaultStreamConfigError

    default_stream_config_error_device_not_available

    fn default_stream_config_error_device_not_available() -> DefaultStreamConfigError

    default_stream_config_error_stream_type_not_supported

    fn default_stream_config_error_stream_type_not_supported() -> DefaultStreamConfigError

    device_id_error_backend_specific

    fn device_id_error_backend_specific(description : String) -> DeviceIdError

    device_id_error_unsupported_platform

    fn device_id_error_unsupported_platform() -> DeviceIdError

    device_name_error_backend_specific

    fn device_name_error_backend_specific(description : String) -> DeviceNameError

    devices_error_backend_specific

    fn devices_error_backend_specific(description : String) -> DevicesError

    direction_from_caps

    fn direction_from_caps(has_input : Bool, has_output : Bool) -> DeviceDirection

    direction_from_counts

    fn direction_from_counts(input_channels : Int?, output_channels : Int?) -> DeviceDirection

    host_unavailable

    fn host_unavailable() -> HostUnavailable

    native_os

    fn native_os() -> NativeOs

    pause_stream_error_backend_specific

    fn pause_stream_error_backend_specific(description : String) -> PauseStreamError

    pause_stream_error_device_not_available

    fn pause_stream_error_device_not_available() -> PauseStreamError

    play_stream_error_backend_specific

    fn play_stream_error_backend_specific(description : String) -> PlayStreamError

    play_stream_error_device_not_available

    fn play_stream_error_device_not_available() -> PlayStreamError

    sample_cast

    fn[A : Sample, B : Sample] sample_cast(x : A) -> B

    sleep_millis

    fn sleep_millis(ms : Int) -> Unit

    stream_error_backend_specific

    fn stream_error_backend_specific(description : String) -> StreamError

    stream_error_buffer_underrun

    fn stream_error_buffer_underrun() -> StreamError

    stream_error_device_not_available

    fn stream_error_device_not_available() -> StreamError

    stream_error_stream_invalidated

    fn stream_error_stream_invalidated() -> StreamError

    string_to_ascii_bytes

    fn string_to_ascii_bytes(s : String) -> Bytes

    Encode a string into ASCII bytes (best-effort).

    This is intended for native backend identifiers like default or hw:0,0. Any non-ASCII chars are replaced with ?.

    string_to_utf8_bytes

    fn string_to_utf8_bytes(s : String) -> Bytes

    Encode a string into UTF-8 bytes.

    This is needed for native backends that require UTF-8 identifiers (e.g. WASAPI endpoint IDs).

    supported_stream_configs_error_backend_specific

    fn supported_stream_configs_error_backend_specific(description : String) -> SupportedStreamConfigsError

    supported_stream_configs_error_device_busy

    fn supported_stream_configs_error_device_busy() -> SupportedStreamConfigsError

    supported_stream_configs_error_device_not_available

    fn supported_stream_configs_error_device_not_available() -> SupportedStreamConfigsError

    supported_stream_configs_error_invalid_argument

    fn supported_stream_configs_error_invalid_argument() -> SupportedStreamConfigsError

    utf8_bytes_to_string

    fn utf8_bytes_to_string(bytes : Bytes, length : Int) -> String