Fundamentals of Audio and Video Programming for Games (Pro-Developer)
Amend the table of streaming sounds to exactly what you want. Say you have four music tracks, stored in a Music sub-directory of your Audio directory, that capture the sound of individual instruments, then you would set up the streamingIDenum and streamingAudio structure as follows .
enum streamingIDenum{ ID_bass = 0, ID_perc, ID_drums, ID_sax, // Terminate this enumeration with these values. eNUM_streams, dud_stream = -1, }; struct streamingStruct StreamingAudio[] = { { ID_bass, "Music\PT2-Bass.wav" }, { ID_perc, "Music\PT2-Perc.wav" }, { ID_drums, "Music\PT2-Drums.wav" }, { ID_sax, "Music\PT2-Sax.wav" }, // Terminate the structure with this entry. { eNUM_streams, "end"} };