msadp32.acm : block align and adpcm extra data
Vincent Pelletier
plr.vincent at gmail.com
Fri Jan 30 16:23:26 CST 2009
Le Thursday 22 January 2009 16:25:42 Stefano Guidoni, vous avez écrit :
> This patch solves bug 7385:
> Function ADPCM_StreamSize must return a
> buffer size, which is a multiple of block align.
> This buffer size is
> calculated taking into account input-blockalign, output-blockalign and
> adpcm-samplesperblock.
Hi.
Excuse me for contacting you directly, but that patch didn't enter the source
tree, because of the "while" loops.
I've been trying for hours to guess by trial and (tons of) error the right
formula not involving any "magic" number (besides 7, which is the number of
bytes per channel in adpcm block header afaik), but I could not reach the
right result: after ~ten seconds, the result of my computation diverges from
yours, and audio starts repeating/skipping. Probably operation rounding
errors. and/or integer overflows.
Could you explain me how you reached that formula ?
Mainly, I don't understand why there is no trace of the number of samples per
seconds, nor why you multiply a plock align with another block align in the
denominator of source size computation when source is adpcm.
By advance, many thanks for enlightening me.
--
Vincent Pelletier
More information about the wine-devel
mailing list