Skip to main content

Module buffer

Module buffer 

Source
Expand description

A simple source of samples coming from a buffer.

The SamplesBuffer struct can be used to treat a list of values as a Source.

§Example

use rodio::buffer::SamplesBuffer;
use core::num::NonZero;
let _ = SamplesBuffer::new(NonZero::new(1).unwrap(), NonZero::new(44100).unwrap(), vec![1.0, 2.0, 3.0, 4.0, 5.0, 6.0]);

Structs§

SamplesBuffer
A buffer of samples treated as a source.