Package: sox
Version: 14.0.1-2
Severity: normal
I am using sox to play audio files through a Sound Blaster Live!
sound card, through ALSA. When I play a file, either using the play
wrapper or using the sox command directly, the audio plays back
correctly, but after the file is finished, a short fragment of audio
from earlier in the file is erroneously played again (perhaps 50
milliseconds of audio or so).
Multiple types of audio files have been tried, to no effect: a 11025
Hz mono Ogg Vorbis file, 48000 Hz mono and stereo WAVE files, and
44100 Hz stereo MPEG-3 all exhibit the problem, so it doesn't seem to
have anything to do with the decoding or resampling process. (48000
Hz stereo is the native format of this sound card, I believe.)
Here's the relevant part of my .asoundrc:
pcm.!default {
type plug
slave.pcm sblive
}
pcm.sblive {
type hw
card 1
}
The easiest demonstration is to generate a rising sine wave using the
sox synth command:
$ sox -n -r 48000 -c 2 sine.wav synth 3 sine 440-880
Using the resulting file, if I run any of the following:
$ play sine.wav
$ sox sine.wav -t alsa default
$ sox sine.wav -t alsa hw:1
then I can clearly hear the rising sine wave, followed by an erroneous
blip of tone from earlier in the file. The use of plug versus hw
makes no noticeable difference. If I run any of:
$ sox sine.wav -t ossdsp /dev/dsp1
$ aplay sine.wav
$ aplay -Ddefault sine.wav
$ aplay -Dhw:1 sine.wav
then the playback is correct.
Interestingly, if I generate (or even play) the sine file at a lower
sampling rate, the blip seems to come from earlier, indicating that
it's probably offset from the end in samples. Based on that, I'm
imagining a ring buffer being overrun by one chunk and reading a chunk
of data N chunks from the end one more time.
Thanks for your attention.
---> Drake Wilson
-- System Information:
Debian Release: lenny/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.24.2 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages sox depends on:
ii libc6 2.7-9 GNU C Library: Shared libraries
ii libltdl3 1.5.26-1 A system independent dlopen wrappe
ii libsamplerate0 0.1.2-5 audio rate conversion library
ii libsox-fmt-alsa 14.0.1-2 SoX alsa format I/O library
ii libsox-fmt-ao 14.0.1-2 SoX Libao format I/O library
ii libsox-fmt-base 14.0.1-2 Minimal set of SoX format librarie
ii libsox-fmt-oss 14.0.1-2 SoX OSS format I/O library
ii libsox0 14.0.1-2 SoX library
sox recommends no packages.
-- no debconf information
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]