Does FMOD Studio event can't control channel in code directly?

(Jong Ha Lee) #1

Hi all!

I made 2d / 3d 3ound event in FMOD Studio and play in my codes.

Because sounds was declicked, I want to set ChannelControl::setVolumeRamp() as false.
But when I trying, I can’t get ChannelControl instance from EventInstance and receive error code which is FMOD_ERR_STUDIO_NOT_LOADED.

how to access ChannelControl directly in FMOD Studio EventInstance?
I’ll appriciate any your suggestions.

(Cameron Baron) #2

Are you able to share some of the code you are using?

(Jong Ha Lee) #3

Heres are my codes.
EventDescStub is wrapper class of FMOD::Studio::EventDescription, and EventInstanceStub is wrapper class of FMOD::Studio::EventInstance.

FMOD::Studio::EventDescStub* pEventDesc = _GetEvent( “BlablaEventName” );
if( pEventDesc )
FMOD::Studio::EventInstanceStub* pEventInstance = pEventDesc->CreateInstance();
if( pEventInstance && pEventInstance->IsValid() )
pEventInstance->Start(); // Event Sound is created and played well.

    FMOD::ChanngelGroup* pChanngelGroup = pEventInstance->GetChannelGroup();
    if( pChanngelGroup )
         //  But pChannelGroup is always NULL, and FMOD_RESULT value is 
         pChanngelGroup->setVolumeRamp( false );

What’s the exactly meaning “channel group” in FMOD Studio?
( I knowed that in FMod EX, I could set channel in the “FMOD::Sound” Instance. Then, what’s the difference FMOD EX channel vs FMOD Studio ChannelGroup? )

Should I must set groups in FMOD Studio Tools for ramp?

Thanks for your Any suggestions.

(Cameron Baron) #4

An eventInstance’s channelGroup will only be available once the event has finished being created. This can take a little time, but there are a couple ways of doing this.

Have a look at our docs for some more information: