Portaudio MP3 Decoding?

I'm working on a project that (currently) is used for decoding and playing MP3 files. I'm using Portaudio for the sound card interface, and libmad for the decoding. Its currently working, but I wanted some feedback on how to make libmad talk to Portaudio. My current method is decode the whole stream to a pointed integer array, then pass this to Portaudio to play. This severely limits the length of file playable and also makes it use up a whole lot more memory, but the plus side is that its really easy to skip to any particular sample.

I was wondering if it would be better to decode and play on the fly instead of decoding the whole thing first then playing. (This will be used as a DJ program eventually)
Topic archived. No new replies allowed.