Skip to content

Commit 4ef656d

Browse files
authored
remove little warning
1 parent 67f55b7 commit 4ef656d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/lib.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ fn next_pow2_floor(n: usize) -> usize {
217217
/// Read entire audio via ffmpeg into Vec<f32> (mono, target sample rate).
218218
/// Uses ffmpeg to mix to mono and resample if needed. Returns (sr, samples).
219219
async fn read_full_pcm_f32(path: &Path, target_sr: u32) -> Result<(u32, Vec<f32>)> {
220-
let mut args = vec![
220+
let args = vec![
221221
"-threads".to_string(),
222222
"3".to_string(),
223223
"-vn".to_string(),
@@ -268,7 +268,7 @@ fn correlate_full(s1: &[f32], s2: &[f32]) -> Result<(usize, usize)> {
268268
anyhow::bail!("empty input for correlation");
269269
}
270270
let needed = ls1 + ls2 - 1;
271-
let mut n = next_pow2(needed);
271+
let n = next_pow2(needed);
272272
// create planner and buffers
273273
let mut planner = FftPlanner::<f32>::new();
274274
let fft = planner.plan_fft_forward(n);
@@ -341,7 +341,7 @@ async fn correlate_overlap_save(
341341
let ref_fft = ref_buf;
342342

343343
// spawn ffmpeg for stream_path
344-
let mut args = vec![
344+
let args = vec![
345345
"-threads".to_string(),
346346
"3".to_string(),
347347
"-vn".to_string(),
@@ -500,7 +500,7 @@ pub async fn second_correlation_async(in1: &str, in2: &str, pool_capacity: usize
500500
}
501501

502502
// otherwise streaming: choose shorter file as reference to load fully
503-
let (ref_path, stream_path, ref_est) = if est1 <= est2 {
503+
let (ref_path, stream_path, _ref_est) = if est1 <= est2 {
504504
(p1, p2, est1)
505505
} else {
506506
(p2, p1, est2)
@@ -539,7 +539,7 @@ pub async fn second_correlation_async(in1: &str, in2: &str, pool_capacity: usize
539539
let n = n_try;
540540

541541
// run overlap-save with chosen n
542-
let (padsize, xmax_samples) = correlate_overlap_save(&ref_samples, stream_path, target_sr, n, pool_capacity).await?;
542+
let (_padsize, xmax_samples) = correlate_overlap_save(&ref_samples, stream_path, target_sr, n, pool_capacity).await?;
543543

544544
// interpret result
545545
let fs_f = target_sr as f64;

0 commit comments

Comments
 (0)