From 8549da6e5d56595e3f6b8f97061738287890a9b3 Mon Sep 17 00:00:00 2001 From: Andreas Gustafsson Date: Tue, 27 Feb 2024 16:51:07 +0200 Subject: [PATCH 1/6] Update desciption and URL of sndfile-resample. --- docs/quality.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/quality.md b/docs/quality.md index 5c69578e..1feb3bb8 100644 --- a/docs/quality.md +++ b/docs/quality.md @@ -24,9 +24,8 @@ factors to consider: There are a number of sample rate converters available for downloading but I will limit the comparison of Secret Rabbit Code to the following: -- [sndfile-resample](http://libsndfile.github.io/libsamplerate/download.html) - which is a program (which uses libsamplerate) from the **examples/** directory - of the Secret Rabbit Code source code distribution. +- sndfile-resample which is a program (which uses libsamplerate) from the + [sndfile-tools](https://github.com/libsndfile/sndfile-tools) package. - [Resample](https://ccrma.stanford.edu/~jos/resample/) by Julius O Smiths which seems to have been the first high quality converter available as source code. - [ResampAudio](http://www.tsp.ece.mcgill.ca/MMSP/Documents/Software/AFsp/ResampAudio.html) From 3f7e31265ed02cad7c5ba9e5457fae136199f393 Mon Sep 17 00:00:00 2001 From: Andreas Gustafsson Date: Tue, 27 Feb 2024 16:53:08 +0200 Subject: [PATCH 2/6] Remove examples/ prefix from path of sndfile-resample, because that's no longer where it is. --- tests/src-evaluate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/src-evaluate.c b/tests/src-evaluate.c index d55d6483..9a20df7e 100644 --- a/tests/src-evaluate.c +++ b/tests/src-evaluate.c @@ -74,9 +74,9 @@ int main (int argc, char *argv []) { static RESAMPLE_PROG resample_progs [] = { { "sndfile-resample", - "examples/sndfile-resample --version", + "sndfile-resample --version", "libsamplerate", - "examples/sndfile-resample --max-speed -c 0 -to %d source.wav destination.wav", + "sndfile-resample --max-speed -c 0 -to %d source.wav destination.wav", SF_FORMAT_WAV | SF_FORMAT_PCM_32 }, { "sox", From 221101d96b5ae6a2d4cfbfd2c5fdf24806bd5300 Mon Sep 17 00:00:00 2001 From: Andreas Gustafsson Date: Tue, 27 Feb 2024 16:55:08 +0200 Subject: [PATCH 3/6] Update URL of SoX. --- docs/quality.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/quality.md b/docs/quality.md index 1feb3bb8..edaf5b98 100644 --- a/docs/quality.md +++ b/docs/quality.md @@ -31,7 +31,7 @@ will limit the comparison of Secret Rabbit Code to the following: - [ResampAudio](http://www.tsp.ece.mcgill.ca/MMSP/Documents/Software/AFsp/ResampAudio.html) which is part of [Audio File Programs and Routines](http://www.tsp.ece.mcgill.ca/MMSP/Documents/Software/AFsp/AFsp.html) by Peter Kabal. -- [SoX](http://home.sprynet.com/~cbagwell/sox.html) which is maintained by Chris +- [SoX](https://sourceforge.net/projects/sox/) which is maintained by Chris Bagwell. SoX is also able to perform some low quality sample rate conversions but these will not be investigated. - [Shibatch](http://shibatch.sourceforge.net/) which seems to be a frequency From defd82ebc5822b6df72603ba22dab24fa7d3d189 Mon Sep 17 00:00:00 2001 From: Andreas Gustafsson Date: Tue, 27 Feb 2024 17:03:05 +0200 Subject: [PATCH 4/6] Update SoX command line to one that works. --- tests/src-evaluate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/src-evaluate.c b/tests/src-evaluate.c index 9a20df7e..cbb0b64a 100644 --- a/tests/src-evaluate.c +++ b/tests/src-evaluate.c @@ -82,7 +82,7 @@ main (int argc, char *argv []) { "sox", "sox -h 2>&1", "sox", - "sox source.wav -r %d destination.wav resample 0.835", + "sox source.wav -r %d destination.wav", SF_FORMAT_WAV | SF_FORMAT_PCM_32 }, { "ResampAudio", From 3641b2ce2ad877977446dabdaa3e73fbf8505aa7 Mon Sep 17 00:00:00 2001 From: Andreas Gustafsson Date: Wed, 28 Feb 2024 10:44:11 +0200 Subject: [PATCH 5/6] Don't mistake the second frequency peak in SNR test #6 for noise. This improves the reported SNR of sndfile-resample from 26 dB to 145 dB. --- tests/calc_snr.c | 2 +- tests/src-evaluate.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/calc_snr.c b/tests/calc_snr.c index 35a37f77..81851184 100644 --- a/tests/calc_snr.c +++ b/tests/calc_snr.c @@ -169,7 +169,7 @@ find_snr (const double *magnitude, int len, int expected_peaks) qsort (peaks, peak_count, sizeof (PEAK_DATA), peak_compare) ; snr = peaks [0].peak ; - for (k = 1 ; k < peak_count ; k++) + for (k = expected_peaks ; k < peak_count ; k++) if (fabs (snr - peaks [k].peak) > 10.0) return fabs (peaks [k].peak) ; diff --git a/tests/src-evaluate.c b/tests/src-evaluate.c index cbb0b64a..d9a99432 100644 --- a/tests/src-evaluate.c +++ b/tests/src-evaluate.c @@ -354,7 +354,7 @@ measure_snr (const RESAMPLE_PROG *prog, int *output_samples, int verbose) if ((retval = system (command)) != 0) printf ("system returned %d\n", retval) ; - snr = measure_destination_wav ("destination.wav", &sample_count, snr_test->pass_band_peaks) ; + snr = measure_destination_wav ("destination.wav", &sample_count, snr_test [k].pass_band_peaks) ; *output_samples += sample_count ; From fbdfa394415f632b9e59f43f0d1cdc842729bb78 Mon Sep 17 00:00:00 2001 From: Andreas Gustafsson Date: Tue, 5 Mar 2024 19:55:57 +0200 Subject: [PATCH 6/6] Update URLs of ResampAudio. --- docs/quality.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/quality.md b/docs/quality.md index edaf5b98..39327334 100644 --- a/docs/quality.md +++ b/docs/quality.md @@ -28,8 +28,8 @@ will limit the comparison of Secret Rabbit Code to the following: [sndfile-tools](https://github.com/libsndfile/sndfile-tools) package. - [Resample](https://ccrma.stanford.edu/~jos/resample/) by Julius O Smiths which seems to have been the first high quality converter available as source code. -- [ResampAudio](http://www.tsp.ece.mcgill.ca/MMSP/Documents/Software/AFsp/ResampAudio.html) - which is part of [Audio File Programs and Routines](http://www.tsp.ece.mcgill.ca/MMSP/Documents/Software/AFsp/AFsp.html) +- [ResampAudio](https://www.mmsp.ece.mcgill.ca/Documents/Software/Packages/AFsp/AFsp/ResampAudio.html) + which is part of the [AFsp Package](https://www-mmsp.ece.mcgill.ca/Documents/Downloads/AFsp/) by Peter Kabal. - [SoX](https://sourceforge.net/projects/sox/) which is maintained by Chris Bagwell. SoX is also able to perform some low quality sample rate conversions