From 562fa6d6318d1a2b6e453deecfb0287886b5f17f Mon Sep 17 00:00:00 2001 From: Laurent Date: Sun, 22 Dec 2024 14:11:15 +0100 Subject: [PATCH] Fix some version issues. --- src/lib.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 530318a..2386df4 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -189,12 +189,12 @@ fn write_wav( let data = data.into_dimensionality::().w()?; match data.shape() { [1, l] => { - let data = data.into_shape_with_order((*l,)).w()?; + let data = data.into_shape((*l,)).w()?; let data = to_cow(&data); wav::write_mono(&mut w, &data, sample_rate).w_f(&filename)?; } [2, l] => { - let data = data.into_shape_with_order((2 * *l,)).w()?; + let data = data.into_shape((2 * *l,)).w()?; let data = to_cow(&data); let (pcm1, pcm2) = (&data[..*l], &data[*l..]); let data = pcm1 @@ -242,11 +242,11 @@ fn write_opus( let data = data.into_dimensionality::().w()?; match data.shape() { [1, l] => { - let data = data.into_shape_with_order((*l,)).w()?; + let data = data.into_shape((*l,)).w()?; write_mono(w, data)? } [2, l] => { - let data = data.into_shape_with_order((*l * 2,)).w()?; + let data = data.into_shape((*l * 2,)).w()?; let data = to_cow(&data); let (pcm1, pcm2) = (&data[..*l], &data[*l..]); opus::write_ogg_stereo(&mut w, pcm1, pcm2, sample_rate).w_f(&filename)? @@ -292,7 +292,7 @@ fn resample( 2 => { let pcm = pcm.into_dimensionality::().w()?; let (channels, l) = pcm.dim(); - let pcm = pcm.into_shape_with_order((channels * l,)).w()?; + let pcm = pcm.into_shape((channels * l,)).w()?; let pcm = to_cow(&pcm) .chunks(l) .map(|pcm| audio::resample(pcm, src_sample_rate, dst_sample_rate))