So:
PCM wav file -> read PCM samples -> process samples -> send to sound
card.
The program works fine, and supports skipping in time and other
playback controls, which are implemented by manipulating the file
pointer.
I need to change this program to support MP3 files. Preferably it
should support any compressed audio for which there is a codec
installed on the system. So I need to read the file (MP3 or other
format) in small chunks, convert them to PCM samples, process them and
then output the samples to the sound card using waveOutWrite() as per
the existing program. Also the new mechanism should still support
uncompressed wav files.
What is the best way for me to adapt this program to support MP3? I've
read a bit about ACM, DirectSound and MCI and I am unsure as what is
the best thing for me to use. I want the API to work out what type of
file it is and do the conversion to PCM samples for me, so I can plug
them into my existing code. I don't want to have to convert the whole
compressed file to PCM in memory because the files might be quite
large (1 hour +), so I need to convert just small chunks at a time.
The least effort option is preferable. I don't want to have to re-
write the whole program.
Hope someone can help me soon!