ACM: Compressing WAV audio to Mpeg Layer 3 using Codecs
I'm building a small app to automate compression of WAV to MP3.
It produces MP3s, of approximately the right size, but the sound is garbled, it sounds like the song with 'extra' noise.. lots., I can even
hear the words. However winamp keeps changing from 'green' to 'red' ie out of sync or somethign.
I'm using ACM to compress my wav data blocks into mp3. Then I am literally writing those mp3 blocks (from the acm) to disk. Do i need headers or anything?
I'm letting the user choose the mpeg format, and getting the buffer sizes from acm, the source buffers are approx 10x bigger than the destination, which seems right for 128kpbs mp3s..
Thanks!!
- Alex
Re: ACM: Compressing WAV audio to Mpeg Layer 3 using Codecs
You do need a header. The only way I know to do it is manually. I have done this with WAV. Basically edit the file with a HEX editor and look at about the first 46 bytes (the header size is standard for all sound files as far as I know), compare it with another MP3 file and see the difference.
How did you initialize the ACM to work? I can't get it to work. I don't know if it is because I am trying on WinCE or I don't know what I am doing. Supposety Ver. 3 of CE supports it, but I am yet to see.
Ron