fix on rubato
This commit is contained in:
parent
e949023dda
commit
2e305e8f11
@ -149,15 +149,15 @@ pub fn resample_channels(
|
|||||||
if let Ok(x) = resampler.process(&waves_in) {
|
if let Ok(x) = resampler.process(&waves_in) {
|
||||||
if x.is_empty() {
|
if x.is_empty() {
|
||||||
Vec::new()
|
Vec::new()
|
||||||
} else if waves_in.len() == 2 {
|
} else if x.len() == 2 {
|
||||||
waves_in[0]
|
x[0]
|
||||||
.chunks(1)
|
.chunks(1)
|
||||||
.zip(waves_in[1].chunks(1))
|
.zip(x[1].chunks(1))
|
||||||
.flat_map(|(a, b)| a.into_iter().chain(b))
|
.flat_map(|(a, b)| a.into_iter().chain(b))
|
||||||
.map(|x| *x as f32)
|
.map(|x| *x as f32)
|
||||||
.collect()
|
.collect()
|
||||||
} else {
|
} else {
|
||||||
waves_in[0].iter().map(|x| *x as f32).collect()
|
x[0].iter().map(|x| *x as f32).collect()
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Vec::new()
|
Vec::new()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user