[vlc-devel] Re: vlc sound playback breaks for USB between ALSA 1.0.9b and 1.0.10rc2

Matthew Hodgson matthew at mxtelecom.com
Wed Nov 2 03:35:21 CET 2005


On Tue, 1 Nov 2005, Benjamin Pracht wrote:

> On Mon, Oct 31, 2005, Matthew Hodgson wrote :
>> Hi all,
>>
>> I spent a while wrestling with getting audio playback to work with my
>> M-Audio Transit USB soundcard today - when playing back 44.1kHz or 48kHz
>> sound with ALSA ~1.0.10rc2 I was getting:
>>
>> [00000838] main audio output debug: audio output is starving (35064),
>> playing silence
>>
>> with --aout alsa and similar for --aout oss.  The timestamp diff in the
>> starvation warning message is consistently ~40ms, and no sound was output.
>>
>> VLC does however play back 22kHz files correctly (and at the right pitch).
>>
>
> Well, mplayer sends 16 bits samples to the soundcard by default, AFAIK,
> VLC 32 bits samples. That may explain the difference...

Right - I can try to investigate that to find out how the 32-bit path may 
have changed.

> I cannot see any easy way to force VLC to send 16 bits samples to the
> soundcard without patching the code...
>
> On recent svn, using the --aout-rate 44001 option with alsa should have
> this side effect, but the use of a non standard rate may cause other
> issues. Could you please try however and see it that makes any change ?

Of course.  This is using svn r13047 from a few days ago with alsa 
1.0.10rc2 (no explicit asound.conf).  Unfortunately the problem's still 
present - here's the most relavent part of the log:

VLC media player 0.8.5-svn Janus
[00000268] access_file access debug: opening file `/mnt/phoenix/storage/music/Don Mclean - American Pie.mp3'
[00000139] main module debug: using access2 module "access_file"
[00000273] main private debug: pre buffering
[00000273] main private debug: received first data for our buffer
[00000273] main private debug: prebuffering done 1408981 bytes in 0s - 22300 kbytes/s
[00000265] main input debug: creating demux: access='' demux='' path='/mnt/phoenix/storage/music/Don Mclean - American Pie.mp3'
[00000274] main demuxer debug: looking for demux2 module: 37 candidates
[00000287] main packetizer debug: looking for packetizer module: 15 candidates
[00000073] main module debug: using packetizer module "mpeg_audio"
[00000287] mpeg_audio packetizer debug: MPGA channels:2 samplerate:44100 bitrate:128
[00000265] main input debug: selecting program id=0
[00000124] main module debug: using demux2 module "mpga"
[00000265] main input debug: looking for a subtitle file in /mnt/phoenix/storage/music/
[00000309] main decoder debug: looking for decoder module: 20 candidates
[00000072] main module debug: using decoder module "mpeg_audio"
[00000309] main decoder debug: thread 3013086128 (decoder) created at priority 0 (src/input/decoder.c:159)
[00000265] main input debug: `/mnt/phoenix/storage/music/Don Mclean - American Pie.mp3' successfully opened
[00000309] mpeg_audio decoder debug: MPGA channels:2 samplerate:44100 bitrate:128
[00000309] main decoder debug: no aout present, spawning one
[00000314] main audio output debug: looking for audio output module: 4 candidates
[00000314] alsa audio output debug: opening ALSA device `default'
[00000314] main audio output debug: thread 3004697520 (aout) created at priority 0 (alsa.c:643)
[00000249] main module debug: using audio output module "alsa"
[00000314] main audio output debug: output 's16l' 44001 Hz Stereo frame=1 samples/4 bytes
[00000314] main audio output debug: mixer 's16l' 44001 Hz Stereo frame=1 samples/4 bytes
[00000314] main audio output debug: filter(s) 'fl32'->'s16l' 44001 Hz->44001 Hz Stereo->Stereo
[00000315] main private debug: looking for audio filter module: 24 candidates
[00000205] main module debug: using audio filter module "float32tos16"
[00000314] main audio output debug: found a filter for the whole conversion
[00000314] main audio output debug: looking for audio mixer module: 3 candidates
[00000156] main module debug: using audio mixer module "trivial_mixer"
[00000314] main audio output debug: input 'mpga' 44100 Hz Stereo frame=1152 samples/1053 bytes
[00000314] main audio output debug: filter(s) 'mpga'->'fl32' 44100 Hz->44100 Hz Stereo->Stereo
[00000336] main private debug: looking for audio filter module: 24 candidates
[00000215] main module debug: using audio filter module "mpgatofixed32"
[00000314] main audio output debug: found a filter for the whole conversion
[00000314] main audio output debug: filter(s) 'fl32'->'fl32' 48510 Hz->44001 Hz Stereo->Stereo
[00000337] main private debug: looking for audio filter module: 24 candidates
[00000224] main module debug: using audio filter module "bandlimited_resampler"
[00000314] main audio output debug: found a filter for the whole conversion
[00000314] main audio output debug: audio output is starving (41806), playing silence
[00000314] alsa audio output warning: recovered from buffer underrun
[00000314] main audio output debug: audio output is starving (39118), playing silence
[00000314] alsa audio output warning: recovered from buffer underrun
[00000314] main audio output debug: audio output is starving (36392), playing silence
[00000314] alsa audio output warning: recovered from buffer underrun
[00000314] main audio output debug: audio output is starving (33669), playing silence
etc. etc.

So it looks as if it's using s16l at 44001Hz for aout:
[00000314] main audio output debug: output 's16l' 44001 Hz Stereo frame=1 samples/4 bytes

- but still starving with a consistent offset of ~40ms. :/

any other ideas?

many thanks for the response :)

Matthew.

-- 
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html



More information about the vlc-devel mailing list