moon_rodio

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

audio
moon add Milky2018/moon_rodio@0.3.4
Download zip
Author
Version
0.3.4
License
Apache-2.0
Last updated
12 days ago
Downloads
6K

Dependencies

README

#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
)

#
DecoderError

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

#
MicrophoneError

#
MicrophoneListError

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

#
PlayError

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

impl Show for PlayError

#
SeekError

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

impl Show for SeekError

#
SeekError::source_intact

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

#
SpeakersError

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

#
SpeakersListError

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

#
SpeakersPlayError

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

#
StreamError

impl Show for StreamError

#
ToWavError

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

impl Show for ToWavError

#
Amplify

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

impl Source for Amplify

#
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::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

#
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::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

#
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::get

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

#
BitDepth::new

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

#
BltFilter

impl Source for BltFilter

#
BltFilter::channels

fn BltFilter::channels(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

#
BltMode

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

impl Show for BltMode

#
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::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

#
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::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

#
Buffered

pub struct Buffered {
inner : SamplesBuffer
}

impl Source for Buffered

#
Buffered::channels

fn Buffered::channels(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

#
ChannelCountConverter

pub struct ChannelCountConverter {
inner : DynSource
to : Int
}

#
ChannelCountConverter::inner_mut

#
ChannelCountConverter::into_inner

#
ChannelCountConverter::new

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

#
ChannelVolume

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

#
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::set_volume

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

#
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::next

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

#
Chirp::sample_rate

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

#
ControlledQueueSource

pub struct ControlledQueueSource {
inner : SourcesQueueOutput
controls : SinkControls
}

#
ControlledQueueSource::channels

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

#
ControlledQueueSource::next

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

#
ControlledQueueSource::sample_rate

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

#
Crossfade

pub struct Crossfade {
inner : DynSource
}

impl Source for Crossfade

#
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

#
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::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::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

#
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
)

#
Delay

pub struct Delay {
inner : DynSource
}

impl Source for Delay

#
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

#
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::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::set_gain

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

#
Distortion::set_threshold

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

#
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::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

#
DitherAlgorithm

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

#
DitherAlgorithm::gpdf

#
DitherAlgorithm::high_pass

fn DitherAlgorithm::high_pass() -> DitherAlgorithm

#
DitherAlgorithm::rpdf

#
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::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

#
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::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

#
EmptyCallback

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

#
EmptyCallback::channels

fn EmptyCallback::channels(_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

#
FadeIn

pub struct FadeIn {
inner : DynSource
}

impl Source for FadeIn

#
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

#
FadeOut

pub struct FadeOut {
inner : DynSource
}

impl Source for FadeOut

#
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

#
FixedSamplesBuffer

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

#
FixedSamplesBuffer::new

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

#
FixedSourceAdapter

pub struct FixedSourceAdapter {
inner : DynSource
}

#
FixedSourceAdapter::channels

fn FixedSourceAdapter::channels(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

#
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::next

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

#
FromFactoryIter::sample_rate

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

#
FromIter

impl Source for FromIter

#
FromIter::channels

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

#
FromIter::next

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

#
FromIter::sample_rate

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

#
Function

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

impl Show for Function

#
Function::sawtooth

fn Function::sawtooth() -> Function

#
Function::sine

fn Function::sine() -> Function

#
Function::square

fn Function::square() -> Function

#
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::new

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

#
InputConfig::stream_config

#
InputConfig::supported_given

#
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::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

#
LimitMono

pub struct LimitMono {
inner : Limit
}

impl Source for LimitMono

#
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

#
LimitMulti

pub struct LimitMulti {
inner : Limit
}

#
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

#
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::gaming

#
LimitSettings::live_performance

fn LimitSettings::live_performance() -> LimitSettings

#
LimitSettings::mastering

fn LimitSettings::mastering() -> LimitSettings

#
LimitSettings::new

#
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::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

#
LinearGainRamp

pub struct LinearGainRamp {
inner : DynSource
}

#
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

#
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::next

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

#
LoopedDecoder::sample_rate

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

#
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::config

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

#
Microphone::next

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

#
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::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

#
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::next

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

#
MixerSource::sample_rate

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

#
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::new

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

#
OutputConfig::supported_given

#
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::sample_format

#
OutputStreamConfig::sample_rate

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

#
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::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

#
PeriodicAccess

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

#
PeriodicAccess::channels

fn PeriodicAccess::channels(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

#
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::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

#
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::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

#
Repeat

pub struct Repeat {
inner : DynSource
}

impl Source for Repeat

#
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

#
SampleRateConverter

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

#
SampleRateConverter::inner_mut

#
SampleRateConverter::into_inner

#
SampleRateConverter::new

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

#
SampleTypeConverter

pub struct SampleTypeConverter {
inner : DynSource
}

#
SampleTypeConverter::inner_mut

#
SampleTypeConverter::into_inner

#
SampleTypeConverter::new

#
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::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

#
SawtoothWave

pub struct SawtoothWave {
inner : SignalGenerator
}

#
SawtoothWave::channels

fn SawtoothWave::channels(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

#
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

#
SignalFunction

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

#
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::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::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::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

#
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::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

#
Skippable

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

impl Source for Skippable

#
Skippable::channels

fn Skippable::channels(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

#
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::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

#
Spatial

pub struct Spatial {
inner : SpatialSource
}

impl Source for Spatial

#
Spatial::channels

fn Spatial::channels(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

#
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::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

#
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::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::set_factor

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

#
SquareWave

pub struct SquareWave {
inner : SignalGenerator
}

#
SquareWave::channels

fn SquareWave::channels(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

#
StaticSamplesBuffer

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

#
StaticSamplesBuffer::channels

fn StaticSamplesBuffer::channels(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

#
Stoppable

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

impl Source for Stoppable

#
Stoppable::channels

fn Stoppable::channels(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

#
TakeDuration

pub struct TakeDuration {
inner : DynSource
requested_duration :
Duration

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

#
TakeDuration::clear_filter

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

#
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::set_filter_fadeout

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

#
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::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

#
TriangleWave

pub struct TriangleWave {
inner : SignalGenerator
}

#
TriangleWave::channels

fn TriangleWave::channels(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

#
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::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

#
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::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

#
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::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

#
WhiteGaussian

pub struct WhiteGaussian {
sample_rate : Int
rng : NoiseRngState
}

#
WhiteGaussian::channels

fn WhiteGaussian::channels(_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

#
WhiteTriangular

pub struct WhiteTriangular {
sample_rate : Int
rng : NoiseRngState
}

#
WhiteTriangular::channels

fn WhiteTriangular::channels(_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

#
WhiteUniform

pub struct WhiteUniform {
sample_rate : Int
rng : NoiseRngState
}

#
WhiteUniform::channels

fn WhiteUniform::channels(_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

#
Zero

pub struct Zero {
inner : DynSource
}

impl Source for Zero

#
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

#
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