[Alsaplayer-devel] alsaplayer plays mono wave file at double speed
Tue May 31 13:15:55 BST 2005
For some work I am doing, I put together a click-track wave file. The
file is created in Matlab, has one channel, is 31 seconds long, and
has one click per second.
When I play this file back using XMMS, it sounds as expected. There is
one click per second, and the total playback takes 31 seconds.
The same goes for playing it back with aplay (see below).
When I play the same file back using alsaplayer, it is played at double
speed. There are two clicks per second, and the total playback time is
about half of what it should be (see below). Also, the clock in
alsaplayer showing elapsed and total time is running at double speed,
two seconds per second.
To thest this further, I also created a two-channel file (with the same
signal in both channels). This stereo file, alsaplayer plays as
expected, in normal speed.
In my opinion, this seems to indicate that there is an an error in how
alsa-player handles mono wave files. I did some quick googling, and
found references to erroneous handling of mono files in alsaplayer, but
most hits seems to be quite old, (and may not be relevant for files
int the wave format) e.g.: http://www.alsaplayer.org/changelog.php3 :
> Thu Nov 1 14:53:23 CET 2001
> ----------------------------
> * Fix MAD input plugin to play MONO files correctly
(Is alsaplayer alive? The page at http://www.alsaplayer.org/ has "News"
that was updated 7. june 2004.)
Is this behaviour I have stumbled upon a known error?
Is it fixed in some newer version?
Should I report it elsewhere?
The files I used for testing can be found here:
http://www.q2s.ntnu.no/~asbjs/various/clicktrack_mono.wav
http://www.q2s.ntnu.no/~asbjs/various/clicktrack_stereo.wav
The system is Debian Sarge on a Dell with an Intel P4 CPU.
alsaplayer is version 0.99.76, and ALSA is version 1.0.4.
Asbjørn Sæbø
----------------------------------------------------------------
$ cat /proc/asound/version
Advanced Linux Sound Architecture Driver Version 1.0.4 (Mon May 17
14:31:44 2004 UTC).
Playback with aplay
--------------------
$ time aplay clicktrack_mono.wav
Playing WAVE 'clicktrack_mono.wav' : Signed 16 bit Little Endian, Rate
44100 Hz, Mono
real 0m31.003s
user 0m0.007s
sys 0m0.014s
Playback with alsaplayer
(manually stopped after playback was finished)
----------------------------------------------
$ time alsaplayer --verbose clicktrack_mono.wav
AlsaPlayer 0.99.76
(C) 1999-2003 Andy Lo A Foe <andy at alsaplayer.org> and others.
Output plugin: ALSA output v1.9.0beta12
Loading reader plugin: File reader v1.1
Loading reader plugin: HTTP reader v1.3
Loading Input plugin: MAD MPEG audio plugin v1.01
Loading Input plugin: MikMod player v1.0
Loading Input plugin: WAV player v1.01
Loading Input plugin: libsndfile plugin v0.1
Loading Input plugin: Ogg Vorbis player v1.2
Loading Input plugin: flac player v1.2
Loading Input plugin: CDDA player v1.2
Loading Input plugin: Audio File Library player v0.2.1
Interface plugin: GTK+ interface v1.2
real 0m16.236s
user 0m0.223s
sys 0m0.024s
More information about the alsaplayer-devel
mailing list