Maybe its how im doing it but the sound doesn't go from one "block" of sound to the next "block" of sound.....
Im trying to get the sound for the ROQ's to work right (Video format used in Q3 Engines). Each frame can have a varible length of sound attached to it. The prog shoves the sound into a array (for each frame that passes) until the current sound "block" has been played. Once its been played it shoves the array into memory, clears it and then begins the process again. The problem being when does the sound finish.
Code:
If Cinematic.State=1then//if Cinematic.AudioSampleOffset > 0 then
if Cinematic.AudioTime >=(Cinematic.CurAudioBufferLength/2)*(1/22050)then
I'm not that familiar with FMod but I think, you should queue the buffers. Right now, you simply play a buffer and wait for it to be finished. Then you play the next one. Now what happens if the souncard is done right after your "if Cinematic.AudioTime >= (Cinematic.CurAudioBufferLength/2)*(1/22050)" and has to wait for the mainloop to repeat? I guess thats your small pause.
I would keep at least one more buffer in the queue, so that your soundcard can switch to the next buffer as soon as it is finished with the current one...
I remember some callback mode in fmod, where fmod is asking for new data when needed. This works well as long as your program consumes similar times for preparing the next part of sound. I used this mechanism for my simple synthesizer tutors.
Mitglieder in diesem Forum: 0 Mitglieder und 44 Gäste
Du darfst keine neuen Themen in diesem Forum erstellen. Du darfst keine Antworten zu Themen in diesem Forum erstellen. Du darfst deine Beiträge in diesem Forum nicht ändern. Du darfst deine Beiträge in diesem Forum nicht löschen. Du darfst keine Dateianhänge in diesem Forum erstellen.