[mythtv] [mythtv-commits] Ticket #4764: alsa buffer problem introducedin 15893

Janne Grunau janne-mythtv at grunau.be
Tue Mar 4 22:07:55 UTC 2008


On Tuesday 04 March 2008 06:04:53 Mark Spieth wrote:
>
> that is very helpful. I found the calc for fragmentsize was wrong.
> try replacing those lines with the following.
> still not sure how important 6144 is but thats the number you will
> now get if the sample rate is 48000. (and should have got
> previously.)
>
>         fragment_size = (audio_bits * audio_channels *
> audio_samplerate * 32) / 8000;
>         buffer_time = 32000 * 4;    // in usec

These values fix the 8khz, 8bit mono sample in #4711.

I've attached a patch to #4764 and reduced the 32 from the fragment_size 
calculation. I've you think the original term is important to 
understand the calculation it should be added as comment.

Janne


More information about the mythtv-dev mailing list