0
0

What is the good / elegant way, to stop playing audio in a loop ( on demand)? I would like to play audio in a loop until I click a button. Then the track should be played until the end, and after that the loop should be broken.
I tried to do it in this way:
[code:rj6t0jbz] if (value)
sound1.setMode(FMOD.MODE.LOOP_NORMAL);
else
sound1.setMode(FMOD.MODE.LOOP_OFF);[/code:rj6t0jbz]
But it works only before a loop is started.

  • You must to post comments
0
0

You need to use Channel::setMode for channels that are already playing. Sound::setMode is the defaults for future playbacks of that sound.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.