jj1bdx / wspr-cui

WSPR command-line tools
GNU General Public License v3.0
5 stars 0 forks source link

Alsa error when trying to play the wspr file - can't encode 0-bit Unknown or not applicable #3

Closed waterwin closed 2 years ago

waterwin commented 2 years ago

~/wspr-cui $ tail -c +27 wspr_5_14095599_1_220216_1414.c2 | csdr plain_interpolate_cc 32 | csdr bandpass_fir_fft_cc -0.01 0.01 0.001 | csdr gain_ff 16 | csdr shift_math_cc 0.125 | play --buffer=1024 -t raw -e floating-point -b32 -r 12000 -c 2 -q - csdr bandpass_fir_fft_cc: window = HAMMING csdr bandpass_fir_fft_cc: (fft_size = 8192) = (taps_length = 3999) + (input_size = 4194) - 1 (overlap_length = 3998) = taps_length - 1 play WARN alsa: can't encode 0-bit Unknown or not applicable csdr bandpass_fir_fft_cc: filter initialized, low_cut = -0.01, high_cut = 0.01 play WARN alsa: under-run Other wav files like music can be played on the system

jj1bdx commented 2 years ago

The example in README.md worked OK on macOS and Ubuntu 21.10 amd64 with sox installed. (play is a sox command.) To prevent clipping, you can change csdr gain_ff 16 to csdr gain_ff 8. I'm not sure what causes under-run.

jj1bdx commented 2 years ago

For ALSA, you can stop the error message by replacing the play command to

sox -t raw -e floating-point -b32 -r 12000 -c 2 -q - -t alsa

This is not relevant to wspr-cui so I will close this issue.