A Rust audio IO stream in the style of an "Event Iterator" driven by PortAudio.
Switch branches/tags
Nothing to show
Clone or download
mitchmindtree Merge pull request #50 from mitchmindtree/master
Add deprecation notice to README - Use rust-portaudio instead.
Latest commit 78090fa Jan 4, 2016



rust-portaudio's API has improved enough to the point where sound_stream is no longer necessary.

SoundStream Build Status

A simple-as-possible, fast audio I/O stream wrapping PortAudio for Rust! It looks like this:

// The callback we'll use to pass to the Stream. It will write the input directly to the output.
let f = Box::new(move |input: &[f32], _: Settings,
                       output: &mut[f32], _: Settings,
                       dt: f64, _: CallbackFlags| {
    for (output_sample, input_sample) in o.iter_mut().zip(i.iter()) {
        *output_sample = *input_sample;

// Run our callback on the default, duplex, non-blocking stream.
let stream = SoundStream::new()
    .duplex(StreamParams::new(), StreamParams::new())


Add sound_stream to your Cargo.toml dependencies like so:

sound_stream = "*"

For more details, see the examples.


SoundStream uses PortAudio as a cross-platform audio backend. The rust-portaudio dependency will first try to find an already installed version on your system before trying to download it and build PortAudio itself.


MIT - Same license as PortAudio.