decopression of an avi file into PCM

89f33ef15125ba2251b4bf29f4d08d7d
0
calltopunit 101 Dec 23, 2009 at 08:56

Hello,

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 (http://www.devmaster.net/forums/showthread.php?t=5609), 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.