ACM Win32API for adding audio to an AVI

Started by
-1 comments, last by shvalbo 18 years, 8 months ago
Hi. I create an AVi from a sequence of bitmap using the AVIStreamWrite method and it works great, the problem is when I try to add audio it doesn't work well, I use the ACM methods to compress the audio buffer and then I try to add it to the first frame also with the function AviStreamWrite, and I get bizzard results, if the WAVEFORMATEX is of size 18 (meaning, no additional information by the codec) it works great!, but if there is additional infomation (cbsize >0) the audio is added to the avi (I can see that the avi is larger), but when I play it I can't hear anything. btw: I compress the audio using DivX Codec. Also, I'm kinda having problems filling the AVISTREAMINFO structure for the audio, and also giving the right parameters for the AviStreamWrite method for the audio as well (the number of samples). any help would be more than appreciated!!

This topic is closed to new replies.

Advertisement