0
0

hey guys,

i have a rifle, it has a one shot sound for its first bullet, second bullet onwards it has a loop.

we are triggering both loop and single shot at the same time, and i have delayed the playback of the loop to come in at the right time using a paramater.

now the problem is that in the game (and also in designer) the amount of time the loop gets delayed is very inconsistent.
somtimes it will play almost at the same time as the single shot, othertimes it will sound like it skipps a shot.

we had a similar problem when trying to use 1 shot sounds for each bullet, the timing was way off and it would stutter, slow down speed up..

is there a way to make fmod more responsice to these small timeframes?

thanx

  • You must to post comments
0
0

Just guessing here, but it sounds like you’re suffering from frame-rate issues. Stuttering single shots and inconsistent timings for parameters updates are often caused by dips in the game’s overall framerate. One way around it is to run your audio on a separate thread, if you’re able to. Another, if your games has its framerate locked to a specfic value, is to ensure that your fire rates divide nicely by the frame-rate. e.g. if you weapon’s fire rate is 500 rounds per minute and your frame rate is 30FPS then a round fires every 3.6 frames. That means that only every fifth round actually lands on a frame so your weapons will stutter. If your weapon fires at 600 rounds per minute then a round fires every 3 frames so it will be less likely to suffer. Even then, your request for gunshot sounds will still probably come from a thread that may suffer from frame rate and timing issues. In that case you have to divorce you gunshot requests entirely form the rest of the game.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.