Studio::Bus::lockChannelGroup

FMOD Studio API

Firelight Technologies FMOD Studio API

Studio::Bus::lockChannelGroup

Locks the Low Level ChannelGroup used by the bus.

C++ Syntax

FMOD_RESULT Studio::Bus::lockChannelGroup();

C Syntax

FMOD_RESULT FMOD_Studio_Bus_LockChannelGroup(FMOD_STUDIO_BUS *bus);

C# Syntax

RESULT Studio.Bus.lockChannelGroup();

JavaScript Syntax

Bus.lockChannelGroup();

Return Values

If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the FMOD_RESULT enumeration.

Remarks

Normally the ChannelGroup is created and destroyed on demand. This means it only exists if at least one event instance routes into the bus. This function forces the ChannelGroup to be created and to persist until Studio::Bus::unlockChannelGroup is called.

Note that the ChannelGroup may not be available immediately after calling this function. When Studio has been initialized in asynchronous mode, the ChannelGroup will not be created until the Studio::Bus::lockChannelGroup command has been executed in the async thread. When Studio has been initialized with FMOD_STUDIO_INIT_SYNCHRONOUS_UPDATE, the ChannelGroup will be available after the next Studio::System::update call.

You can call Studio::System::flushCommands to ensure the ChannelGroup has been created. Alternatively you can keep trying to obtain the ChannelGroup with Studio::Bus::getChannelGroup until it is ready.

See Also




Version 1.10.03 Built on Feb 1, 2018