Implement some samples rate conversions
This commit is contained in:
parent
32bca93cc9
commit
081912c5fb
4 changed files with 35 additions and 8 deletions
|
|
@ -20,11 +20,9 @@ fn main() {
|
|||
loop {
|
||||
let mut buffer = channel.append_data(1, cpal::SamplesRate(44100));
|
||||
|
||||
for sample in buffer.chunks_mut(1) {
|
||||
for sample in buffer.iter_mut() {
|
||||
let value = data_source.next().unwrap();
|
||||
|
||||
sample[0] = value;
|
||||
//sample[1] = value;
|
||||
*sample = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue