sixty sounds global,
The good idea that will allow you to have several thousand sound if you want
is to load them dynamically before using them, this will work especially good
if you want to make adventure with sound played only one time.
there is about NO latency I'v noticed while loading sound during execution.
You need to have three sound slot. When one is already played you can load
a new sound into it (LoadVesselWave destroy the previous sound and replace it
with the new loaded, no worry about freeing ressource)
Here below an example in "pseudo C++ code"
---------------- CODE CODE CODE CODE-------------------------------------------
// variable the three slot that will always be used
SOUND speechA
SOUND speechB
SOUND speechC
// init time we load the first three sound
Loadwave(&speechA,"WAVE1.wav");
Loadwave(&speechB,"WAVE2.wav");
Loadwave(&speechC,"WAVE3.wav");
// in you main loop you must put a flag that is responsible to play
//the sound at the right time I recommend a "while(); case N" loop code
// I keep it simple below.
// PLAY WAVE 1
if(PlaySequence==1)
{
PlayVesselWave(speechA);
}
// PLAY WAVE 2
if(PlaySequence==2)
{
PlayVesselWave(speechB);
// now we are sure the slot "A" is useless it's time to load the WAV4 into it:
Loadwave(&speechA,"WAVE4.wav");
}
// PLAY WAVE 3
if(PlaySequence==3)
{
PlayVesselWave(speechC);
// now we are sure the slot "B" is useless it's time to load the WAV5 into it:
Loadwave(&speechB,"WAVE5.wav");
}
// PLAY WAVE 4
if(PlaySequence==4)
{
PlayVesselWave(speechA);
// now we are sure the slot "C" is useless it's time to load the WAV6 into it:
Loadwave(&speechC,"WAVE5.wav");
}
// NOW YOU CAN RUN FOREWER WHILE USING THIS SYSTEM:
// PLAY WAVE 5
if(PlaySequence==5)
{
PlayVesselWave(speechB);
// now we are sure the slot "A" is useless it's time to load the WAV7 into it:
Loadwave(&speechA,"WAVE6.wav");
}
etc etc etc
----------------------- END OF PSEUDO CODE -----------------------------------------
Tell me if it help or if you have some trouble to understand how it work
but this is the way to go, I use it myself in the DGII.
Dan