Add some formats-related functions
This commit is contained in:
parent
0bdafdab9b
commit
99c23327d8
3 changed files with 40 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue