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

Make a Cairo failure cause sndfile-spectrogram to exit(1), not exit(0) #27

Closed
wants to merge 2 commits into from
Closed

Conversation

martinwguy
Copy link
Contributor

When Cairo init failed, typically because the output image was >32768 wide,
sndfile-sprectogram would exit(0). This makes it exit(1) so that wrapping
shell scripts can more reliably detect sndfile-spectrogram failure.

When Cairo init failed, typically because the output image was >32768 wide,
sndfile-sprectogram would exit(0). This makes it exit(1) so that wrapping
shell scripts can more reliably detect sndfile-spectrogram failure.
The Kaiser window is noisy on certain input data. e.g.:
    sndfile-generate-chirp -amp 1.0 -linear -from 22000 -to 26000 \
	96000 10 chirp96.wav
    sndfile-spectrogram chirp96.wav 800 600 chirp96.png
Other window functions (Nuttall, Hanning) do not have this problem.

This patch add a --nuttall option to select the Nuttall window function,
whose code is already included in the source, as an alternative to the
default one, the Kaiser window. There is a --kaiser option for symmetry.

An alternative would be --window=nuttall so we can beat Audacity's ten (!)
different window functions but --nuttall is easier to parse (and to type!)
@erikd
Copy link
Member

erikd commented Dec 6, 2015

Travis is busted. This has been applied.

@erikd erikd closed this Dec 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants