How to finish playing the current sound before jumping?


For example, right now audio1 and audio2 are controlled by a parameter, when the parameteris 0, it plays a1, and when it’s 1, it plays a2. So now, for instance, when a1 is playing, the parameter changes from 0 to 1, how can I make sure that the current track in audio1 finishes playing before starting the content of audio2?

Unfortunately there’s no easy way to do that in FMOD. Before giving you some insights, what should happen when the track is finished but the parameter value hasn’t changed? There’s no loop in your setup.

It now works on the basis of transition marks, and when the playback reaches the end, the current parameter is determined and the corresponding position is jumped. If I couldn’t finish playing it before the jump, I decided to abandon the idea.

There are probably some ways to achieve what you’re looking for, but please describe your goal with more details. From what I get, you’d like to play a random track from a A list, or a B list, depending on a parameter value, and when the track is finished, play another track, also depending at the curent parameter value. Isn’t it?

Now it runs like this.When started playing, played Audio A if the value of parameter is 0.And played Audio B if it is 1.For example, now it is at the end of Audio 1.There are two markers as To Marker A and To Marker B.All the functions of markers like A and B are the samed.Thats why I dont need to place loop regions here.And now the problem is I couldnt find any buttons or controls on FMOD to make sure that it can finished the sound playing before jumps :confused:.

So… Just to make sure I understand what you’re trying to do: You have two playlists, and a variable. When the variable is set to 0, you want to play sounds from playlist A; and when the variable is set to 1, you want to play sounds from playlist B. When the variable’s value changes, you want to wait for the playlist entry that’s currently playing to reach its end before you start playing something from the other playlist. Do I have that right?

Unfortunately, there is no easy way to achieve the behavior you describe in FMOD Studio. Which isn’t to say that it’s impossible, just that there are no tools to make it quick and easy: You’re going to have to lay all your playlist entries out along the timeline as synchronous instruments and use logic markers at the start and end of your instruments both to function as your playlists at those points and to handle switching between playlists.