decopression of an avi file into PCM

calltopunit 101 Dec 23, 2009 at 08:56


I am getting an error in decopression of audio (mp3) content content an avi file into PCM. I am trying to read MP3 content of the file and writing it into the PCM file. The code is as follows.

AVIStreamReadFormat(); //reading the MPEGLAYER3WAVEFORMAT of avi file

acmStreamOpen(&g_mp3stream, NULL, (LPWAVEFORMATEX) (LPMPEGLAYER3WAVEFORMAT) mp3format, waveFormat, NULL, 0, 0, 0);

acmStreamConvert(g_mp3stream,&mp3streamHead, ACM_STREAMCONVERTF_BLOCKALIGN)

I am getting the correct format of LPMPEGLAYER3WAVEFORMAT from AVIStreamReadFormat function and the same I am passing into the acmStreamConvert function.

acmStreamConvert function is returning no error but the cbDstLengthUsed member of the ACMSTREAMHEADER is zero after the call. so the output file content is also zero. I got this code from this forum only (, I modified that for avi file but I am getting no output.

0 Replies

Please log in or register to post a reply.

No replies have been made yet.