I tried to make event with multiple sound definitions to play combination "start-loop-stop". So I added first one-shot sound, looped sound and then last one-shot sound. So, when I trying to play it – only first sound playing.
May be I’m doing something wrong..?
Please, help me.
- torin_duboshit asked 11 years ago
We’re planning to add more time-based features in the future which will make things like this a lot easier. But for now, it should be possible to do it with the EVENT_CALLBACKTYPE_SOUNDDEF_INFO callback.
This callback gives you access to the FMOD::Sound * that is about to be played so you can get the length of the sound and calculate what the velocity of the parameter should be to make them line up with each other, then call EventParameter::setVelocity.
Hm… but in this case, sound designer must specify correct velocity and sound definition’s length. It’s too difficult task…
Sound definition’s length can be greater than real sound length, so we can get silence between sound definitions. Is it correct?
check sustain points! they allow you to stop parameter at certain value. for example, put start sound from 0-1, loop sound at 1-2 and end sound at 2-3.
on 1.5 set sustain point. if you press play now, the event will play start sound (if parameter velocity is set > 0) and stop at 1.5, where it will loop the loop sound. to unfreeze it call Keyoff from code on that parameter.
to create sustain point, right click on the parameter ruler.
- vesoljc answered 11 years ago
Sustain point helps to solve my problem (but may be only part of it :)).
What should I do to crossfade start sound and looped sound?
I can cross two sound definitions, but length of sound definition can be greater than real sound length…
Please login first to submit.