MSACM: initialize some ACMSTREAMHEADER fields for the sake of native codecs

Alex Villací­s Lasso a_villacis at
Thu Dec 29 09:44:37 CST 2005

Eric Pouech wrote:

> Alex Villací­s Lasso wrote:
>> The ACMAPP sample application from MSDN reveals this annoying bug in 
>> playback: with a native ACM codec (such as the Ogg Vorbis one bundled 
>> with some Japanese RPGs), builtin msacm will successfully tell the 
>> codec to decode the first two frames of compressed audio, and then 
>> the sound will loop on these two frames. What is really happening is 
>> that winmm is using double-buffering, and reusing the ACMSTREAMHEADER 
>> structures for playback, and acmStreamConvert simply passes the 
>> structures into the codec, without clearing cb[Src|Dst]LengthUsed 
>> (here is the bug) which was set in the previous call to 
>> acmStreamConvert on that ACMSTREAMHEADER. The native codec *expects* 
>> these fields to be set to 0, and refuses to decode otherwise.
> well, you should check who is supposed to clear those flags between 
> msacm or winmm (I suppose wavemap).
> A+

Native msacm (WINEDLLOVERRIDES=msacm32=n) works correctly (no loops) 
with native codecs in wine. This suggests that msacm is doing the 
clearing, since it is using the same builtin winmm.

Alex Villacís Lasso

More information about the wine-devel mailing list