moon_rodio

    Native-only MoonBit port of Rust rodio with playback pipeline, source effects, and WAV/MP3/FLAC/Vorbis/MP4A decoding.

    audio
    Download zip
    Author
    Version
    0.3.5
    License
    Apache-2.0
    Last updated
    14 days ago
    Downloads
    6K

    Dependencies

    #Milky2018/moon_rodio

    Native CI

    moon_rodio is a native-only MoonBit audio playback library. It provides in-memory playback composition through Mixer, Sink, Player, and Source, plus built-in decoders for common audio formats.

    #Scope

    • Preferred target: native
    • Output and input are built on Milky2018/moon_cpal
    • The main package is Milky2018/moon_rodio
    • The lower-level decoder package is Milky2018/moon_rodio/decoder

    #Installation

    • Add "Milky2018/moon_rodio": "0.3.0" to deps in moon.mod.json
    • Set "preferred-target": "native" in moon.mod.json

    #Packages

    #Milky2018/moon_rodio

    Use this package for the normal playback API:

    • OutputStreamBuilder
    • Mixer
    • Sink
    • Player
    • Decoder and Decoder::builder()
    • source helpers such as gain, speed, delay, fades, filters, spatial helpers, and WAV output helpers

    #Milky2018/moon_rodio/decoder

    Use this package when you want lower-level byte-to-sample decoding helpers directly:

    • decode_wav_bytes
    • decode_mp3_bytes
    • decode_flac_bytes
    • decode_vorbis_bytes
    • decode_mp4a_bytes

    #Supported formats

    • WAV
    • MP3
    • FLAC
    • Ogg Vorbis
    • MP4A / AAC

    Backend notes:

    • WAV: native parser
    • MP3: vendored minimp3
    • FLAC: vendored dr_flac
    • Vorbis: vendored stb_vorbis
    • MP4A / AAC:
      • macOS: AudioToolbox
      • Linux / Windows: FFmpeg

    #MP4A / AAC on Linux and Windows

    MP4A on Linux and Windows depends on FFmpeg development libraries being available to native builds.

    build.js will try to discover them automatically. If auto-detection does not fit your environment, set these variables explicitly before building or testing:

    • MOON_RODIO_FFMPEG_CFLAGS
    • MOON_RODIO_FFMPEG_LIBS
    • MOON_RODIO_ENABLE_FFMPEG=1

    #Quick start

    Create an in-memory playback chain:

    ///|
    test "readme: in-memory playback chain" {
    let (tx, rx) = mixer(1, 44_100)
    let sink = Sink::connect_new(tx)
    let source = SamplesBuffer::new(1, 44_100, [0.0, 0.25, 0.0, -0.25])

    sink.append(source)
    @debug.assert_eq(rx.next(), Some(0.0))
    }

    Decode audio bytes with the high-level decoder API:

    ///|
    test "readme: decoder builder" {
    let decoder = Decoder::builder()
    .with_data(@decoder.mp3_ill2_mono_bytes())
    .with_hint("mp3")
    .with_seekable(true)
    .build()

    @debug.assert_eq(decoder.channels(), 1)
    @debug.assert_eq(decoder.sample_rate(), 48_000)
    }

    Play embedded bytes through a mixer:

    ///|
    test "readme: play bytes through mixer" {
    let (tx, _rx) = mixer(1, 44_100)
    let player = play_bytes(tx, @decoder.flac_pop_bytes())

    player.pause()
    player.play()
    }

    For files on disk, use play_file(...), Reader::from_file(...), or Decoder::try_from_file(...).

    ChannelCount

    type ChannelCount = Int

    Sample

    type Sample = Double

    SampleRate

    type SampleRate = Int

    FixedSource

    pub(open) trait FixedSource {
    fn next(Self) -> Double?
    fn channels(Self) -> Int
    fn sample_rate(Self) -> Int
    fn total_duration(Self) ->
    Duration
    ?
    }

    Compatibility trait mirroring rodio::fixed_source::FixedSource.

    Unlike Source, a FixedSource never changes channel count and sample rate.

    NoiseRng

    pub(open) trait NoiseRng {
    fn next_u64(Self) -> UInt64
    }

    Source

    pub(open) trait Source {
    fn next(Self) -> Double?
    fn channels(Self) -> Int
    fn sample_rate(Self) -> Int
    fn current_span_len(Self) -> Int?
    fn total_duration(Self) ->
    Duration
    ?
    fn try_seek(Self, pos :
    Duration
    ) -> Unit raise SeekError
    }

    WavWriter

    pub(open) trait WavWriter {
    fn write_all(Self, bytes : Bytes) -> Unit raise ToWavError
    }

    impl WavWriter for Buffer

    BitDepthError

    pub suberror BitDepthError {
    OutOfRange(Int)
    } derive(Eq,
    Debug
    )

    BitDepthError::equal

    BitDepthError::not_equal

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

    BitDepthError::output

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

    BitDepthError::to_string

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

    DecoderError

    pub suberror DecoderError {
    Backend(
    DecoderError
    )
    UnrecognizedFormat
    } derive(Eq,
    Debug
    )

    DecoderError::equal

    DecoderError::not_equal

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

    DecoderError::output

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

    DecoderError::to_string

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

    MicrophoneError

    MicrophoneError::equal

    MicrophoneError::not_equal

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

    MicrophoneError::output

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

    MicrophoneError::to_string

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

    MicrophoneListError

    pub suberror MicrophoneListError {
    DevicesError(
    DevicesError
    )
    } derive(Eq,
    Debug
    )

    MicrophoneListError::equal

    MicrophoneListError::not_equal

    MicrophoneListError::output

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

    MicrophoneListError::to_string

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

    PlayError

    pub suberror PlayError {
    DecoderError(DecoderError)
    } derive(Eq,
    Debug
    )

    impl Show for PlayError

    PlayError::equal

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

    PlayError::not_equal

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

    PlayError::output

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

    PlayError::to_string

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

    SeekError

    pub suberror SeekError {
    NotSupported
    } derive(Eq,
    Debug
    )

    impl Show for SeekError

    SeekError::equal

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

    SeekError::not_equal

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

    SeekError::output

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

    SeekError::source_intact

    fn SeekError::source_intact(self : SeekError) -> Bool

    SeekError::to_string

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

    SpeakersError

    pub suberror SpeakersError {
    NoDevice
    NoConfig
    DefaultOutputConfigError(
    DefaultStreamConfigError
    )
    SupportedOutputConfigsError(
    SupportedStreamConfigsError
    )
    UnsupportedByDevice
    DeviceSinkError(StreamError)
    } derive(Eq,
    Debug
    )

    SpeakersError::equal

    SpeakersError::not_equal

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

    SpeakersError::output

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

    SpeakersError::to_string

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

    SpeakersListError

    pub suberror SpeakersListError {
    DevicesError(
    DevicesError
    )
    } derive(Eq,
    Debug
    )

    SpeakersListError::equal

    SpeakersListError::not_equal

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

    SpeakersListError::output

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

    SpeakersListError::to_string

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

    SpeakersPlayError

    pub suberror SpeakersPlayError {
    WrongChannelCount(Int, Int)
    WrongSampleRate(Int, Int)
    BuilderError(SpeakersError)
    } derive(Eq,
    Debug
    )

    SpeakersPlayError::equal

    SpeakersPlayError::not_equal

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

    SpeakersPlayError::output

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

    SpeakersPlayError::to_string

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

    StreamError

    impl Show for StreamError

    StreamError::equal

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

    StreamError::not_equal

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

    StreamError::output

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

    StreamError::to_string

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

    ToWavError

    pub suberror ToWavError {
    OpenFile
    Creating
    Writing
    Finishing
    Flushing
    } derive(Eq,
    Debug
    )

    impl Show for ToWavError

    ToWavError::equal

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

    ToWavError::not_equal

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

    ToWavError::output

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

    ToWavError::to_string

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

    Amplify

    pub struct Amplify {
    input : DynSource
    factor :
    Ref
    [Double]
    }

    impl Source for Amplify

    Amplify::channels

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

    Amplify::current_span_len

    fn Amplify::current_span_len(_self : Amplify) -> Int?

    Amplify::inner

    fn Amplify::inner(self : Amplify) -> DynSource

    Amplify::inner_mut

    fn Amplify::inner_mut(self : Amplify) -> DynSource

    Amplify::into_inner

    fn Amplify::into_inner(self : Amplify) -> DynSource

    Amplify::new

    fn[S : Source] Amplify::new(source : S, factor : Double) -> Amplify

    Amplify::next

    fn Amplify::next(self : Amplify) -> Double?

    Amplify::sample_rate

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

    Amplify::set_factor

    fn Amplify::set_factor(self : Amplify, factor : Double) -> Unit

    Amplify::set_log_factor

    fn Amplify::set_log_factor(self : Amplify, factor : Double) -> Unit

    Amplify::total_duration

    Amplify::try_seek

    fn Amplify::try_seek(_self : Amplify, pos :
    Duration
    ) -> Unit raise SeekError

    AutomaticGainControl

    pub struct AutomaticGainControl {
    input : DynSource
    target_level :
    Ref
    [Double]
    absolute_max_gain :
    Ref
    [Double]
    current_gain :
    Ref
    [Double]
    floor :
    Ref
    [Double]
    attack_coeff :
    Ref
    [Double]
    release_coeff :
    Ref
    [Double]
    agc_control :
    Ref
    [Bool]
    }

    AutomaticGainControl::channels

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

    AutomaticGainControl::current_span_len

    fn AutomaticGainControl::current_span_len(_self : AutomaticGainControl) -> Int?

    AutomaticGainControl::get_absolute_max_gain

    fn AutomaticGainControl::get_absolute_max_gain(self : AutomaticGainControl) ->
    Ref
    [Double]

    AutomaticGainControl::get_agc_control

    AutomaticGainControl::get_attack_coeff

    AutomaticGainControl::get_release_coeff

    AutomaticGainControl::get_target_level

    AutomaticGainControl::inner

    AutomaticGainControl::inner_mut

    AutomaticGainControl::new

    AutomaticGainControl::new_with_params

    fn[S : Source] AutomaticGainControl::new_with_params(source : S, target_level : Double, attack_time :
    Duration
    , release_time :
    Duration
    , absolute_max_gain : Double) -> AutomaticGainControl

    AutomaticGainControl::next

    fn AutomaticGainControl::next(self : AutomaticGainControl) -> Double?

    AutomaticGainControl::sample_rate

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

    AutomaticGainControl::set_enabled

    fn AutomaticGainControl::set_enabled(self : AutomaticGainControl, enabled : Bool) -> Unit

    AutomaticGainControl::set_floor

    fn AutomaticGainControl::set_floor(self : AutomaticGainControl, floor : Double?) -> Unit

    AutomaticGainControl::total_duration

    AutomaticGainControl::try_seek

    AutomaticGainControlSettings

    pub struct AutomaticGainControlSettings {
    target_level : Double
    attack_time :
    Duration

    release_time :
    Duration

    absolute_max_gain : Double
    }

    AutomaticGainControlSettings::default

    AutomaticGainControlSettings::new

    AutomaticGainControlSettings::with_absolute_max_gain

    fn AutomaticGainControlSettings::with_absolute_max_gain(self : AutomaticGainControlSettings, absolute_max_gain : Double) -> AutomaticGainControlSettings

    AutomaticGainControlSettings::with_release

    AutomaticGainControlSettings::with_target_level

    fn AutomaticGainControlSettings::with_target_level(self : AutomaticGainControlSettings, target_level : Double) -> AutomaticGainControlSettings

    BitDepth

    pub struct BitDepth {
    bits : Int
    } derive(Eq,
    Debug
    )

    impl Show for BitDepth

    BitDepth::equal

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

    BitDepth::get

    fn BitDepth::get(self : BitDepth) -> Int

    BitDepth::new

    fn BitDepth::new(bits : Int) -> BitDepth raise BitDepthError

    BitDepth::not_equal

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

    BitDepth::output

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

    BitDepth::to_repr

    BitDepth::to_string

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

    BltFilter

    impl Source for BltFilter

    BltFilter::channels

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

    BltFilter::current_span_len

    fn BltFilter::current_span_len(_self : BltFilter) -> Int?

    BltFilter::inner

    fn BltFilter::inner(self : BltFilter) -> DynSource

    BltFilter::inner_mut

    fn BltFilter::inner_mut(self : BltFilter) -> DynSource

    BltFilter::into_inner

    fn BltFilter::into_inner(self : BltFilter) -> DynSource

    BltFilter::next

    fn BltFilter::next(self : BltFilter) -> Double?

    BltFilter::sample_rate

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

    BltFilter::to_high_pass

    fn BltFilter::to_high_pass(self : BltFilter, freq : Int) -> Unit

    BltFilter::to_high_pass_with_q

    fn BltFilter::to_high_pass_with_q(self : BltFilter, freq : Int, q : Double) -> Unit

    BltFilter::to_low_pass

    fn BltFilter::to_low_pass(self : BltFilter, freq : Int) -> Unit

    BltFilter::to_low_pass_with_q

    fn BltFilter::to_low_pass_with_q(self : BltFilter, freq : Int, q : Double) -> Unit

    BltFilter::total_duration

    BltFilter::try_seek

    fn BltFilter::try_seek(_self : BltFilter, pos :
    Duration
    ) -> Unit raise SeekError

    BltMode

    pub enum BltMode {
    LowPass
    HighPass
    } derive(Eq,
    Debug
    )

    impl Show for BltMode

    BltMode::equal

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

    BltMode::not_equal

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

    BltMode::output

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

    BltMode::to_repr

    BltMode::to_string

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

    Blue

    pub struct Blue {
    sample_rate : Int
    white_noise : WhiteUniform
    prev_white :
    Ref
    [Double]
    }

    impl Source for Blue

    Blue::channels

    fn Blue::channels(_self : Blue) -> Int

    Blue::current_span_len

    fn Blue::current_span_len(_self : Blue) -> Int?

    Blue::new

    fn Blue::new(sample_rate : Int) -> Blue

    Blue::new_with_rng

    fn[R : NoiseRng] Blue::new_with_rng(sample_rate : Int, rng : R) -> Blue

    Blue::new_with_seed

    fn Blue::new_with_seed(sample_rate : Int, seed : UInt64) -> Blue

    Blue::next

    fn Blue::next(self : Blue) -> Double?

    Blue::sample_rate

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

    Blue::total_duration

    fn Blue::total_duration(_self : Blue) ->
    Duration
    ?

    Blue::try_seek

    fn Blue::try_seek(_self : Blue, pos :
    Duration
    ) -> Unit raise SeekError

    Brownian

    pub struct Brownian {
    sample_rate : Int
    white_noise : WhiteGaussian
    accumulator :
    Ref
    [Double]
    leak_factor :
    Ref
    [Double]
    scale :
    Ref
    [Double]
    }

    impl Source for Brownian

    Brownian::channels

    fn Brownian::channels(_self : Brownian) -> Int

    Brownian::current_span_len

    fn Brownian::current_span_len(_self : Brownian) -> Int?

    Brownian::new

    fn Brownian::new(sample_rate : Int) -> Brownian

    Brownian::new_with_rng

    fn[R : NoiseRng] Brownian::new_with_rng(sample_rate : Int, rng : R) -> Brownian

    Brownian::new_with_seed

    fn Brownian::new_with_seed(sample_rate : Int, seed : UInt64) -> Brownian

    Brownian::next

    fn Brownian::next(self : Brownian) -> Double?

    Brownian::sample_rate

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

    Brownian::total_duration

    Brownian::try_seek

    fn Brownian::try_seek(_self : Brownian, _pos :
    Duration
    ) -> Unit raise SeekError

    Buffered

    pub struct Buffered {
    inner : SamplesBuffer
    }

    impl Source for Buffered

    Buffered::channels

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

    Buffered::current_span_len

    fn Buffered::current_span_len(_self : Buffered) -> Int?

    Buffered::inner

    fn Buffered::inner(self : Buffered) -> SamplesBuffer

    Buffered::inner_mut

    fn Buffered::inner_mut(self : Buffered) -> SamplesBuffer

    Buffered::into_inner

    fn Buffered::into_inner(self : Buffered) -> SamplesBuffer

    Buffered::new

    fn[S : Source] Buffered::new(source : S) -> Buffered

    Buffered::next

    fn Buffered::next(self : Buffered) -> Double?

    Buffered::sample_rate

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

    Buffered::total_duration

    Buffered::try_seek

    fn Buffered::try_seek(_self : Buffered, pos :
    Duration
    ) -> Unit raise SeekError

    ChannelCountConverter

    pub struct ChannelCountConverter {
    inner : DynSource
    to : Int
    }

    ChannelCountConverter::channels

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

    ChannelCountConverter::current_span_len

    fn ChannelCountConverter::current_span_len(_self : ChannelCountConverter) -> Int?

    ChannelCountConverter::inner_mut

    ChannelCountConverter::into_inner

    ChannelCountConverter::new

    fn[S : Source] ChannelCountConverter::new(input : S, from : Int, to : Int) -> ChannelCountConverter

    ChannelCountConverter::next

    fn ChannelCountConverter::next(self : ChannelCountConverter) -> Double?

    ChannelCountConverter::sample_rate

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

    ChannelCountConverter::total_duration

    ChannelCountConverter::try_seek

    ChannelVolume

    pub struct ChannelVolume {
    input : DynSource
    channel_factors :
    Ref
    [Array[Double]]
    current_channel :
    Ref
    [Int]
    current_sample :
    Ref
    [Double?]
    }

    ChannelVolume::channels

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

    ChannelVolume::current_span_len

    fn ChannelVolume::current_span_len(_self : ChannelVolume) -> Int?

    ChannelVolume::inner

    ChannelVolume::inner_mut

    fn ChannelVolume::inner_mut(self : ChannelVolume) -> DynSource

    ChannelVolume::into_inner

    fn ChannelVolume::into_inner(self : ChannelVolume) -> DynSource

    ChannelVolume::new

    fn[S : Source] ChannelVolume::new(source : S, channel_factors : Array[Double]) -> ChannelVolume

    ChannelVolume::next

    fn ChannelVolume::next(self : ChannelVolume) -> Double?

    ChannelVolume::sample_rate

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

    ChannelVolume::set_volume

    fn ChannelVolume::set_volume(self : ChannelVolume, channel : Int, volume : Double) -> Unit

    ChannelVolume::total_duration

    ChannelVolume::try_seek

    Chirp

    pub struct Chirp {
    sample_rate : Int
    start_frequency : Double
    end_frequency : Double
    total_samples : Int
    elapsed_samples :
    Ref
    [Int]
    phase :
    Ref
    [Double]
    }

    impl Source for Chirp

    Chirp::channels

    fn Chirp::channels(_self : Chirp) -> Int

    Chirp::current_span_len

    fn Chirp::current_span_len(self : Chirp) -> Int?

    Chirp::next

    fn Chirp::next(self : Chirp) -> Double?

    Chirp::sample_rate

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

    Chirp::total_duration

    Chirp::try_seek

    fn Chirp::try_seek(self : Chirp, pos :
    Duration
    ) -> Unit raise SeekError

    ControlledQueueSource

    pub struct ControlledQueueSource {
    inner : SourcesQueueOutput
    controls : SinkControls
    }

    ControlledQueueSource::channels

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

    ControlledQueueSource::current_span_len

    fn ControlledQueueSource::current_span_len(self : ControlledQueueSource) -> Int?

    ControlledQueueSource::next

    fn ControlledQueueSource::next(self : ControlledQueueSource) -> Double?

    ControlledQueueSource::sample_rate

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

    ControlledQueueSource::total_duration

    ControlledQueueSource::try_seek

    Crossfade

    pub struct Crossfade {
    inner : DynSource
    }

    impl Source for Crossfade

    Crossfade::channels

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

    Crossfade::current_span_len

    fn Crossfade::current_span_len(_self : Crossfade) -> Int?

    Crossfade::inner

    fn Crossfade::inner(self : Crossfade) -> DynSource

    Crossfade::inner_mut

    fn Crossfade::inner_mut(self : Crossfade) -> DynSource

    Crossfade::into_inner

    fn Crossfade::into_inner(self : Crossfade) -> DynSource

    Crossfade::new

    fn[A : Source, B : Source] Crossfade::new(left : A, right : B, duration :
    Duration
    ) -> Crossfade

    Crossfade::next

    fn Crossfade::next(self : Crossfade) -> Double?

    Crossfade::sample_rate

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

    Crossfade::total_duration

    Crossfade::try_seek

    fn Crossfade::try_seek(_self : Crossfade, pos :
    Duration
    ) -> Unit raise SeekError

    Decoder

    pub struct Decoder {
    inner :
    DecodedSamples

    seekable : Bool
    allow_backward_seek : Bool
    kind : DecoderKind
    }

    impl Source for Decoder

    Decoder::builder

    fn Decoder::builder() -> DecoderBuilder

    Decoder::channels

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

    Decoder::current_span_len

    fn Decoder::current_span_len(self : Decoder) -> Int?

    Decoder::new

    fn Decoder::new(bytes : Bytes) -> Decoder raise DecoderError

    Decoder::new_aac

    fn Decoder::new_aac(bytes : Bytes) -> Decoder raise DecoderError

    Decoder::new_flac

    fn Decoder::new_flac(bytes : Bytes) -> Decoder raise DecoderError

    Decoder::new_looped

    fn Decoder::new_looped(bytes : Bytes) -> LoopedDecoder raise DecoderError

    Decoder::new_mp3

    fn Decoder::new_mp3(bytes : Bytes) -> Decoder raise DecoderError

    Decoder::new_mp4

    fn Decoder::new_mp4(bytes : Bytes) -> Decoder raise DecoderError

    Decoder::new_mp4a

    fn Decoder::new_mp4a(bytes : Bytes) -> Decoder raise DecoderError

    Decoder::new_vorbis

    fn Decoder::new_vorbis(bytes : Bytes) -> Decoder raise DecoderError

    Decoder::new_wav

    fn Decoder::new_wav(bytes : Bytes) -> Decoder raise DecoderError

    Decoder::next

    fn Decoder::next(self : Decoder) -> Double?

    Decoder::sample_rate

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

    Decoder::total_duration

    Decoder::try_from_file

    fn Decoder::try_from_file(path : StringView) -> Decoder raise DecoderError

    Decoder::try_from_file_looped

    fn Decoder::try_from_file_looped(path : StringView) -> LoopedDecoder raise DecoderError

    Decoder::try_seek

    fn Decoder::try_seek(self : Decoder, pos :
    Duration
    ) -> Unit raise SeekError

    DecoderBuilder

    pub struct DecoderBuilder {
    data : Bytes?
    settings : Settings
    }

    DecoderBuilder::build

    DecoderBuilder::build_looped

    fn DecoderBuilder::build_looped(self : DecoderBuilder) -> LoopedDecoder raise DecoderError

    DecoderBuilder::new

    DecoderBuilder::with_byte_len

    fn DecoderBuilder::with_byte_len(self : DecoderBuilder, byte_len : Int) -> DecoderBuilder

    DecoderBuilder::with_coarse_seek

    fn DecoderBuilder::with_coarse_seek(self : DecoderBuilder, coarse_seek : Bool) -> DecoderBuilder

    DecoderBuilder::with_data

    fn DecoderBuilder::with_data(self : DecoderBuilder, data : Bytes) -> DecoderBuilder

    DecoderBuilder::with_gapless

    fn DecoderBuilder::with_gapless(self : DecoderBuilder, gapless : Bool) -> DecoderBuilder

    DecoderBuilder::with_hint

    fn DecoderBuilder::with_hint(self : DecoderBuilder, hint : StringView) -> DecoderBuilder

    DecoderBuilder::with_mime_type

    fn DecoderBuilder::with_mime_type(self : DecoderBuilder, mime_type : StringView) -> DecoderBuilder

    DecoderBuilder::with_seekable

    fn DecoderBuilder::with_seekable(self : DecoderBuilder, is_seekable : Bool) -> DecoderBuilder

    DecoderKind

    type DecoderKind derive(Eq,
    Debug
    )

    DecoderKind::equal

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

    DecoderKind::not_equal

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

    Delay

    pub struct Delay {
    inner : DynSource
    }

    impl Source for Delay

    Delay::channels

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

    Delay::current_span_len

    fn Delay::current_span_len(_self : Delay) -> Int?

    Delay::inner

    fn Delay::inner(self : Delay) -> DynSource

    Delay::inner_mut

    fn Delay::inner_mut(self : Delay) -> DynSource

    Delay::into_inner

    fn Delay::into_inner(self : Delay) -> DynSource

    Delay::new

    fn[S : Source] Delay::new(source : S, duration :
    Duration
    ) -> Delay

    Delay::next

    fn Delay::next(self : Delay) -> Double?

    Delay::sample_rate

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

    Delay::total_duration

    Delay::try_seek

    fn Delay::try_seek(_self : Delay, pos :
    Duration
    ) -> Unit raise SeekError

    DeviceSinkBuilder

    pub struct DeviceSinkBuilder {
    inner : OutputStreamBuilder
    }

    DeviceSinkBuilder::config

    DeviceSinkBuilder::default

    DeviceSinkBuilder::from_default_device

    fn DeviceSinkBuilder::from_default_device() -> DeviceSinkBuilder raise StreamError

    DeviceSinkBuilder::from_device

    DeviceSinkBuilder::open_default_sink

    fn DeviceSinkBuilder::open_default_sink() -> MixerDeviceSink raise StreamError

    DeviceSinkBuilder::open_sink_or_fallback

    fn DeviceSinkBuilder::open_sink_or_fallback(self : DeviceSinkBuilder) -> MixerDeviceSink raise StreamError

    DeviceSinkBuilder::open_stream

    DeviceSinkBuilder::with_buffer_size

    DeviceSinkBuilder::with_channels

    fn DeviceSinkBuilder::with_channels(self : DeviceSinkBuilder, channel_count : Int) -> DeviceSinkBuilder

    DeviceSinkBuilder::with_device

    DeviceSinkBuilder::with_error_callback

    DeviceSinkBuilder::with_sample_format

    DeviceSinkBuilder::with_sample_rate

    fn DeviceSinkBuilder::with_sample_rate(self : DeviceSinkBuilder, sample_rate : Int) -> DeviceSinkBuilder

    DeviceSinkBuilder::with_supported_config

    Distortion

    pub struct Distortion {
    input : DynSource
    gain :
    Ref
    [Double]
    threshold :
    Ref
    [Double]
    }

    Distortion::channels

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

    Distortion::current_span_len

    fn Distortion::current_span_len(_self : Distortion) -> Int?

    Distortion::inner

    fn Distortion::inner(self : Distortion) -> DynSource

    Distortion::inner_mut

    fn Distortion::inner_mut(self : Distortion) -> DynSource

    Distortion::into_inner

    fn Distortion::into_inner(self : Distortion) -> DynSource

    Distortion::new

    fn[S : Source] Distortion::new(source : S, gain : Double, threshold : Double) -> Distortion

    Distortion::new_with_threshold

    fn[S : Source] Distortion::new_with_threshold(source : S, threshold : Double) -> Distortion

    Distortion::next

    fn Distortion::next(self : Distortion) -> Double?

    Distortion::sample_rate

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

    Distortion::set_gain

    fn Distortion::set_gain(self : Distortion, gain : Double) -> Unit

    Distortion::set_threshold

    fn Distortion::set_threshold(self : Distortion, threshold : Double) -> Unit

    Distortion::total_duration

    Distortion::try_seek

    Distortion::with_gain

    fn[S : Source] Distortion::with_gain(source : S, gain : Double, threshold : Double) -> Distortion

    Dither

    pub struct Dither {
    input : DynSource
    noise :
    Ref
    [DitherAlgorithm]
    current_channel :
    Ref
    [Int]
    lsb_amplitude :
    Ref
    [Double]
    rng_state :
    Ref
    [UInt64]
    highpass_prev :
    Ref
    [Array[Double]]
    }

    impl Source for Dither

    Dither::algorithm

    fn Dither::algorithm(self : Dither) -> DitherAlgorithm

    Dither::channels

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

    Dither::current_span_len

    fn Dither::current_span_len(self : Dither) -> Int?

    Dither::next

    fn Dither::next(self : Dither) -> Double?

    Dither::sample_rate

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

    Dither::set_algorithm

    fn Dither::set_algorithm(self : Dither, algorithm : DitherAlgorithm) -> Unit

    Dither::total_duration

    Dither::try_seek

    fn Dither::try_seek(self : Dither, pos :
    Duration
    ) -> Unit raise SeekError

    DitherAlgorithm

    pub enum DitherAlgorithm {
    GPDF
    HighPass
    RPDF
    TPDF
    } derive(Eq,
    Debug
    )

    DitherAlgorithm::equal

    DitherAlgorithm::gpdf

    DitherAlgorithm::high_pass

    fn DitherAlgorithm::high_pass() -> DitherAlgorithm

    DitherAlgorithm::not_equal

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

    DitherAlgorithm::output

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

    DitherAlgorithm::rpdf

    DitherAlgorithm::to_string

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

    DitherAlgorithm::tpdf

    Done

    pub struct Done {
    input : DynSource
    signal :
    Ref
    [Int]
    signal_sent :
    Ref
    [Bool]
    }

    impl Source for Done

    Done::channels

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

    Done::current_span_len

    fn Done::current_span_len(_self : Done) -> Int?

    Done::inner

    fn Done::inner(self : Done) -> DynSource

    Done::inner_mut

    fn Done::inner_mut(self : Done) -> DynSource

    Done::into_inner

    fn Done::into_inner(self : Done) -> DynSource

    Done::new

    fn[S : Source] Done::new(source : S, signal :
    Ref
    [Int]) -> Done

    Done::next

    fn Done::next(self : Done) -> Double?

    Done::sample_rate

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

    Done::total_duration

    fn Done::total_duration(_self : Done) ->
    Duration
    ?

    Done::try_seek

    fn Done::try_seek(_self : Done, pos :
    Duration
    ) -> Unit raise SeekError

    DynSource

    pub struct DynSource {
    next_sample : () -> Double?
    channels_fn : () -> Int
    sample_rate_fn : () -> Int
    current_span_len_fn : () -> Int?
    total_duration_fn : () ->
    Duration
    ?
    try_seek_fn : (
    Duration
    ) -> Result[Unit, SeekError]
    }

    impl Source for DynSource

    DynSource::channels

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

    DynSource::current_span_len

    fn DynSource::current_span_len(self : DynSource) -> Int?

    DynSource::new

    fn DynSource::new(next_sample : () -> Double?, channels : Int, sample_rate : Int, current_span_len? : () -> Int?, total_duration? : () ->
    Duration
    ?, try_seek? : (
    Duration
    ) -> Result[Unit, SeekError]) -> DynSource

    DynSource::new_dynamic

    fn DynSource::new_dynamic(next_sample : () -> Double?, channels : () -> Int, sample_rate : () -> Int, current_span_len? : () -> Int?, total_duration? : () ->
    Duration
    ?, try_seek? : (
    Duration
    ) -> Result[Unit, SeekError]) -> DynSource

    DynSource::next

    fn DynSource::next(self : DynSource) -> Double?

    DynSource::sample_rate

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

    DynSource::total_duration

    DynSource::try_seek

    Empty

    pub struct Empty {
    inner : DynSource
    }

    impl Source for Empty

    Empty::channels

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

    Empty::current_span_len

    fn Empty::current_span_len(_self : Empty) -> Int?

    Empty::inner

    fn Empty::inner(self : Empty) -> DynSource

    Empty::inner_mut

    fn Empty::inner_mut(self : Empty) -> DynSource

    Empty::into_inner

    fn Empty::into_inner(self : Empty) -> DynSource

    Empty::new

    fn Empty::new(channels : Int, sample_rate : Int) -> Empty

    Empty::next

    fn Empty::next(self : Empty) -> Double?

    Empty::sample_rate

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

    Empty::total_duration

    Empty::try_seek

    fn Empty::try_seek(_self : Empty, pos :
    Duration
    ) -> Unit raise SeekError

    EmptyCallback

    pub struct EmptyCallback {
    callback : () -> Unit
    }

    EmptyCallback::channels

    fn EmptyCallback::channels(_self : EmptyCallback) -> Int

    EmptyCallback::current_span_len

    fn EmptyCallback::current_span_len(_self : EmptyCallback) -> Int?

    EmptyCallback::new

    fn EmptyCallback::new(callback : () -> Unit) -> EmptyCallback

    EmptyCallback::next

    fn EmptyCallback::next(self : EmptyCallback) -> Double?

    EmptyCallback::sample_rate

    fn EmptyCallback::sample_rate(_self : EmptyCallback) -> Int

    EmptyCallback::total_duration

    EmptyCallback::try_seek

    FadeIn

    pub struct FadeIn {
    inner : DynSource
    }

    impl Source for FadeIn

    FadeIn::channels

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

    FadeIn::current_span_len

    fn FadeIn::current_span_len(_self : FadeIn) -> Int?

    FadeIn::inner

    fn FadeIn::inner(self : FadeIn) -> DynSource

    FadeIn::inner_mut

    fn FadeIn::inner_mut(self : FadeIn) -> DynSource

    FadeIn::into_inner

    fn FadeIn::into_inner(self : FadeIn) -> DynSource

    FadeIn::new

    fn[S : Source] FadeIn::new(source : S, duration :
    Duration
    ) -> FadeIn

    FadeIn::next

    fn FadeIn::next(self : FadeIn) -> Double?

    FadeIn::sample_rate

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

    FadeIn::total_duration

    FadeIn::try_seek

    fn FadeIn::try_seek(_self : FadeIn, pos :
    Duration
    ) -> Unit raise SeekError

    FadeOut

    pub struct FadeOut {
    inner : DynSource
    }

    impl Source for FadeOut

    FadeOut::channels

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

    FadeOut::current_span_len

    fn FadeOut::current_span_len(_self : FadeOut) -> Int?

    FadeOut::inner

    fn FadeOut::inner(self : FadeOut) -> DynSource

    FadeOut::inner_mut

    fn FadeOut::inner_mut(self : FadeOut) -> DynSource

    FadeOut::into_inner

    fn FadeOut::into_inner(self : FadeOut) -> DynSource

    FadeOut::new

    fn[S : Source] FadeOut::new(source : S, duration :
    Duration
    ) -> FadeOut

    FadeOut::next

    fn FadeOut::next(self : FadeOut) -> Double?

    FadeOut::sample_rate

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

    FadeOut::total_duration

    FadeOut::try_seek

    fn FadeOut::try_seek(_self : FadeOut, pos :
    Duration
    ) -> Unit raise SeekError

    FixedSamplesBuffer

    pub struct FixedSamplesBuffer {
    channels : Int
    sample_rate : Int
    samples : Array[Double]
    cursor :
    Ref
    [Int]
    duration :
    Duration
    ?
    }

    FixedSamplesBuffer::channels

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

    FixedSamplesBuffer::new

    fn FixedSamplesBuffer::new(channels : Int, sample_rate : Int, samples : Array[Double]) -> FixedSamplesBuffer

    FixedSamplesBuffer::next

    fn FixedSamplesBuffer::next(self : FixedSamplesBuffer) -> Double?

    FixedSamplesBuffer::sample_rate

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

    FixedSamplesBuffer::total_duration

    FixedSourceAdapter

    pub struct FixedSourceAdapter {
    inner : DynSource
    }

    FixedSourceAdapter::channels

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

    FixedSourceAdapter::current_span_len

    fn FixedSourceAdapter::current_span_len(_self : FixedSourceAdapter) -> Int?

    FixedSourceAdapter::inner

    FixedSourceAdapter::new

    FixedSourceAdapter::next

    fn FixedSourceAdapter::next(self : FixedSourceAdapter) -> Double?

    FixedSourceAdapter::sample_rate

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

    FixedSourceAdapter::total_duration

    FixedSourceAdapter::try_seek

    FromFactoryIter

    pub struct FromFactoryIter[S] {
    factory : () -> S?
    current :
    Ref
    [DynSource?]
    channels :
    Ref
    [Int]
    sample_rate :
    Ref
    [Int]
    }

    FromFactoryIter::channels

    fn[S] FromFactoryIter::channels(self : FromFactoryIter[S]) -> Int

    FromFactoryIter::current_span_len

    fn[S : Source] FromFactoryIter::current_span_len(self : FromFactoryIter[S]) -> Int?

    FromFactoryIter::next

    fn[S : Source] FromFactoryIter::next(self : FromFactoryIter[S]) -> Double?

    FromFactoryIter::sample_rate

    fn[S] FromFactoryIter::sample_rate(self : FromFactoryIter[S]) -> Int

    FromFactoryIter::total_duration

    FromFactoryIter::try_seek

    FromIter

    impl Source for FromIter

    FromIter::channels

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

    FromIter::current_span_len

    fn FromIter::current_span_len(_self : FromIter) -> Int?

    FromIter::next

    fn FromIter::next(self : FromIter) -> Double?

    FromIter::sample_rate

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

    FromIter::total_duration

    FromIter::try_seek

    fn FromIter::try_seek(self : FromIter, pos :
    Duration
    ) -> Unit raise SeekError

    Function

    pub enum Function {
    Sine
    Triangle
    Square
    Sawtooth
    } derive(Eq,
    Debug
    )

    impl Show for Function

    Function::equal

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

    Function::not_equal

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

    Function::output

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

    Function::sawtooth

    fn Function::sawtooth() -> Function

    Function::sine

    fn Function::sine() -> Function

    Function::square

    fn Function::square() -> Function

    Function::to_repr

    Function::to_string

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

    Function::triangle

    fn Function::triangle() -> Function

    GeneratorFunction

    pub struct GeneratorFunction {
    generator : (Double) -> Double
    }

    GeneratorFunction::new

    fn GeneratorFunction::new(generator : (Double) -> Double) -> GeneratorFunction

    Input

    pub struct Input {
    inner :
    Device

    }

    Input::into_inner

    Input::name

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

    InputConfig

    pub struct InputConfig {
    channel_count : Int
    sample_rate : Int
    buffer_size :
    BufferSize

    sample_format :
    SampleFormat

    } derive(Eq,
    Debug
    )

    impl Show for InputConfig

    InputConfig::default

    fn InputConfig::default() -> InputConfig

    InputConfig::equal

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

    InputConfig::new

    fn InputConfig::new(channel_count : Int, sample_rate : Int, buffer_size :
    BufferSize
    , sample_format :
    SampleFormat
    ) -> InputConfig

    InputConfig::not_equal

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

    InputConfig::output

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

    InputConfig::stream_config

    InputConfig::supported_given

    InputConfig::to_string

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

    InputConfig::with_buffer_size

    InputConfig::with_channel_count

    fn InputConfig::with_channel_count(self : InputConfig, channel_count : Int) -> InputConfig

    InputConfig::with_sample_format

    InputConfig::with_sample_rate

    fn InputConfig::with_sample_rate(self : InputConfig, sample_rate : Int) -> InputConfig

    LcgNoiseRng

    pub struct LcgNoiseRng {
    state :
    Ref
    [UInt64]
    }

    LcgNoiseRng::new

    fn LcgNoiseRng::new(seed : UInt64) -> LcgNoiseRng

    LcgNoiseRng::next_u64

    fn LcgNoiseRng::next_u64(self : LcgNoiseRng) -> UInt64

    Limit

    pub struct Limit {
    input : DynSource
    settings : LimitSettings
    attack_coeff : Double
    release_coeff : Double
    integrators :
    Ref
    [Array[Double]]
    peaks :
    Ref
    [Array[Double]]
    position :
    Ref
    [Int]
    }

    impl Source for Limit

    Limit::channels

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

    Limit::current_span_len

    fn Limit::current_span_len(_self : Limit) -> Int?

    Limit::inner

    fn Limit::inner(self : Limit) -> DynSource

    Limit::inner_mut

    fn Limit::inner_mut(self : Limit) -> DynSource

    Limit::into_inner

    fn Limit::into_inner(self : Limit) -> DynSource

    Limit::new

    fn[S : Source] Limit::new(source : S, settings : LimitSettings) -> Limit

    Limit::next

    fn Limit::next(self : Limit) -> Double?

    Limit::sample_rate

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

    Limit::total_duration

    Limit::try_seek

    fn Limit::try_seek(_self : Limit, pos :
    Duration
    ) -> Unit raise SeekError

    LimitMono

    pub struct LimitMono {
    inner : Limit
    }

    impl Source for LimitMono

    LimitMono::channels

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

    LimitMono::current_span_len

    fn LimitMono::current_span_len(_self : LimitMono) -> Int?

    LimitMono::inner

    fn LimitMono::inner(self : LimitMono) -> Limit

    LimitMono::inner_mut

    fn LimitMono::inner_mut(self : LimitMono) -> Limit

    LimitMono::into_inner

    fn LimitMono::into_inner(self : LimitMono) -> Limit

    LimitMono::new

    fn[S : Source] LimitMono::new(source : S, settings : LimitSettings) -> LimitMono

    LimitMono::next

    fn LimitMono::next(self : LimitMono) -> Double?

    LimitMono::sample_rate

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

    LimitMono::total_duration

    LimitMono::try_seek

    fn LimitMono::try_seek(_self : LimitMono, pos :
    Duration
    ) -> Unit raise SeekError

    LimitMulti

    pub struct LimitMulti {
    inner : Limit
    }

    LimitMulti::channels

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

    LimitMulti::current_span_len

    fn LimitMulti::current_span_len(_self : LimitMulti) -> Int?

    LimitMulti::inner

    fn LimitMulti::inner(self : LimitMulti) -> Limit

    LimitMulti::inner_mut

    fn LimitMulti::inner_mut(self : LimitMulti) -> Limit

    LimitMulti::into_inner

    fn LimitMulti::into_inner(self : LimitMulti) -> Limit

    LimitMulti::new

    fn[S : Source] LimitMulti::new(source : S, settings : LimitSettings) -> LimitMulti

    LimitMulti::next

    fn LimitMulti::next(self : LimitMulti) -> Double?

    LimitMulti::sample_rate

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

    LimitMulti::total_duration

    LimitMulti::try_seek

    LimitSettings

    pub struct LimitSettings {
    min_value : Double
    max_value : Double
    threshold : Double
    knee_width : Double
    attack :
    Duration

    release :
    Duration

    } derive(Eq,
    Debug
    )

    LimitSettings::broadcast

    fn LimitSettings::broadcast() -> LimitSettings

    LimitSettings::default

    fn LimitSettings::default() -> LimitSettings

    LimitSettings::dynamic_content

    fn LimitSettings::dynamic_content() -> LimitSettings

    LimitSettings::equal

    LimitSettings::gaming

    LimitSettings::live_performance

    fn LimitSettings::live_performance() -> LimitSettings

    LimitSettings::mastering

    fn LimitSettings::mastering() -> LimitSettings

    LimitSettings::new

    LimitSettings::not_equal

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

    LimitSettings::output

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

    LimitSettings::to_string

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

    LimitSettings::with_attack

    LimitSettings::with_knee_width

    fn LimitSettings::with_knee_width(self : LimitSettings, knee_width : Double) -> LimitSettings

    LimitSettings::with_max

    fn LimitSettings::with_max(self : LimitSettings, max_value : Double) -> LimitSettings

    LimitSettings::with_min

    fn LimitSettings::with_min(self : LimitSettings, min_value : Double) -> LimitSettings

    LimitSettings::with_release

    LimitSettings::with_threshold

    fn LimitSettings::with_threshold(self : LimitSettings, threshold : Double) -> LimitSettings

    LimitStereo

    pub struct LimitStereo {
    inner : Limit
    }

    LimitStereo::channels

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

    LimitStereo::current_span_len

    fn LimitStereo::current_span_len(_self : LimitStereo) -> Int?

    LimitStereo::inner

    fn LimitStereo::inner(self : LimitStereo) -> Limit

    LimitStereo::inner_mut

    fn LimitStereo::inner_mut(self : LimitStereo) -> Limit

    LimitStereo::into_inner

    fn LimitStereo::into_inner(self : LimitStereo) -> Limit

    LimitStereo::new

    fn[S : Source] LimitStereo::new(source : S, settings : LimitSettings) -> LimitStereo

    LimitStereo::next

    fn LimitStereo::next(self : LimitStereo) -> Double?

    LimitStereo::sample_rate

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

    LimitStereo::total_duration

    LimitStereo::try_seek

    LinearGainRamp

    pub struct LinearGainRamp {
    inner : DynSource
    }

    LinearGainRamp::channels

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

    LinearGainRamp::current_span_len

    fn LinearGainRamp::current_span_len(_self : LinearGainRamp) -> Int?

    LinearGainRamp::inner

    LinearGainRamp::inner_mut

    fn LinearGainRamp::inner_mut(self : LinearGainRamp) -> DynSource

    LinearGainRamp::into_inner

    fn LinearGainRamp::into_inner(self : LinearGainRamp) -> DynSource

    LinearGainRamp::new

    fn[S : Source] LinearGainRamp::new(source : S, start_gain : Double, end_gain : Double, duration :
    Duration
    ) -> LinearGainRamp

    LinearGainRamp::new_with_clamp

    fn[S : Source] LinearGainRamp::new_with_clamp(source : S, start_gain : Double, end_gain : Double, duration :
    Duration
    , clamp_end : Bool) -> LinearGainRamp

    LinearGainRamp::next

    fn LinearGainRamp::next(self : LinearGainRamp) -> Double?

    LinearGainRamp::sample_rate

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

    LinearGainRamp::total_duration

    LinearGainRamp::try_seek

    LoopedDecoder

    pub struct LoopedDecoder {
    channels : Int
    sample_rate : Int
    samples : Array[Double]
    cursor :
    Ref
    [Int]
    seekable : Bool
    }

    LoopedDecoder::channels

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

    LoopedDecoder::current_span_len

    fn LoopedDecoder::current_span_len(self : LoopedDecoder) -> Int?

    LoopedDecoder::next

    fn LoopedDecoder::next(self : LoopedDecoder) -> Double?

    LoopedDecoder::sample_rate

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

    LoopedDecoder::total_duration

    LoopedDecoder::try_seek

    Microphone

    pub struct Microphone {
    _stream_handle :
    Stream

    queued_samples :
    Ref
    [Array[Double]]
    read_pos :
    Ref
    [Int]
    max_buffered_samples : Int
    config : InputConfig
    error_occurred :
    Ref
    [Bool]
    }

    Microphone::channels

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

    Microphone::config

    fn Microphone::config(self : Microphone) -> InputConfig

    Microphone::current_span_len

    fn Microphone::current_span_len(_self : Microphone) -> Int?

    Microphone::next

    fn Microphone::next(self : Microphone) -> Double?

    Microphone::sample_rate

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

    Microphone::total_duration

    Microphone::try_seek

    MicrophoneBuilder

    MicrophoneBuilder::config

    MicrophoneBuilder::default_config

    MicrophoneBuilder::default_device

    MicrophoneBuilder::device

    MicrophoneBuilder::get_config

    MicrophoneBuilder::new

    MicrophoneBuilder::open_stream

    MicrophoneBuilder::prefer_buffer_sizes

    fn MicrophoneBuilder::prefer_buffer_sizes(self : MicrophoneBuilder, buffer_sizes : Array[Int]) -> MicrophoneBuilder

    MicrophoneBuilder::prefer_channel_counts

    fn MicrophoneBuilder::prefer_channel_counts(self : MicrophoneBuilder, channel_counts : Array[Int]) -> MicrophoneBuilder

    MicrophoneBuilder::prefer_sample_rates

    fn MicrophoneBuilder::prefer_sample_rates(self : MicrophoneBuilder, sample_rates : Array[Int]) -> MicrophoneBuilder

    MicrophoneBuilder::try_buffer_size

    fn MicrophoneBuilder::try_buffer_size(self : MicrophoneBuilder, buffer_size : Int) -> MicrophoneBuilder raise MicrophoneError

    MicrophoneBuilder::try_channels

    fn MicrophoneBuilder::try_channels(self : MicrophoneBuilder, channel_count : Int) -> MicrophoneBuilder raise MicrophoneError

    MicrophoneBuilder::try_sample_rate

    fn MicrophoneBuilder::try_sample_rate(self : MicrophoneBuilder, sample_rate : Int) -> MicrophoneBuilder raise MicrophoneError

    MicrophoneBuilder::with_error_callback

    Mix

    pub struct Mix {
    inner : DynSource
    }

    impl Source for Mix

    Mix::channels

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

    Mix::current_span_len

    fn Mix::current_span_len(_self : Mix) -> Int?

    Mix::inner

    fn Mix::inner(self : Mix) -> DynSource

    Mix::inner_mut

    fn Mix::inner_mut(self : Mix) -> DynSource

    Mix::into_inner

    fn Mix::into_inner(self : Mix) -> DynSource

    Mix::new

    fn[A : Source, B : Source] Mix::new(left : A, right : B) -> Mix

    Mix::next

    fn Mix::next(self : Mix) -> Double?

    Mix::sample_rate

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

    Mix::total_duration

    fn Mix::total_duration(_self : Mix) ->
    Duration
    ?

    Mix::try_seek

    fn Mix::try_seek(_self : Mix, pos :
    Duration
    ) -> Unit raise SeekError

    Mixer

    pub struct Mixer {
    has_pending :
    Ref
    [Bool]
    pending_sources :
    Ref
    [Array[DynSource]]
    channels : Int
    sample_rate : Int
    }

    Mixer::add

    fn[S : Source] Mixer::add(self : Mixer, source : S) -> Unit

    MixerDeviceSink

    pub struct MixerDeviceSink {
    inner : OutputStream
    }

    MixerDeviceSink::config

    MixerDeviceSink::log_on_drop

    fn MixerDeviceSink::log_on_drop(self : MixerDeviceSink, enabled : Bool) -> Unit

    MixerDeviceSink::mixer

    MixerSource

    pub struct MixerSource {
    current_sources :
    Ref
    [Array[DynSource]]
    input : Mixer
    sample_count :
    Ref
    [Int]
    }

    MixerSource::channels

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

    MixerSource::current_span_len

    fn MixerSource::current_span_len(_self : MixerSource) -> Int?

    MixerSource::next

    fn MixerSource::next(self : MixerSource) -> Double?

    MixerSource::sample_rate

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

    MixerSource::total_duration

    MixerSource::try_seek

    NoiseRngState

    pub struct NoiseRngState {
    next_fn : () -> UInt64
    }

    Output

    pub struct Output {
    inner :
    Device

    default : Bool
    }

    Output::into_inner

    Output::is_default

    fn Output::is_default(self : Output) -> Bool

    Output::name

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

    OutputConfig

    pub struct OutputConfig {
    channel_count : Int
    sample_rate : Int
    buffer_size :
    BufferSize

    sample_format :
    SampleFormat

    } derive(Eq,
    Debug
    )

    OutputConfig::default

    fn OutputConfig::default() -> OutputConfig

    OutputConfig::equal

    OutputConfig::new

    fn OutputConfig::new(channel_count : Int, sample_rate : Int, buffer_size :
    BufferSize
    , sample_format :
    SampleFormat
    ) -> OutputConfig

    OutputConfig::not_equal

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

    OutputConfig::output

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

    OutputConfig::supported_given

    OutputConfig::to_string

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

    OutputConfig::with_buffer_size

    OutputConfig::with_channel_count

    fn OutputConfig::with_channel_count(self : OutputConfig, channel_count : Int) -> OutputConfig

    OutputConfig::with_sample_format

    OutputConfig::with_sample_rate

    fn OutputConfig::with_sample_rate(self : OutputConfig, sample_rate : Int) -> OutputConfig

    OutputStream

    pub struct OutputStream {
    config : OutputStreamConfig
    mixer : Mixer
    _stream :
    Stream

    log_on_drop :
    Ref
    [Bool]
    }

    OutputStream::config

    OutputStream::log_on_drop

    fn OutputStream::log_on_drop(self : OutputStream, enabled : Bool) -> Unit

    OutputStream::mixer

    fn OutputStream::mixer(self : OutputStream) -> Mixer

    OutputStreamBuilder

    pub struct OutputStreamBuilder {
    device :
    Device
    ?
    config : OutputStreamConfig
    error_callback : (
    StreamError
    ) -> Unit
    }

    OutputStreamBuilder::default

    OutputStreamBuilder::from_default_device

    fn OutputStreamBuilder::from_default_device() -> OutputStreamBuilder raise StreamError

    OutputStreamBuilder::from_device

    OutputStreamBuilder::open_default_stream

    fn OutputStreamBuilder::open_default_stream() -> OutputStream raise StreamError

    OutputStreamBuilder::open_stream

    OutputStreamBuilder::open_stream_or_fallback

    fn OutputStreamBuilder::open_stream_or_fallback(self : OutputStreamBuilder) -> OutputStream raise StreamError

    OutputStreamBuilder::with_buffer_size

    OutputStreamBuilder::with_channels

    fn OutputStreamBuilder::with_channels(self : OutputStreamBuilder, channel_count : Int) -> OutputStreamBuilder

    OutputStreamBuilder::with_device

    OutputStreamBuilder::with_error_callback

    OutputStreamBuilder::with_sample_format

    OutputStreamBuilder::with_sample_rate

    fn OutputStreamBuilder::with_sample_rate(self : OutputStreamBuilder, sample_rate : Int) -> OutputStreamBuilder

    OutputStreamBuilder::with_supported_config

    OutputStreamConfig

    #alias(DeviceSinkConfig)
    pub struct OutputStreamConfig {
    channel_count : Int
    sample_rate : Int
    buffer_size :
    BufferSize

    sample_format :
    SampleFormat

    } derive(Eq,
    Debug
    )

    OutputStreamConfig::buffer_size

    OutputStreamConfig::channel_count

    fn OutputStreamConfig::channel_count(self : OutputStreamConfig) -> Int

    OutputStreamConfig::default

    OutputStreamConfig::equal

    OutputStreamConfig::not_equal

    OutputStreamConfig::output

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

    OutputStreamConfig::sample_format

    OutputStreamConfig::sample_rate

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

    OutputStreamConfig::to_string

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

    Pausable

    pub struct Pausable {
    input : DynSource
    paused_channels :
    Ref
    [Int?]
    remaining_paused_samples :
    Ref
    [Int]
    }

    impl Source for Pausable

    Pausable::channels

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

    Pausable::current_span_len

    fn Pausable::current_span_len(_self : Pausable) -> Int?

    Pausable::inner

    fn Pausable::inner(self : Pausable) -> DynSource

    Pausable::inner_mut

    fn Pausable::inner_mut(self : Pausable) -> DynSource

    Pausable::into_inner

    fn Pausable::into_inner(self : Pausable) -> DynSource

    Pausable::is_paused

    fn Pausable::is_paused(self : Pausable) -> Bool

    Pausable::next

    fn Pausable::next(self : Pausable) -> Double?

    Pausable::sample_rate

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

    Pausable::set_paused

    fn Pausable::set_paused(self : Pausable, paused : Bool) -> Unit

    Pausable::total_duration

    Pausable::try_seek

    fn Pausable::try_seek(_self : Pausable, pos :
    Duration
    ) -> Unit raise SeekError

    PeriodicAccess

    pub struct PeriodicAccess {
    input : DynSource
    every_samples : Int
    remaining :
    Ref
    [Int]
    callback : (DynSource) -> Unit
    }

    PeriodicAccess::channels

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

    PeriodicAccess::current_span_len

    fn PeriodicAccess::current_span_len(_self : PeriodicAccess) -> Int?

    PeriodicAccess::inner

    PeriodicAccess::inner_mut

    fn PeriodicAccess::inner_mut(self : PeriodicAccess) -> DynSource

    PeriodicAccess::into_inner

    fn PeriodicAccess::into_inner(self : PeriodicAccess) -> DynSource

    PeriodicAccess::next

    fn PeriodicAccess::next(self : PeriodicAccess) -> Double?

    PeriodicAccess::sample_rate

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

    PeriodicAccess::total_duration

    PeriodicAccess::try_seek

    Pink

    pub struct Pink {
    sample_rate : Int
    rng : NoiseRngState
    prev :
    Ref
    [Double]
    }

    impl Source for Pink

    Pink::channels

    fn Pink::channels(_self : Pink) -> Int

    Pink::current_span_len

    fn Pink::current_span_len(_self : Pink) -> Int?

    Pink::new

    fn Pink::new(sample_rate : Int) -> Pink

    Pink::new_with_rng

    fn[R : NoiseRng] Pink::new_with_rng(sample_rate : Int, rng : R) -> Pink

    Pink::new_with_seed

    fn Pink::new_with_seed(sample_rate : Int, seed : UInt64) -> Pink

    Pink::next

    fn Pink::next(self : Pink) -> Double?

    Pink::sample_rate

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

    Pink::total_duration

    fn Pink::total_duration(_self : Pink) ->
    Duration
    ?

    Pink::try_seek

    fn Pink::try_seek(_self : Pink, pos :
    Duration
    ) -> Unit raise SeekError

    Player

    pub struct Player {
    inner : Sink
    }

    Player::append

    fn[S : Source] Player::append(self : Player, source : S) -> Unit

    Player::clear

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

    Player::connect_new

    fn Player::connect_new(mixer : Mixer) -> Player

    Player::detach

    fn Player::detach(self : Player) -> Unit

    Player::empty

    fn Player::empty(self : Player) -> Bool

    Player::get_pos

    Player::is_paused

    fn Player::is_paused(self : Player) -> Bool

    Player::len

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

    Player::new

    Player::pause

    fn Player::pause(self : Player) -> Unit

    Player::play

    fn Player::play(self : Player) -> Unit

    Player::set_speed

    fn Player::set_speed(self : Player, value : Double) -> Unit

    Player::set_volume

    fn Player::set_volume(self : Player, value : Double) -> Unit

    Player::skip_one

    fn Player::skip_one(self : Player) -> Unit

    Player::sleep_until_end

    fn Player::sleep_until_end(self : Player) -> Unit

    Player::speed

    fn Player::speed(self : Player) -> Double

    Player::stop

    fn Player::stop(self : Player) -> Unit

    Player::try_seek

    fn Player::try_seek(self : Player, pos :
    Duration
    ) -> Unit raise SeekError

    Player::volume

    fn Player::volume(self : Player) -> Double

    QueueSignal

    pub struct QueueSignal {
    done :
    Ref
    [Bool]
    }

    QueueSignal::is_done

    fn QueueSignal::is_done(self : QueueSignal) -> Bool

    QueueSignal::mark_done

    fn QueueSignal::mark_done(self : QueueSignal) -> Unit

    QueuedSource

    type QueuedSource

    Reader

    pub struct Reader {
    bytes : Bytes
    }

    Reader::from_bytes

    fn Reader::from_bytes(bytes : Bytes) -> Reader

    Reader::from_file

    fn Reader::from_file(path : StringView) -> Reader raise PlayError

    Reader::into_bytes

    fn Reader::into_bytes(self : Reader) -> Bytes

    Red

    pub struct Red {
    sample_rate : Int
    white_noise : WhiteUniform
    accumulator :
    Ref
    [Double]
    leak_factor :
    Ref
    [Double]
    scale :
    Ref
    [Double]
    }

    impl Source for Red

    Red::channels

    fn Red::channels(_self : Red) -> Int

    Red::current_span_len

    fn Red::current_span_len(_self : Red) -> Int?

    Red::new

    fn Red::new(sample_rate : Int) -> Red

    Red::new_with_rng

    fn[R : NoiseRng] Red::new_with_rng(sample_rate : Int, rng : R) -> Red

    Red::new_with_seed

    fn Red::new_with_seed(sample_rate : Int, seed : UInt64) -> Red

    Red::next

    fn Red::next(self : Red) -> Double?

    Red::sample_rate

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

    Red::total_duration

    fn Red::total_duration(_self : Red) ->
    Duration
    ?

    Red::try_seek

    fn Red::try_seek(_self : Red, _pos :
    Duration
    ) -> Unit raise SeekError

    Repeat

    pub struct Repeat {
    inner : DynSource
    }

    impl Source for Repeat

    Repeat::channels

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

    Repeat::current_span_len

    fn Repeat::current_span_len(_self : Repeat) -> Int?

    Repeat::inner

    fn Repeat::inner(self : Repeat) -> DynSource

    Repeat::inner_mut

    fn Repeat::inner_mut(self : Repeat) -> DynSource

    Repeat::into_inner

    fn Repeat::into_inner(self : Repeat) -> DynSource

    Repeat::new

    fn[S : Source] Repeat::new(source : S) -> Repeat

    Repeat::next

    fn Repeat::next(self : Repeat) -> Double?

    Repeat::sample_rate

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

    Repeat::total_duration

    Repeat::try_seek

    fn Repeat::try_seek(_self : Repeat, pos :
    Duration
    ) -> Unit raise SeekError

    SampleRateConverter

    pub struct SampleRateConverter {
    inner : DynSource
    to : Int
    channels : Int
    }

    SampleRateConverter::channels

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

    SampleRateConverter::current_span_len

    fn SampleRateConverter::current_span_len(_self : SampleRateConverter) -> Int?

    SampleRateConverter::inner_mut

    SampleRateConverter::into_inner

    SampleRateConverter::new

    fn[S : Source] SampleRateConverter::new(input : S, from : Int, to : Int, num_channels : Int) -> SampleRateConverter

    SampleRateConverter::next

    fn SampleRateConverter::next(self : SampleRateConverter) -> Double?

    SampleRateConverter::sample_rate

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

    SampleRateConverter::total_duration

    SampleRateConverter::try_seek

    SampleTypeConverter

    pub struct SampleTypeConverter {
    inner : DynSource
    }

    SampleTypeConverter::channels

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

    SampleTypeConverter::current_span_len

    fn SampleTypeConverter::current_span_len(_self : SampleTypeConverter) -> Int?

    SampleTypeConverter::inner_mut

    SampleTypeConverter::into_inner

    SampleTypeConverter::new

    SampleTypeConverter::next

    fn SampleTypeConverter::next(self : SampleTypeConverter) -> Double?

    SampleTypeConverter::sample_rate

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

    SampleTypeConverter::total_duration

    SampleTypeConverter::try_seek

    SamplesBuffer

    pub struct SamplesBuffer {
    channels : Int
    sample_rate : Int
    samples : Array[Double]
    cursor :
    Ref
    [Int]
    }

    SamplesBuffer::amplify

    fn SamplesBuffer::amplify(self : SamplesBuffer, factor : Double) -> DynSource

    SamplesBuffer::channels

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

    SamplesBuffer::current_span_len

    fn SamplesBuffer::current_span_len(self : SamplesBuffer) -> Int?

    SamplesBuffer::new

    fn SamplesBuffer::new(channels : Int, sample_rate : Int, samples : Array[Double]) -> SamplesBuffer

    SamplesBuffer::next

    fn SamplesBuffer::next(self : SamplesBuffer) -> Double?

    SamplesBuffer::record_source

    fn[S : Source] SamplesBuffer::record_source(source : S) -> SamplesBuffer

    SamplesBuffer::repeat_infinite

    fn SamplesBuffer::repeat_infinite(self : SamplesBuffer) -> DynSource

    SamplesBuffer::sample_rate

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

    SamplesBuffer::total_duration

    SamplesBuffer::try_seek

    SawtoothWave

    pub struct SawtoothWave {
    inner : SignalGenerator
    }

    SawtoothWave::channels

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

    SawtoothWave::current_span_len

    fn SawtoothWave::current_span_len(_self : SawtoothWave) -> Int?

    SawtoothWave::new

    fn SawtoothWave::new(freq : Double) -> SawtoothWave

    SawtoothWave::next

    fn SawtoothWave::next(self : SawtoothWave) -> Double?

    SawtoothWave::sample_rate

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

    SawtoothWave::total_duration

    SawtoothWave::try_seek

    Settings

    pub struct Settings {
    byte_len : Int?
    coarse_seek : Bool
    gapless : Bool
    hint : String?
    mime_type : String?
    is_seekable : Bool
    } derive(Eq,
    Debug
    )

    impl Show for Settings

    Settings::default

    fn Settings::default() -> Settings

    Settings::equal

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

    Settings::not_equal

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

    Settings::output

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

    Settings::to_repr

    Settings::to_string

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

    SignalFunction

    pub enum SignalFunction {
    Sine
    Square
    Sawtooth
    Triangle
    } derive(Eq,
    Debug
    )

    SignalFunction::equal

    SignalFunction::not_equal

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

    SignalFunction::output

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

    SignalFunction::to_string

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

    SignalGenerator

    pub struct SignalGenerator {
    channels : Int
    sample_rate : Int
    frequency : Double
    function : SignalFunction
    phase :
    Ref
    [Double]
    }

    SignalGenerator::channels

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

    SignalGenerator::current_span_len

    fn SignalGenerator::current_span_len(_self : SignalGenerator) -> Int?

    SignalGenerator::from_function

    fn SignalGenerator::from_function(sample_rate : Int, frequency : Double, function : Function) -> SignalGenerator

    SignalGenerator::new

    fn SignalGenerator::new(sample_rate : Int, frequency : Double, function : SignalFunction) -> SignalGenerator

    SignalGenerator::next

    fn SignalGenerator::next(self : SignalGenerator) -> Double?

    SignalGenerator::sample_rate

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

    SignalGenerator::total_duration

    SignalGenerator::try_seek

    SignalGenerator::with_function

    fn SignalGenerator::with_function(sample_rate : Int, frequency : Double, function : Function) -> SignalGenerator

    SignalGenerator::with_generator

    fn SignalGenerator::with_generator(sample_rate : Int, frequency : Double, function : GeneratorFunction) -> DynSource

    SineWave

    pub struct SineWave {
    inner : SignalGenerator
    }

    impl Source for SineWave

    SineWave::channels

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

    SineWave::current_span_len

    fn SineWave::current_span_len(_self : SineWave) -> Int?

    SineWave::new

    fn SineWave::new(freq : Double) -> SineWave

    SineWave::next

    fn SineWave::next(self : SineWave) -> Double?

    SineWave::sample_rate

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

    SineWave::total_duration

    SineWave::try_seek

    fn SineWave::try_seek(self : SineWave, pos :
    Duration
    ) -> Unit raise SeekError

    Sink

    pub struct Sink {
    queue_tx : SourcesQueueInput
    queue_rx : SourcesQueueOutput
    controls : SinkControls
    detached :
    Ref
    [Bool]
    last_signal :
    Ref
    [QueueSignal?]
    }

    Sink::append

    fn[S : Source] Sink::append(self : Sink, source : S) -> Unit

    Sink::clear

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

    Sink::connect_new

    fn Sink::connect_new(mixer : Mixer) -> Sink

    Sink::detach

    fn Sink::detach(self : Sink) -> Unit

    Sink::empty

    fn Sink::empty(self : Sink) -> Bool

    Sink::get_pos

    Sink::is_paused

    fn Sink::is_paused(self : Sink) -> Bool

    Sink::len

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

    Sink::new

    Sink::pause

    fn Sink::pause(self : Sink) -> Unit

    Sink::play

    fn Sink::play(self : Sink) -> Unit

    Sink::set_speed

    fn Sink::set_speed(self : Sink, value : Double) -> Unit

    Sink::set_volume

    fn Sink::set_volume(self : Sink, value : Double) -> Unit

    Sink::skip_one

    fn Sink::skip_one(self : Sink) -> Unit

    Sink::sleep_until_end

    fn Sink::sleep_until_end(self : Sink) -> Unit

    Sink::speed

    fn Sink::speed(self : Sink) -> Double

    Sink::stop

    fn Sink::stop(self : Sink) -> Unit

    Sink::try_seek

    fn Sink::try_seek(self : Sink, pos :
    Duration
    ) -> Unit raise SeekError

    Sink::volume

    fn Sink::volume(self : Sink) -> Double

    SinkHandle

    pub struct SinkHandle {
    _sink : MixerDeviceSink
    }

    SkipDuration

    pub struct SkipDuration {
    inner : DynSource
    }

    SkipDuration::channels

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

    SkipDuration::current_span_len

    fn SkipDuration::current_span_len(_self : SkipDuration) -> Int?

    SkipDuration::inner

    fn SkipDuration::inner(self : SkipDuration) -> DynSource

    SkipDuration::inner_mut

    fn SkipDuration::inner_mut(self : SkipDuration) -> DynSource

    SkipDuration::into_inner

    fn SkipDuration::into_inner(self : SkipDuration) -> DynSource

    SkipDuration::new

    SkipDuration::next

    fn SkipDuration::next(self : SkipDuration) -> Double?

    SkipDuration::sample_rate

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

    SkipDuration::total_duration

    SkipDuration::try_seek

    Skippable

    pub struct Skippable {
    input : DynSource
    do_skip :
    Ref
    [Bool]
    }

    impl Source for Skippable

    Skippable::channels

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

    Skippable::current_span_len

    fn Skippable::current_span_len(_self : Skippable) -> Int?

    Skippable::inner

    fn Skippable::inner(self : Skippable) -> DynSource

    Skippable::inner_mut

    fn Skippable::inner_mut(self : Skippable) -> DynSource

    Skippable::into_inner

    fn Skippable::into_inner(self : Skippable) -> DynSource

    Skippable::next

    fn Skippable::next(self : Skippable) -> Double?

    Skippable::sample_rate

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

    Skippable::skip

    fn Skippable::skip(self : Skippable) -> Unit

    Skippable::total_duration

    Skippable::try_seek

    fn Skippable::try_seek(_self : Skippable, pos :
    Duration
    ) -> Unit raise SeekError

    SourcesQueueInput

    pub struct SourcesQueueInput {
    next_sounds :
    Ref
    [Array[QueuedSource]]
    keep_alive_if_empty :
    Ref
    [Bool]
    }

    SourcesQueueInput::append

    fn[S : Source] SourcesQueueInput::append(self : SourcesQueueInput, source : S) -> Unit

    SourcesQueueInput::append_with_signal

    fn[S : Source] SourcesQueueInput::append_with_signal(self : SourcesQueueInput, source : S) -> QueueSignal

    SourcesQueueInput::clear

    fn SourcesQueueInput::clear(self : SourcesQueueInput) -> Int

    SourcesQueueInput::set_keep_alive_if_empty

    fn SourcesQueueInput::set_keep_alive_if_empty(self : SourcesQueueInput, keep_alive_if_empty : Bool) -> Unit

    SourcesQueueOutput

    pub struct SourcesQueueOutput {
    current :
    Ref
    [DynSource]
    current_is_fallback :
    Ref
    [Bool]
    prefetched :
    Ref
    [Double?]
    has_prefetched :
    Ref
    [Bool]
    signal_after_end :
    Ref
    [QueueSignal?]
    samples_consumed_in_span :
    Ref
    [Int]
    padding_samples_remaining :
    Ref
    [Int]
    input : SourcesQueueInput
    }

    SourcesQueueOutput::channels

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

    SourcesQueueOutput::current_span_len

    fn SourcesQueueOutput::current_span_len(self : SourcesQueueOutput) -> Int?

    SourcesQueueOutput::next

    fn SourcesQueueOutput::next(self : SourcesQueueOutput) -> Double?

    SourcesQueueOutput::sample_rate

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

    SourcesQueueOutput::skip_one

    fn SourcesQueueOutput::skip_one(self : SourcesQueueOutput) -> Unit

    SourcesQueueOutput::total_duration

    SourcesQueueOutput::try_seek

    Spatial

    pub struct Spatial {
    inner : SpatialSource
    }

    impl Source for Spatial

    Spatial::channels

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

    Spatial::current_span_len

    fn Spatial::current_span_len(_self : Spatial) -> Int?

    Spatial::inner

    fn Spatial::inner(self : Spatial) -> SpatialSource

    Spatial::inner_mut

    fn Spatial::inner_mut(self : Spatial) -> SpatialSource

    Spatial::into_inner

    fn Spatial::into_inner(self : Spatial) -> SpatialSource

    Spatial::new

    fn[S : Source] Spatial::new(input : S, emitter_position : Array[Double], left_ear : Array[Double], right_ear : Array[Double]) -> Spatial

    Spatial::next

    fn Spatial::next(self : Spatial) -> Double?

    Spatial::sample_rate

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

    Spatial::set_positions

    fn Spatial::set_positions(self : Spatial, emitter_position : Array[Double], left_ear : Array[Double], right_ear : Array[Double]) -> Unit

    Spatial::total_duration

    Spatial::try_seek

    fn Spatial::try_seek(_self : Spatial, pos :
    Duration
    ) -> Unit raise SeekError

    SpatialPlayer

    pub struct SpatialPlayer {
    inner : SpatialSink
    }

    Naming-compatible wrapper around SpatialSink.

    SpatialPlayer::append

    fn[S : Source] SpatialPlayer::append(self : SpatialPlayer, source : S) -> Unit

    SpatialPlayer::clear

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

    SpatialPlayer::connect_new

    fn SpatialPlayer::connect_new(mixer : Mixer, emitter_position : Array[Double], left_ear : Array[Double], right_ear : Array[Double]) -> SpatialPlayer

    SpatialPlayer::detach

    fn SpatialPlayer::detach(self : SpatialPlayer) -> Unit

    SpatialPlayer::empty

    fn SpatialPlayer::empty(self : SpatialPlayer) -> Bool

    SpatialPlayer::is_paused

    fn SpatialPlayer::is_paused(self : SpatialPlayer) -> Bool

    SpatialPlayer::len

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

    SpatialPlayer::pause

    fn SpatialPlayer::pause(self : SpatialPlayer) -> Unit

    SpatialPlayer::play

    fn SpatialPlayer::play(self : SpatialPlayer) -> Unit

    SpatialPlayer::set_emitter_position

    fn SpatialPlayer::set_emitter_position(self : SpatialPlayer, pos : Array[Double]) -> Unit

    SpatialPlayer::set_left_ear_position

    fn SpatialPlayer::set_left_ear_position(self : SpatialPlayer, pos : Array[Double]) -> Unit

    SpatialPlayer::set_right_ear_position

    fn SpatialPlayer::set_right_ear_position(self : SpatialPlayer, pos : Array[Double]) -> Unit

    SpatialPlayer::set_speed

    fn SpatialPlayer::set_speed(self : SpatialPlayer, value : Double) -> Unit

    SpatialPlayer::set_volume

    fn SpatialPlayer::set_volume(self : SpatialPlayer, value : Double) -> Unit

    SpatialPlayer::sleep_until_end

    fn SpatialPlayer::sleep_until_end(self : SpatialPlayer) -> Unit

    SpatialPlayer::speed

    fn SpatialPlayer::speed(self : SpatialPlayer) -> Double

    SpatialPlayer::stop

    fn SpatialPlayer::stop(self : SpatialPlayer) -> Unit

    SpatialPlayer::try_seek

    SpatialPlayer::volume

    fn SpatialPlayer::volume(self : SpatialPlayer) -> Double

    SpatialSink

    pub struct SpatialSink {
    sink : Sink
    emitter_position :
    Ref
    [Array[Double]]
    left_ear :
    Ref
    [Array[Double]]
    right_ear :
    Ref
    [Array[Double]]
    }

    SpatialSink::append

    fn[S : Source] SpatialSink::append(self : SpatialSink, source : S) -> Unit

    SpatialSink::clear

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

    SpatialSink::connect_new

    fn SpatialSink::connect_new(mixer : Mixer, emitter_position : Array[Double], left_ear : Array[Double], right_ear : Array[Double]) -> SpatialSink

    SpatialSink::detach

    fn SpatialSink::detach(self : SpatialSink) -> Unit

    SpatialSink::empty

    fn SpatialSink::empty(self : SpatialSink) -> Bool

    SpatialSink::is_paused

    fn SpatialSink::is_paused(self : SpatialSink) -> Bool

    SpatialSink::len

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

    SpatialSink::pause

    fn SpatialSink::pause(self : SpatialSink) -> Unit

    SpatialSink::play

    fn SpatialSink::play(self : SpatialSink) -> Unit

    SpatialSink::set_emitter_position

    fn SpatialSink::set_emitter_position(self : SpatialSink, pos : Array[Double]) -> Unit

    SpatialSink::set_left_ear_position

    fn SpatialSink::set_left_ear_position(self : SpatialSink, pos : Array[Double]) -> Unit

    SpatialSink::set_right_ear_position

    fn SpatialSink::set_right_ear_position(self : SpatialSink, pos : Array[Double]) -> Unit

    SpatialSink::set_speed

    fn SpatialSink::set_speed(self : SpatialSink, value : Double) -> Unit

    SpatialSink::set_volume

    fn SpatialSink::set_volume(self : SpatialSink, value : Double) -> Unit

    SpatialSink::skip_one

    fn SpatialSink::skip_one(self : SpatialSink) -> Unit

    SpatialSink::sleep_until_end

    fn SpatialSink::sleep_until_end(self : SpatialSink) -> Unit

    SpatialSink::speed

    fn SpatialSink::speed(self : SpatialSink) -> Double

    SpatialSink::stop

    fn SpatialSink::stop(self : SpatialSink) -> Unit

    SpatialSink::try_seek

    SpatialSink::volume

    fn SpatialSink::volume(self : SpatialSink) -> Double

    SpatialSource

    pub struct SpatialSource {
    input : DynSource
    emitter_position :
    Ref
    [Array[Double]]
    left_ear :
    Ref
    [Array[Double]]
    right_ear :
    Ref
    [Array[Double]]
    left_gain :
    Ref
    [Double]
    right_gain :
    Ref
    [Double]
    pending_mono :
    Ref
    [Double]
    has_pending :
    Ref
    [Bool]
    pending_channel :
    Ref
    [Int]
    }

    SpatialSource::channels

    fn SpatialSource::channels(_self : SpatialSource) -> Int

    SpatialSource::current_span_len

    fn SpatialSource::current_span_len(self : SpatialSource) -> Int?

    SpatialSource::new

    fn[S : Source] SpatialSource::new(input : S, emitter_position : Array[Double], left_ear : Array[Double], right_ear : Array[Double]) -> SpatialSource

    SpatialSource::next

    fn SpatialSource::next(self : SpatialSource) -> Double?

    SpatialSource::sample_rate

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

    SpatialSource::set_positions

    fn SpatialSource::set_positions(self : SpatialSource, emitter_position : Array[Double], left_ear : Array[Double], right_ear : Array[Double]) -> Unit

    SpatialSource::total_duration

    SpatialSource::try_seek

    SpeakersBuilder

    SpeakersBuilder::config

    SpeakersBuilder::default_config

    fn SpeakersBuilder::default_config(self : SpeakersBuilder) -> SpeakersBuilder raise SpeakersError

    SpeakersBuilder::default_device

    fn SpeakersBuilder::default_device(self : SpeakersBuilder) -> SpeakersBuilder raise SpeakersError

    SpeakersBuilder::device

    SpeakersBuilder::get_config

    SpeakersBuilder::new

    SpeakersBuilder::open_mixer

    SpeakersBuilder::play

    fn[S : FixedSource] SpeakersBuilder::play(self : SpeakersBuilder, source : S) -> SinkHandle raise SpeakersPlayError

    SpeakersBuilder::prefer_buffer_sizes

    fn SpeakersBuilder::prefer_buffer_sizes(self : SpeakersBuilder, buffer_sizes : Array[Int]) -> SpeakersBuilder

    SpeakersBuilder::prefer_channel_counts

    fn SpeakersBuilder::prefer_channel_counts(self : SpeakersBuilder, channel_counts : Array[Int]) -> SpeakersBuilder

    SpeakersBuilder::prefer_sample_rates

    fn SpeakersBuilder::prefer_sample_rates(self : SpeakersBuilder, sample_rates : Array[Int]) -> SpeakersBuilder

    SpeakersBuilder::try_buffer_size

    fn SpeakersBuilder::try_buffer_size(self : SpeakersBuilder, buffer_size : Int) -> SpeakersBuilder raise SpeakersError

    SpeakersBuilder::try_channels

    fn SpeakersBuilder::try_channels(self : SpeakersBuilder, channel_count : Int) -> SpeakersBuilder raise SpeakersError

    SpeakersBuilder::try_sample_rate

    fn SpeakersBuilder::try_sample_rate(self : SpeakersBuilder, sample_rate : Int) -> SpeakersBuilder raise SpeakersError

    SpeakersBuilder::with_error_callback

    Speed

    pub struct Speed {
    input : DynSource
    factor :
    Ref
    [Double]
    }

    impl Source for Speed

    Speed::channels

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

    Speed::current_span_len

    fn Speed::current_span_len(_self : Speed) -> Int?

    Speed::inner

    fn Speed::inner(self : Speed) -> DynSource

    Speed::inner_mut

    fn Speed::inner_mut(self : Speed) -> DynSource

    Speed::into_inner

    fn Speed::into_inner(self : Speed) -> DynSource

    Speed::new

    fn[S : Source] Speed::new(source : S, ratio : Double) -> Speed

    Speed::next

    fn Speed::next(self : Speed) -> Double?

    Speed::sample_rate

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

    Speed::set_factor

    fn Speed::set_factor(self : Speed, factor : Double) -> Unit

    Speed::total_duration

    Speed::try_seek

    fn Speed::try_seek(_self : Speed, pos :
    Duration
    ) -> Unit raise SeekError

    SquareWave

    pub struct SquareWave {
    inner : SignalGenerator
    }

    SquareWave::channels

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

    SquareWave::current_span_len

    fn SquareWave::current_span_len(_self : SquareWave) -> Int?

    SquareWave::new

    fn SquareWave::new(freq : Double) -> SquareWave

    SquareWave::next

    fn SquareWave::next(self : SquareWave) -> Double?

    SquareWave::sample_rate

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

    SquareWave::total_duration

    SquareWave::try_seek

    StaticSamplesBuffer

    pub struct StaticSamplesBuffer {
    channels : Int
    sample_rate : Int
    samples : Array[Double]
    cursor :
    Ref
    [Int]
    }

    StaticSamplesBuffer::channels

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

    StaticSamplesBuffer::current_span_len

    fn StaticSamplesBuffer::current_span_len(_self : StaticSamplesBuffer) -> Int?

    StaticSamplesBuffer::new

    fn StaticSamplesBuffer::new(channels : Int, sample_rate : Int, samples : Array[Double]) -> StaticSamplesBuffer

    StaticSamplesBuffer::next

    fn StaticSamplesBuffer::next(self : StaticSamplesBuffer) -> Double?

    StaticSamplesBuffer::sample_rate

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

    StaticSamplesBuffer::total_duration

    StaticSamplesBuffer::try_seek

    Stoppable

    pub struct Stoppable {
    input : DynSource
    stopped :
    Ref
    [Bool]
    }

    impl Source for Stoppable

    Stoppable::channels

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

    Stoppable::current_span_len

    fn Stoppable::current_span_len(_self : Stoppable) -> Int?

    Stoppable::inner

    fn Stoppable::inner(self : Stoppable) -> DynSource

    Stoppable::inner_mut

    fn Stoppable::inner_mut(self : Stoppable) -> DynSource

    Stoppable::into_inner

    fn Stoppable::into_inner(self : Stoppable) -> DynSource

    Stoppable::next

    fn Stoppable::next(self : Stoppable) -> Double?

    Stoppable::sample_rate

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

    Stoppable::stop

    fn Stoppable::stop(self : Stoppable) -> Unit

    Stoppable::total_duration

    Stoppable::try_seek

    fn Stoppable::try_seek(_self : Stoppable, pos :
    Duration
    ) -> Unit raise SeekError

    TakeDuration

    pub struct TakeDuration {
    inner : DynSource
    requested_duration :
    Duration

    requested_samples : Int
    remaining_samples :
    Ref
    [Int]
    filter_fadeout :
    Ref
    [Bool]
    }

    TakeDuration::channels

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

    TakeDuration::clear_filter

    fn TakeDuration::clear_filter(self : TakeDuration) -> Unit

    TakeDuration::current_span_len

    fn TakeDuration::current_span_len(_self : TakeDuration) -> Int?

    TakeDuration::inner

    fn TakeDuration::inner(self : TakeDuration) -> DynSource

    TakeDuration::inner_mut

    fn TakeDuration::inner_mut(self : TakeDuration) -> DynSource

    TakeDuration::into_inner

    fn TakeDuration::into_inner(self : TakeDuration) -> DynSource

    TakeDuration::new

    TakeDuration::next

    fn TakeDuration::next(self : TakeDuration) -> Double?

    TakeDuration::sample_rate

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

    TakeDuration::set_filter_fadeout

    fn TakeDuration::set_filter_fadeout(self : TakeDuration) -> Unit

    TakeDuration::total_duration

    TakeDuration::try_seek

    TrackPosition

    pub struct TrackPosition {
    input : DynSource
    samples_counted :
    Ref
    [Int]
    offset_duration :
    Ref
    [
    Duration
    ]
    current_span_sample_rate :
    Ref
    [Int]
    current_span_channels :
    Ref
    [Int]
    current_span_len :
    Ref
    [Int?]
    }

    TrackPosition::channels

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

    TrackPosition::current_span_len

    fn TrackPosition::current_span_len(_self : TrackPosition) -> Int?

    TrackPosition::inner

    TrackPosition::inner_mut

    fn TrackPosition::inner_mut(self : TrackPosition) -> DynSource

    TrackPosition::into_inner

    fn TrackPosition::into_inner(self : TrackPosition) -> DynSource

    TrackPosition::next

    fn TrackPosition::next(self : TrackPosition) -> Double?

    TrackPosition::sample_rate

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

    TrackPosition::total_duration

    TrackPosition::try_seek

    TriangleWave

    pub struct TriangleWave {
    inner : SignalGenerator
    }

    TriangleWave::channels

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

    TriangleWave::current_span_len

    fn TriangleWave::current_span_len(_self : TriangleWave) -> Int?

    TriangleWave::new

    fn TriangleWave::new(freq : Double) -> TriangleWave

    TriangleWave::next

    fn TriangleWave::next(self : TriangleWave) -> Double?

    TriangleWave::sample_rate

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

    TriangleWave::total_duration

    TriangleWave::try_seek

    UniformSourceIterator

    pub struct UniformSourceIterator {
    input : DynSource
    target_channels : Int
    target_sample_rate : Int
    total_duration :
    Duration
    ?
    }

    UniformSourceIterator::channels

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

    UniformSourceIterator::current_span_len

    fn UniformSourceIterator::current_span_len(_self : UniformSourceIterator) -> Int?

    UniformSourceIterator::inner_mut

    UniformSourceIterator::new

    fn[S : Source] UniformSourceIterator::new(source : S, target_channels : Int, target_sample_rate : Int) -> UniformSourceIterator

    UniformSourceIterator::next

    fn UniformSourceIterator::next(self : UniformSourceIterator) -> Double?

    UniformSourceIterator::sample_rate

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

    UniformSourceIterator::total_duration

    UniformSourceIterator::try_seek

    Velvet

    pub struct Velvet {
    sample_rate : Int
    rng : NoiseRngState
    grid_size :
    Ref
    [Double]
    grid_pos :
    Ref
    [Double]
    impulse_pos :
    Ref
    [Double]
    }

    impl Source for Velvet

    Velvet::channels

    fn Velvet::channels(_self : Velvet) -> Int

    Velvet::current_span_len

    fn Velvet::current_span_len(_self : Velvet) -> Int?

    Velvet::new

    fn Velvet::new(sample_rate : Int) -> Velvet

    Velvet::new_with_density

    fn Velvet::new_with_density(sample_rate : Int, density : Double) -> Velvet

    Velvet::new_with_density_and_rng

    fn[R : NoiseRng] Velvet::new_with_density_and_rng(sample_rate : Int, density : Double, rng : R) -> Velvet

    Velvet::new_with_density_and_seed

    fn Velvet::new_with_density_and_seed(sample_rate : Int, density : Double, seed : UInt64) -> Velvet

    Velvet::new_with_rng

    fn[R : NoiseRng] Velvet::new_with_rng(sample_rate : Int, rng : R) -> Velvet

    Velvet::new_with_seed

    fn Velvet::new_with_seed(sample_rate : Int, seed : UInt64) -> Velvet

    Velvet::next

    fn Velvet::next(self : Velvet) -> Double?

    Velvet::sample_rate

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

    Velvet::total_duration

    Velvet::try_seek

    fn Velvet::try_seek(_self : Velvet, _pos :
    Duration
    ) -> Unit raise SeekError

    Violet

    pub struct Violet {
    sample_rate : Int
    blue_noise : Blue
    prev :
    Ref
    [Double]
    }

    impl Source for Violet

    Violet::channels

    fn Violet::channels(_self : Violet) -> Int

    Violet::current_span_len

    fn Violet::current_span_len(_self : Violet) -> Int?

    Violet::new

    fn Violet::new(sample_rate : Int) -> Violet

    Violet::new_with_rng

    fn[R : NoiseRng] Violet::new_with_rng(sample_rate : Int, rng : R) -> Violet

    Violet::new_with_seed

    fn Violet::new_with_seed(sample_rate : Int, seed : UInt64) -> Violet

    Violet::next

    fn Violet::next(self : Violet) -> Double?

    Violet::sample_rate

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

    Violet::total_duration

    Violet::try_seek

    fn Violet::try_seek(_self : Violet, _pos :
    Duration
    ) -> Unit raise SeekError

    WhiteGaussian

    pub struct WhiteGaussian {
    sample_rate : Int
    rng : NoiseRngState
    }

    WhiteGaussian::channels

    fn WhiteGaussian::channels(_self : WhiteGaussian) -> Int

    WhiteGaussian::current_span_len

    fn WhiteGaussian::current_span_len(_self : WhiteGaussian) -> Int?

    WhiteGaussian::mean

    fn WhiteGaussian::mean(_self : WhiteGaussian) -> Double

    WhiteGaussian::new

    fn WhiteGaussian::new(sample_rate : Int) -> WhiteGaussian

    WhiteGaussian::new_with_rng

    fn[R : NoiseRng] WhiteGaussian::new_with_rng(sample_rate : Int, rng : R) -> WhiteGaussian

    WhiteGaussian::new_with_seed

    fn WhiteGaussian::new_with_seed(sample_rate : Int, seed : UInt64) -> WhiteGaussian

    WhiteGaussian::next

    fn WhiteGaussian::next(self : WhiteGaussian) -> Double?

    WhiteGaussian::sample_rate

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

    WhiteGaussian::std_dev

    fn WhiteGaussian::std_dev(_self : WhiteGaussian) -> Double

    WhiteGaussian::total_duration

    WhiteGaussian::try_seek

    WhiteTriangular

    pub struct WhiteTriangular {
    sample_rate : Int
    rng : NoiseRngState
    }

    WhiteTriangular::channels

    fn WhiteTriangular::channels(_self : WhiteTriangular) -> Int

    WhiteTriangular::current_span_len

    fn WhiteTriangular::current_span_len(_self : WhiteTriangular) -> Int?

    WhiteTriangular::new

    fn WhiteTriangular::new(sample_rate : Int) -> WhiteTriangular

    WhiteTriangular::new_with_rng

    fn[R : NoiseRng] WhiteTriangular::new_with_rng(sample_rate : Int, rng : R) -> WhiteTriangular

    WhiteTriangular::new_with_seed

    fn WhiteTriangular::new_with_seed(sample_rate : Int, seed : UInt64) -> WhiteTriangular

    WhiteTriangular::next

    fn WhiteTriangular::next(self : WhiteTriangular) -> Double?

    WhiteTriangular::sample_rate

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

    WhiteTriangular::std_dev

    fn WhiteTriangular::std_dev(_self : WhiteTriangular) -> Double

    WhiteTriangular::total_duration

    WhiteTriangular::try_seek

    WhiteUniform

    pub struct WhiteUniform {
    sample_rate : Int
    rng : NoiseRngState
    }

    WhiteUniform::channels

    fn WhiteUniform::channels(_self : WhiteUniform) -> Int

    WhiteUniform::current_span_len

    fn WhiteUniform::current_span_len(_self : WhiteUniform) -> Int?

    WhiteUniform::new

    fn WhiteUniform::new(sample_rate : Int) -> WhiteUniform

    WhiteUniform::new_with_rng

    fn[R : NoiseRng] WhiteUniform::new_with_rng(sample_rate : Int, rng : R) -> WhiteUniform

    WhiteUniform::new_with_seed

    fn WhiteUniform::new_with_seed(sample_rate : Int, seed : UInt64) -> WhiteUniform

    WhiteUniform::next

    fn WhiteUniform::next(self : WhiteUniform) -> Double?

    WhiteUniform::sample_rate

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

    WhiteUniform::std_dev

    fn WhiteUniform::std_dev(_self : WhiteUniform) -> Double

    WhiteUniform::total_duration

    WhiteUniform::try_seek

    Zero

    pub struct Zero {
    inner : DynSource
    }

    impl Source for Zero

    Zero::channels

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

    Zero::current_span_len

    fn Zero::current_span_len(_self : Zero) -> Int?

    Zero::inner

    fn Zero::inner(self : Zero) -> DynSource

    Zero::inner_mut

    fn Zero::inner_mut(self : Zero) -> DynSource

    Zero::into_inner

    fn Zero::into_inner(self : Zero) -> DynSource

    Zero::new

    fn Zero::new(channels : Int, sample_rate : Int) -> Zero

    Zero::new_samples

    fn Zero::new_samples(channels : Int, sample_rate : Int, num_samples : Int) -> Zero

    Zero::next

    fn Zero::next(self : Zero) -> Double?

    Zero::sample_rate

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

    Zero::total_duration

    fn Zero::total_duration(_self : Zero) ->
    Duration
    ?

    Zero::try_seek

    fn Zero::try_seek(_self : Zero, pos :
    Duration
    ) -> Unit raise SeekError

    amplify

    fn[S : Source] amplify(source : S, factor : Double) -> DynSource

    amplify_decibel

    fn[S : Source] amplify_decibel(source : S, value : Double) -> DynSource

    amplify_normalized

    fn[S : Source] amplify_normalized(source : S, value : Double) -> DynSource

    automatic_gain_control

    fn[S : Source] automatic_gain_control(source : S, settings : AutomaticGainControlSettings) -> AutomaticGainControl

    automatic_gain_control_with_params

    fn[S : Source] automatic_gain_control_with_params(source : S, target_level : Double, attack_time :
    Duration
    , release_time :
    Duration
    , absolute_max_gain : Double) -> AutomaticGainControl

    available_inputs

    fn available_inputs() -> Array[Input] raise MicrophoneListError

    available_outputs

    fn available_outputs() -> Array[Output] raise SpeakersListError

    buffer_from_iter

    fn buffer_from_iter(channels : Int, sample_rate : Int, samples : Array[Double]) -> SamplesBuffer

    buffered

    fn[S : Source] buffered(source : S) -> SamplesBuffer

    channel_volume

    fn[S : Source] channel_volume(source : S, channel_factors : Array[Double]) -> DynSource

    chirp

    fn chirp(sample_rate : Int, start_frequency : Double, end_frequency : Double, duration :
    Duration
    ) -> Chirp

    convert_channels

    fn[S : Source] convert_channels(source : S, target_channels : Int) -> DynSource

    convert_sample_rate

    fn[S : Source] convert_sample_rate(source : S, target_sample_rate : Int) -> DynSource

    crossfade

    fn[A : Source, B : Source] crossfade(left : A, right : B, duration :
    Duration
    ) -> DynSource

    db_to_linear

    fn db_to_linear(decibels : Double) -> Double

    delay

    fn[S : Source] delay(source : S, duration :
    Duration
    ) -> DynSource

    distortion

    fn[S : Source] distortion(source : S, gain : Double, threshold : Double) -> DynSource

    distortion_threshold

    fn[S : Source] distortion_threshold(source : S, threshold : Double) -> DynSource

    distortion_with_gain

    fn[S : Source] distortion_with_gain(source : S, gain : Double, threshold : Double) -> DynSource

    dither

    fn[S : Source] dither(source : S, target_bits : BitDepth, algorithm : DitherAlgorithm) -> Dither

    empty

    fn empty(channels : Int, sample_rate : Int) -> DynSource

    fade_in

    fn[S : Source] fade_in(source : S, duration :
    Duration
    ) -> DynSource

    fade_out

    fn[S : Source] fade_out(source : S, duration :
    Duration
    ) -> DynSource

    fadein

    fn[S : Source] fadein(source : S, duration :
    Duration
    ) -> DynSource

    fadeout

    fn[S : Source] fadeout(source : S, duration :
    Duration
    ) -> DynSource

    from_factory

    fn[S : Source] from_factory(factory : () -> S?) -> FromFactoryIter[S]

    from_iter

    fn[S : Source] from_iter(sources : Array[S]) -> FromIter

    high_pass

    fn[S : Source] high_pass(source : S, freq : Int) -> BltFilter

    high_pass_with_q

    fn[S : Source] high_pass_with_q(source : S, freq : Int, q : Double) -> BltFilter

    is_exhausted

    fn[S : Source] is_exhausted(source : S) -> Bool

    lerp

    fn lerp(first : Double, second : Double, numerator : Int, denominator : Int) -> Double

    limit

    fn[S : Source] limit(source : S, settings : LimitSettings) -> DynSource

    limit_range

    fn[S : Source] limit_range(source : S, min_value : Double, max_value : Double) -> DynSource

    linear_gain_ramp

    fn[S : Source] linear_gain_ramp(source : S, start_gain : Double, end_gain : Double, duration :
    Duration
    ) -> DynSource

    linear_gain_ramp_with_clamp

    fn[S : Source] linear_gain_ramp_with_clamp(source : S, start_gain : Double, end_gain : Double, duration :
    Duration
    , clamp_end : Bool) -> DynSource

    linear_to_db

    fn linear_to_db(linear : Double) -> Double

    low_pass

    fn[S : Source] low_pass(source : S, freq : Int) -> BltFilter

    low_pass_with_q

    fn[S : Source] low_pass_with_q(source : S, freq : Int, q : Double) -> BltFilter

    mix

    fn[A : Source, B : Source] mix(left : A, right : B) -> DynSource

    mixer

    fn mixer(channels : Int, sample_rate : Int) -> (Mixer, MixerSource)

    output_to_wav

    fn[S : Source] output_to_wav(source : S, wav_file : StringView) -> Unit raise ToWavError

    pausable

    fn[S : Source] pausable(source : S, paused : Bool) -> Pausable

    periodic

    fn[S : Source] periodic(source : S, period :
    Duration
    , callback : () -> Unit) -> PeriodicAccess

    periodic_access

    fn[S : Source] periodic_access(source : S, every_samples : Int, callback : () -> Unit) -> PeriodicAccess

    periodic_access_with_source

    fn[S : Source] periodic_access_with_source(source : S, every_samples : Int, callback : (DynSource) -> Unit) -> PeriodicAccess

    periodic_with_source

    fn[S : Source] periodic_with_source(source : S, period :
    Duration
    , callback : (DynSource) -> Unit) -> PeriodicAccess

    pink

    fn pink(sample_rate : Int) -> Pink

    play

    fn play(mixer : Mixer, reader : Reader) -> Player raise PlayError

    play_bytes

    fn play_bytes(mixer : Mixer, bytes : Bytes) -> Player raise PlayError

    play_file

    fn play_file(mixer : Mixer, path : StringView) -> Player raise PlayError

    play_reader

    fn play_reader(mixer : Mixer, reader : Reader) -> Player raise PlayError

    queue

    fn queue(keep_alive_if_empty : Bool) -> (SourcesQueueInput, SourcesQueueOutput)

    record

    fn[S : Source] record(source : S) -> SamplesBuffer

    repeat

    fn[S : Source] repeat(source : S) -> DynSource

    repeat_infinite

    fn[S : Source] repeat_infinite(source : S) -> DynSource

    reverb

    fn[S : Source] reverb(source : S, duration :
    Duration
    , amplitude : Double) -> DynSource

    skip_duration

    fn[S : Source] skip_duration(source : S, duration :
    Duration
    ) -> DynSource

    skippable

    fn[S : Source] skippable(source : S) -> Skippable

    speed

    fn[S : Source] speed(source : S, ratio : Double) -> DynSource

    stoppable

    fn[S : Source] stoppable(source : S) -> Stoppable

    take

    fn[S : Source] take(source : S, sample_count : Int) -> DynSource

    take_crossfade_with

    fn[A : Source, B : Source] take_crossfade_with(left : A, right : B, duration :
    Duration
    ) -> DynSource

    take_duration

    fn[S : Source] take_duration(source : S, duration :
    Duration
    ) -> DynSource

    to_dyn

    fn[S : Source] to_dyn(source : S) -> DynSource

    track_position

    fn[S : Source] track_position(source : S) -> TrackPosition

    uniform

    fn[S : Source] uniform(source : S, target_channels : Int, target_sample_rate : Int) -> DynSource

    wav_to_file

    fn[S : Source] wav_to_file(source : S, wav_file : StringView) -> Unit raise ToWavError

    wav_to_writer

    fn[S : Source, W : WavWriter] wav_to_writer(source : S, writer : W) -> Unit raise ToWavError

    white

    fn white(sample_rate : Int) -> WhiteUniform

    zero

    fn zero(channels : Int, sample_rate : Int) -> DynSource

    zero_samples

    fn zero_samples(channels : Int, sample_rate : Int, sample_count : Int) -> DynSource