[vlc-devel] alsa output: stuttering when playing 5.1 audio
Rafaël Carré
funman at videolan.org
Fri Jan 18 15:58:42 CET 2008
Le Tue, 15 Jan 2008 19:51:44 +0100,
"Matthias P. Nowak" <mpnowak at broadpark.no> a écrit :
> Hi,
>
> Thanks for this nice player. I watched movies, but when I tried 5.1
> audio I got stuttering audio and the debug message "Alsa: broken pipe"
> or similar. And i found the fix - could some of you apply my patch?
>
> Error description:
> VLC 0.8.6c plays audio directly to alsa (1.0.14) on Linux 2.6.23.12.
> The alsa device is the default one. An .AC3 file with audio 5.1 is
> opened and in vlc 5.1 is chosen as audio-device. Then stuttering
> occurs and an error message saying something about a broken thing
> appears.
>
> Diagnosis:
> Turning debugging on and additional hacking reveals:
> - the buffersize is reported as of 5461 bytes, which violates
> alignment requirements for 16-bit sound.
> - as 1024*32 / 6 (number of channels) it should be 5461.333 ... 8-(
> - this seems to have caused some buffer underruns -> hence the "broken
> pipe" error message.
>
> Fix: the patch http://paste.videolan.org/2955
> It exchanges setting the period_size and buffer_size around line 570.
> When the buffer_size is set as the last action it takes care of the 6
> channels and allocates a buffersize that is appropriate (not a power
> of 2) for all channels. It seems, when buffersize is set first, and
> then the number of channels that the alsa does not correct the
> buffersize, hence the broken number 5461.333 and the underrun.
>
> best regards
>
> Matthias
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> http://mailman.videolan.org/listinfo/vlc-devel
Applied in http://trac.videolan.org/vlc/changeset/24390 , thanks
--
Rafaël Carré
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20080118/02a3e762/attachment.sig>
More information about the vlc-devel
mailing list