Answered
0
0

I am trying to write an adaptive music system using FMOD. For this, I need to be able to play back multiple sounds in sequence without a noticeable gap. So far though, I can’t find an appropriate way to do this using the API. There seem to be ‘end of playback’ events, but these are only dispatched at invocation of System::update(), making it likely that the gap between the sound clips would be noticeable. Ideally, the sound files would be streaming sounds, but if needed, they could be async loaded wav files that are resident in memory.

What is the appropriate way to implement such a system using the FMOD ask? Does anyone have experience writing something similar?

  • You must to post comments
Best Answer
0
0

The best way imo is to use Channel::setDelay. You can play 2 sounds at once and have one delay at the exact point that the first one ends, with no gaps.
There is also Sound::setSubSoundSentence which is demonstrated in the /examples/realtimestitching example, but we’re deprecating that usage as its not great for small realtime swapping of sounds that are streaming, it has been removed in FMOD Studio in favour of using setDelay.

  • Alan Wolfe
    Is there a way to do this without playing both sounds at once? Like in a situation where it's not knowable at the start how many sounds will need to be played total, or what order that they will need to be played in? Thanks!
  • Mathew Block
    You need two sounds playing at once scheduled ahead of time to make setDelay work seamlessly. They don't need to be playing together the whole time though, as one sound comes to an end and you know which sound to play next, you schedule an end delay for one, then a start delay for the other (at the same time).
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.