0
0

Hello,

For a variety of reasons, I would like to not loop a song, but still use FMOD_LOOP_NORMAL, so that when the song completes it doesn’t free the channel.

I took a look at FMOD_CHANNEL_CALLBACKTYPE_END, but this doesn’t seem to be called when a song is being looped. Is that true? Is there another way to accomplish this? Thanks!

  • George
  • You must to post comments
0
0

Bump.. Any suggestions? Thanks!

  • You must to post comments
0
0

I’m not sure why you want to do that, but I’ll assume that you have a good reason :)

The best way I can think of to do this would be to use Sound::addSynchPoint() to add a sync point to the end of your sound. Then you can mute or pause the sound in the FMOD_CHANNEL_CALLBACKTYPE_SYNCPOINT case of the callback.

Hope that helps.

  • You must to post comments
0
0

Thanks Adiss!

I will give that a shot. It looks promising!

  • George
  • You must to post comments
0
0

from memory; to us sync-point this way it needs to be set at audio_file_length – 1 but its been a while. also, (again from memory) you can re-use a channel by passing both the index and/or channel pointer in a playSound call. the index value can also be used to flag to say the pointer channel you are passing is to be (re)used. i’m guessing that the channel isn’t marked as unused in the pool, thus retained. of coarse, i too am curious as to why 😮

  • You must to post comments
Showing 4 results
Your Answer

Please first to submit.