guys, i have a pistol sound being trigger by FMOD, sounds fine in designer, but ingame it intermittently cuts of the first several milliseconds. im getting just the "oom" of the "ka-boom".
its being loaded into memory uncompressed, (the way the fmod manual says to do it)
nothing is optimised at the moment so all sounds are being loaded the same way, and alot of the sounds are unoptimised 32bit floating point stereo and 16 bit stereo.
after listening to it more closley seems as tho all of the sound is there but is being faded in or panned in, also i have a machine gun sound that has a distant variant layer, it sometimes playes the distant variant for a split second when i start shooting even tho im an inch away from the sound source.
any one know whats happening here?
- simon kamakazi asked 8 years ago
hi peter thanx for ur reply
EventSystem::update is already being called every frame.
the sound is being cut off or faded in intermeitently so the first one may or may not play properly, some times i get 5 in a row that are fine but then the next few will be fading in. just luck of the draw is seems.
and the sounds play fine in event player, and i in designer. but only do this fading in thing in the game.
If it plays correctly in eventplayer, that would suggest that the issue is in your game. Can you try to modify one of the fmod examples so that it reproduces the behaviour your seeing in game, that can often help isolate the issue.
Also, is it only happening with one event or many events?
Just to be prudent let’s rule out some common problems:
*Does your game call FMOD functions from more than one thread?
*Are you checking the FMOD_RESULT returned from every FMOD function call?
it happends with several events.
in another instance i had a 2D interface type sound (short click) that worked fine untill i changed it to 3D, then it started doing the fade in.
ill ask my programer about the code stuff, and get him to talk to u derectly on here.
[quote:u2unwtwu]ill ask my programer about the code stuff, and get him to talk to u derectly on here. [/quote:u2unwtwu]
That would be great.
[quote:u2unwtwu]in another instance i had a 2D interface type sound (short click) that worked fine untill i changed it to 3D, then it started doing the fade in. [/quote:u2unwtwu]
It could be the way the game sets up 3D events, is event::start called before event::set3DAttributes? If so, it should be the other way around.
It’s hard to determine what exactly is going wrong there. I suspect it might be that you’re not calling EventSystem::update frequently enough. That should be called at least once per frame.
If it is just the first sound which doesn’t play correctly, it could be that it’s not properly loaded at the time it’s played, calling event::loadEventData before calling event::start would solve that.
A quick way to determine whether the problem(s) are in the game or the content is to try auditioning your event in FMOD EventPlayer or FMOD Sandbox.
Please login first to submit.