Hi… I’m still a noob with FMOD. Forgive me if this has already been answered elsewhere – I looked around.

In the docs it says you should start with sounds paused and configure the settings before unpausing. However, for events, it says this:


This function is not to be used unless needed for runtime reasons.

When our game starts up, there is a very loud glitch before normal playback occurs. So what could be causing this and how would I stop it happening?

Here is our event init code:


cAudioSystem::FMOD_CHECK( result = pEventSystem->getEventBySystemID( mEventID, FMOD_EVENT_INFOONLY, &mpAudioEvent));
if ( ! mpAudioEvent )

Vec vSoundPos;
FMOD_VECTOR soundPos = { vSoundPos.x, vSoundPos.y, vSoundPos.z };

cAudioSystem::FMOD_CHECK( result = mpAudioEvent->set3DAttributes(&soundPos, NULL, NULL) );

result = pEventSystem->getEventBySystemID( mEventID, FMOD_EVENT_DEFAULT, &mpAudioEvent);

if (FMOD_OK == result)
cAudioSystem::FMOD_CHECK( result = mpAudioEvent->start() );


Thanks in advance.

  • You must to post comments

You have totally overwritten your 3d positioned event handle with a new, fresh event. Don’t do that.

  • You must to post comments

The first call uses FMOD_EVENT_INFOONLY so that it has valid 3D position information for the setAttributes call. It does this in the sample code.

  • You must to post comments

You are not using getInfo so don’t use that first getevent at all. If you’re using failonquietest behaviour this is another reason to do that, but set the 3d position for the handle you’re about to play.

Your glitch is probbaly just the sound playing at the listener position for 1 frame.

  • You must to post comments

It does sound like that is what’s happening. I am basically trying to do what the max playbacks example code does though…

[code:1nthdnfl] /* The ‘Just fail if quietest’ behaviour calculates the expected
volume of the event based on the properties of the info-only
event, so we have to get the info-only event first and set it
up appropriately.

                // get the info-only event to set up for volume calculation
                ERRCHECK(result = eventgroup->getEvent(name, FMOD_EVENT_INFOONLY, &event));

                /* set the desired properties on the info-only event
                   - distances below the event's 3D Min Distance all give the
                     same volume; in this case, getEvent will just fail
                   - we could set other volume-affecting properties here as
                     well (e.g. orientation if the event has a falloff cone)

                // attempt to get a real event instance
                result = eventgroup->getEvent(name, FMOD_EVENT_DEFAULT, &event);
                if (result == FMOD_OK)
                    printf("getEvent(\"%s\") succeeded\n", name);

                    /* we don't need to set the position of the instance,
                       as it is copied from the info-only event, but we
                       do need to set the parameter value.
                    FMOD::EventParameter *param;
                    ERRCHECK(result = event->getParameter("sound", &param));
                    ERRCHECK(result = param->setValue(g_sound));
                    ERRCHECK(result = event->start());


It’s possible that audio playback starts before the game objects are positioned properly so I would get this effect on many objects – it may not be anything to do with starting the sounds paused. I will look into it further and post my results. Thanks very much.

  • You must to post comments
Showing 4 results
Your Answer

Please first to submit.