Add some formats-related functions

This commit is contained in:
Pierre Krieger 2014-12-11 19:07:58 +01:00
parent 0bdafdab9b
commit 99c23327d8
3 changed files with 40 additions and 0 deletions

View file

@ -3,6 +3,8 @@ extern crate cpal;
fn main() {
let mut channel = cpal::Channel::new();
assert!(channel.get_samples_format() == cpal::SampleFormat::U16);
// producing a sinusoid
let mut data_source =
std::iter::iterate(0.0f32, |f| f + 0.03)