Crate rawdio

Source
Expand description

rawdio is an audio engine that is inspired by the Web Audio API

You can use it to:

  • Create a context
  • Create DSP nodes
  • Connect the nodes together
  • Accurately schedule ‘events’
  • Process the graph with an input and an output

§Example

use rawdio::{connect_nodes, create_engine, AudioProcess, Context, Oscillator, OwnedAudioBuffer};

let (mut context, mut process) = create_engine();

let frequency = 1_000.0;
let channel_count = 2;
let oscillator = Oscillator::sine(context.as_ref(), frequency, channel_count);

connect_nodes!(oscillator => "output");

context.start();

// Call `process.process(...)`, passing in the input samples, and using the output
// If you wish to use with your sound card, you could use something like cpal (see the examples)

Modules§

prelude
Module to re-export commonly used types

Macros§

connect_nodes
Connect a graph

Structs§

Adsr
An ADSR node that will create an envelope to modulate the amplitude of its input
AudioParameter
An parameter that generates a value for every audio sample
Biquad
A biquad filter
BorrowedAudioBuffer
An AudioBuffer that borrows audio from a different audio buffer
Compressor
A basic dynamics compressor
Convolution
A convolution node to convolve the input signal with an impulse response
EngineOptions
Options to control the engine
Envelope
A node that tracks the input signal and outputs the envelope
Gain
A node that applies gain to the input
GraphNode
A node the connects into the audio graph
Level
A level that can be used to convert from linear to decibel representation
Mixer
A node that mixes between its input and output channels
MutableBorrowedAudioBuffer
A mutable buffer that refers to a portion of another buffer
Oscillator
An oscillator node
OwnedAudioBuffer
An audio buffer that owns its audio data
Pan
A node that will pan the input signal between two output channels
ProcessContext
The context that is passed to every [DspProcessor]
Recorder
A node that records its input
SampleLocation
Specify the location in an audio buffer using the frame and channel index
Sampler
A node that can play or loop a sample
Timestamp
A fixed-point representation of a timestamp
Waveshaper
A node that will distort the input signal using a specified function

Enums§

BiquadFilterType
The type of the biquad filter

Traits§

AudioBuffer
An AudioBuffer represents floating point audio data for a number of channels
AudioProcess
An audio process that can be processed with input and output audio samples
Context
The root audio context

Functions§

create_engine
Create an engine with the default options
create_engine_with_options
Create an audio engine with custom options