I am trying to use sync-points within sub-sounds. My sync-point/channel callback code works for a single stream but the callback seems to never be called while using sub-sounds(streams). I am adding sync-points to the sub-sounds and testing if they exist (which they do). But my channel callback never reports anything. Using FMOD_CHANNEL_CALLBACKTYPE_VIRTUALVOICE or FMOD_CHANNEL_CALLBACKTYPE_END seems to work.
- sohla asked 11 years ago
I’m running into the same problem as well! When setting up the subsounds I’m running a getNumSyncPoints and it’s returning the right number. When I set a callback on the parent channel FMOD_CHANNEL_CALLBACKTYPE_SYNCPOINT, it never triggers.
Is it a limitation of using subsounds?
- dgog answered 10 years ago
I’ve just run into this too…
I have a whole slew of music segments, which have sync points embedded at each bar. (packed into a streaming FSB, compressed as ADPCM)
I’m trying to use the gapless playback setSubSentence stuff from the samples, but I need access to the syncpoint callbacks so that I can quickly change music at bar markers (based on what’s going on in the game). I’m not getting the callbacks because I need to play the parent sound to play sentences)
If I can’t use the subSentence stuff, is there any other way to get sync points and gapless playback together?
Could I cue up (i.e. PlaySound my next subsound, but have it paused until the syncpoint callback on the current sample… at which point, I stop the current sample and unpause the new waiting sample)? (if a PlaySound with ‘start paused’ is issued, does it start to buffer immediately, or will it wait until it’s unpaused?)
OK, so it would also appear that I can’t buffer up the next sub sound because as soon as I perform a getSubSound on the parent FSB container – it triggers the END callback on my currently playing subsound stream.
So… back to my original question… How do I get syncpoint callbacks in a subsound sentence?
the sub-sounds functionality isn’t really set-up for dynamic switching between sounds/music (ie bars). the best way i found is to create a dsp and logic that does stuff for you, allowing accurate (bytes) to control, silence, triggering, envelope etc. it also can be useful because you may want cross-fades between your music’s (5-30ms etc) to avoid clicks.
another idea i just thought is some double buffer/channel with the same data/stream.
- sohla answered 9 years ago
Please login first to submit.