Segata Sanshiro
Member
(Sorry in advance for any stupid/naive observations, this is my first half-serious attempt at C++ plus SDL).
I'm trying to write a music player of a certain tracker-like format. The format in question stores the notes and timing in a small text file, and the sound samples in dozens of (separate) small OGG files.
So far I've only tried using SDL_mixer. Loading all samples with Mix_LoadWAV before starting playback works fine on the PC but not on the Wiz, since that function uncompresses OGG files on-the-fly and stores them uncompressed in memory, which quickly eats up all of it. (Btw, Mix_LoadWAV loads many kinds of formats, not just WAV).
Then I tried loading and unloading samples during playback; this way only those samples being played are stored in memory at any given time. Again, this worked on the PC but causes noticeable momentarily "hang ups" as samples are loaded and decoded.
I can't use Mix_LoadMUS (which streams music from disk) because AFAIK there's only one channel reserved for music, and I need at least 8 channels.
What would you guys think would be a possible solution? Should I have a look at SDL_audio? Or maybe work directly with libvorbis? Thanks in advance.
(BTW, make sure you have a look at gp32spain's contest if you have any project in mind, there's a $2,000+ bounty so far ).
I'm trying to write a music player of a certain tracker-like format. The format in question stores the notes and timing in a small text file, and the sound samples in dozens of (separate) small OGG files.
So far I've only tried using SDL_mixer. Loading all samples with Mix_LoadWAV before starting playback works fine on the PC but not on the Wiz, since that function uncompresses OGG files on-the-fly and stores them uncompressed in memory, which quickly eats up all of it. (Btw, Mix_LoadWAV loads many kinds of formats, not just WAV).
Then I tried loading and unloading samples during playback; this way only those samples being played are stored in memory at any given time. Again, this worked on the PC but causes noticeable momentarily "hang ups" as samples are loaded and decoded.
I can't use Mix_LoadMUS (which streams music from disk) because AFAIK there's only one channel reserved for music, and I need at least 8 channels.
What would you guys think would be a possible solution? Should I have a look at SDL_audio? Or maybe work directly with libvorbis? Thanks in advance.
(BTW, make sure you have a look at gp32spain's contest if you have any project in mind, there's a $2,000+ bounty so far ).