[MPlayer-dev-eng] [PATCH] ao_dart
Reimar Döffinger
Reimar.Doeffinger at stud.uni-karlsruhe.de
Wed Feb 25 18:22:46 CET 2009
On Tue, Feb 24, 2009 at 12:15:16AM +0900, KO Myung-Hun wrote:
> +#define OUTBURST_SAMPLES 512
> +#define DART_SAMPLES (OUTBURST_SAMPLES << 2)
> +
> +#define CHUNK_SIZE ao_data.outburst
> + // one more chunk, nBytesPerSample * OUTBURST_SAMPLES
> + m_nBufSize = nBytesPerSample * ((nDartSamples << 2) + OUTBURST_SAMPLES);
> + ao_data.outburst = nBytesPerSample * OUTBURST_SAMPLES;
This is rather confusing. Make sure that m_nBufSize is always a multiple
of CHUNK_SIZE, otherwise you risk getting really, really bad performance
(because the buffer write position is not aligned, even writes of a
single chunk will have to be split in two at the end of the FIFO etc. -
I don't know how to reproduce it anymore, but for ao_sdl the speed
difference was significant).
More information about the MPlayer-dev-eng
mailing list