[C#] playSound with timer


(launcher) #1
result = launchPad.playSound(FMOD.CHANNELINDEX.FREE, bass, onStop[0], ref center);
result = launchPad.playSound(FMOD.CHANNELINDEX.FREE, beat, onStop[1], ref center1);
result = launchPad.playSound(FMOD.CHANNELINDEX.FREE, organ, onStop[2], ref center2);

I’m playing 3 sounds every on time with interval set timer.Tick.

Its playing about 10 times, however, I found the 1st and 2nd sound are stopped.
And 3rd is still playing.

what’s the problem? I cant find the problem…


(Nicholas Wilcox) #2

Are you calling System.Update() on a regular basis?


(launcher) #3

I didn’t call System.Update().
however, what is regular basis?


And I fixed the logic to play loop…


(Nicholas Wilcox) #4

Is designed to be called every frame. So 30 or more times a second.