-
Notifications
You must be signed in to change notification settings - Fork 3
bus
FMOD Object: Studio::Bus
This module has functionality for global mixer buses.
This module offers a collection of functions designed to address specific tasks and provide utilities for various purposes. Explore the available functions to make the most of the functionalities provided by this module.
- fmod_studio_bus_set_paused
- fmod_studio_bus_get_paused
- fmod_studio_bus_stop_all_events
- fmod_studio_bus_set_volume
- fmod_studio_bus_get_volume
- fmod_studio_bus_set_mute
- fmod_studio_bus_get_mute
- fmod_studio_bus_set_port_index
- fmod_studio_bus_get_port_index
- fmod_studio_bus_get_channel_group
- fmod_studio_bus_lock_channel_group
- fmod_studio_bus_unlock_channel_group
- fmod_studio_bus_get_cpu_usage
- fmod_studio_bus_get_memory_usage
- fmod_studio_bus_get_id
- fmod_studio_bus_get_path
- fmod_studio_bus_is_valid
FMOD Function: Studio::Bus::setPaused
This function allows pausing/unpausing of all audio routed into the bus.
An individual pause state is kept for each bus. Pausing a bus will override the pause state of its inputs (meaning they return true from fmod_studio_bus_get_paused), while unpausing a bus will cause its inputs to obey their individual pause state. The pause state is processed in the Studio system update, so fmod_studio_bus_get_paused will return the state as determined by the last update.
Syntax:
fmod_studio_bus_set_paused(bus_ref, pause)
Argument | Type | Description |
---|---|---|
bus_ref | Real | A reference to a bus. |
pause | Boolean |
true to pause the bus, false to unpause. |
Returns:
N/A
FMOD Function: Studio::Bus::getPaused
This function retrieves the pause state of the given bus, returning true
if paused and false
if unpaused.
Syntax:
fmod_studio_bus_get_paused(bus_ref)
Argument | Type | Description |
---|---|---|
bus_ref | Real | A reference to a bus. |
Returns:
FMOD Function: Studio::Bus::stopAllEvents
This function stops all event instances that are routed into the bus. You pass it an FMOD_STUDIO_STOP_MODE enum member.
Syntax:
fmod_studio_bus_stop_all_events(bus_ref, stop_mode)
Argument | Type | Description |
---|---|---|
bus_ref | Real | A reference to a bus. |
stop_mode | FMOD_STUDIO_STOP_MODE | The stop mode to use. |
Returns:
N/A
FMOD Function: Studio::Bus::setVolume
This function sets the volume level of the bus.
This volume is applied as a scaling factor to the volume level set in FMOD Studio.
Syntax:
fmod_studio_bus_set_volume(bus_ref, volume)
Argument | Type | Description |
---|---|---|
bus_ref | Real | A reference to a bus. |
volume | Real | Volume level. Negative level inverts the signal. Linear unit, range (-inf, inf), default: 1 |
Returns:
N/A
FMOD Function: Studio::Bus::getVolume
This function retrieves the volume level of the bus.
Syntax:
fmod_studio_bus_get_volume(bus_ref)
Argument | Type | Description |
---|---|---|
bus_ref | Real | A reference to a bus. |
Returns:
FMOD Function: Studio::Bus::setMute
This function sets the mute state of the bus.
Mute is an additional control for volume, the effect of which is equivalent to setting the volume to zero.
An individual mute state is kept for each bus. Muting a bus will override the mute state of its inputs (meaning they return true
from fmod_studio_bus_get_mute), while unmuting a bus will cause its inputs to obey their individual mute state. The mute state is processed in the Studio system update, so fmod_studio_bus_get_mute will return the state as determined by the last update.
Syntax:
fmod_studio_bus_set_mute(bus_ref, mute)
Argument | Type | Description |
---|---|---|
bus_ref | Real | A reference to a bus. |
mute | Real |
true to mute, false to unmute. |
Returns:
N/A
FMOD Function: Studio::Bus::getMute
This function retrieves the mute state. This will be true
if muted and false
if not.
Syntax:
fmod_studio_bus_get_mute(bus_ref)
Argument | Type | Description |
---|---|---|
bus_ref | Real | A reference to a bus. |
Returns:
FMOD Function: Studio::Bus::setPortIndex
This function sets the port index to use when attaching to an output port.
When a bus which is an output port is instantiated it will be connected to an output port based on the port type set in Studio. For some port types a platform specific port index is required to connect to the correct output port. For example, if the output port type is a speaker in a controller then a platform specific port index may be required to specify which controller the bus is to attach to. In such a case call this function passing the platform specific port index.
There is no need to call this function for port types which do not require an index.
This function may be called at any time after a bank containing the bus has been loaded.
Syntax:
fmod_studio_bus_set_port_index(bus_ref, port_index)
Argument | Type | Description |
---|---|---|
bus_ref | Real | A reference to a bus. |
port_index | FMOD_PORT_INDEX | Port index to use when attaching to an output port. |
Returns:
N/A
FMOD Function: Studio::Bus::getPortIndex
This function retrieves the port index assigned to the bus, as a FMOD_PORT_INDEX enum member.
Syntax:
fmod_studio_bus_get_port_index(bus_ref)
Argument | Type | Description |
---|---|---|
bus_ref | Real | A reference to a bus. |
Returns:
FMOD Function: Studio::Bus::getChannelGroup
This function retrieves the core ChannelGroup.
By default the ChannelGroup will only exist when it is needed; see Signal Paths for details. If the ChannelGroup does not exist, the next call to fmod_last_result will return FMOD_RESULT.ERR_STUDIO_NOT_LOADED
.
Syntax:
fmod_studio_bus_get_channel_group(bus_ref)
Argument | Type | Description |
---|---|---|
bus_ref | Real | A reference to a bus. |
Returns:
FMOD Function: Studio::Bus::lockChannelGroup
This function locks the core ChannelGroup.
This forces the system to create the ChannelGroup and keep it available until fmod_studio_bus_unlock_channel_group is called. See Signal Paths for details.
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 command has been executed in the async thread. When Studio has been initialized with FMOD_STUDIO_INIT.SYNCHRONOUS_UPDATE
, the ChannelGroup will be created in the next fmod_studio_system_update call.
You can call fmod_studio_system_flush_commands to ensure the ChannelGroup has been created. Alternatively you can keep trying to obtain the ChannelGroup via fmod_studio_bus_get_channel_group until it is ready.
Syntax:
fmod_studio_bus_lock_channel_group(bus_ref)
Argument | Type | Description |
---|---|---|
bus_ref | Real | A reference to a bus. |
Returns:
N/A
FMOD Function: Studio::Bus::unlockChannelGroup
This function unlocks the core ChannelGroup.
This allows the system to destroy the ChannelGroup when it is not needed. See Signal Paths for details.
Syntax:
fmod_studio_bus_unlock_channel_group(bus_ref)
Argument | Type | Description |
---|---|---|
bus_ref | Real | A reference to a bus. |
Returns:
N/A
FMOD Function: Studio::Bus::getCPUUsage
This function retrieves the bus CPU usage data.
FMOD_INIT.PROFILE_ENABLE
with fmod_system_init is required to call this function.
Syntax:
fmod_studio_bus_get_cpu_usage(bus_ref)
Argument | Type | Description |
---|---|---|
bus_ref | Real | A reference to a bus. |
Returns:
FMOD Function: Studio::Bus::getMemoryUsage
This function retrieves memory usage statistics into an FmodStudioMemoryUsage struct.
Memory usage statistics are only available in logging builds, in release builds this will contain zero for all values after calling this function.
Syntax:
fmod_studio_bus_get_memory_usage(bus_ref)
Argument | Type | Description |
---|---|---|
bus_ref | Real | A reference to a bus. |
Returns:
FMOD Function: Studio::Bus::getID
This function retrieves the GUID of the given bus.
Syntax:
fmod_studio_bus_get_id(bus_ref)
Argument | Type | Description |
---|---|---|
bus_ref | Real | A reference to a bus. |
Returns:
FMOD Function: Studio::Bus::getPath
This function retrieves the path of the bus.
The strings bank must be loaded prior to calling this function, otherwise FMOD_RESULT.ERR_EVENT_NOTFOUND
is returned in the next call to fmod_last_result.
Syntax:
fmod_studio_bus_get_path(bus_ref)
Argument | Type | Description |
---|---|---|
bus_ref | Real | A reference to a bus. |
Returns:
FMOD Function: Studio::Bus::isValid
This function checks that the Bus reference is valid, returning true
or false
.
Syntax:
fmod_studio_bus_is_valid(bus_ref)
Argument | Type | Description |
---|---|---|
bus_ref | Real | A reference to a bus. |
Returns:
YoYoGames 2024