Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for quality.md and src-evaluate #207

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions docs/quality.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,14 @@ 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)
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](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
Expand Down
2 changes: 1 addition & 1 deletion tests/calc_snr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) ;

Expand Down
8 changes: 4 additions & 4 deletions tests/src-evaluate.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,15 @@ 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",
"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",
Expand Down Expand Up @@ -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 ;

Expand Down