Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -136,4 +136,4 @@ config.log
demo/addons/fmod/libs/android/aar/

*.pdb
.vs
.vs__pycache__/
5 changes: 5 additions & 0 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ sources = [
Glob('src/plugins/*.cpp')
]

# Add documentation data for editor and debug builds
if env["target"] in ["editor", "template_debug"]:
doc_data = env.GodotCPPDocData("src/gen/doc_data.gen.cpp", source=Glob("doc_classes/*.xml"))
sources.append(doc_data)

lfix = ""
debug = False
if env["target"] == "template_debug" or env["target"] == "editor":
Expand Down
83 changes: 83 additions & 0 deletions doc_classes/FmodBank.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="FmodBank" inherits="RefCounted" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/godotengine/godot/master/doc/class.xsd">
<brief_description>
Represents a loaded FMOD Studio bank containing audio content and metadata.
</brief_description>
<description>
FmodBank represents a loaded FMOD Studio bank file. Banks are containers that hold audio content including event definitions, audio samples, bus configurations, and VCA settings.

Banks are created by FMOD Studio and contain:
- Event descriptions that define how audio events behave
- Audio samples (unless streamed from separate files)
- Bus hierarchy for mixing and effects
- VCA (Volume Control Automation) configurations
- String tables for event/bus/VCA names

Banks can be loaded synchronously or asynchronously. Use [method FmodServer.load_bank] to load banks and [method get_loading_state] to check if an asynchronous load has completed.

Banks must be loaded before their contained events, buses, or VCAs can be used. Typically, you'll load a "Master" bank first (which contains bus/VCA definitions) followed by content banks containing specific events.
</description>
<tutorials>
</tutorials>
<methods>
<method name="get_bus_count">
<return type="int" />
<description>
Returns the number of buses defined in this bank.
</description>
</method>
<method name="get_bus_list">
<return type="Array" />
<description>
Returns an array of all [FmodBus] objects defined in this bank.
</description>
</method>
<method name="get_description_list">
<return type="Array" />
<description>
Returns an array of all [FmodEventDescription] objects defined in this bank.
</description>
</method>
<method name="get_event_description_count">
<return type="int" />
<description>
Returns the number of event descriptions defined in this bank.
</description>
</method>
<method name="get_loading_state">
<return type="int" />
<description>
Returns the loading state of the bank. See FMOD_STUDIO_LOADING_STATE enum for possible values:
- FMOD_STUDIO_LOADING_STATE_UNLOADING: Bank is being unloaded
- FMOD_STUDIO_LOADING_STATE_UNLOADED: Bank is not loaded
- FMOD_STUDIO_LOADING_STATE_LOADING: Bank is currently loading
- FMOD_STUDIO_LOADING_STATE_LOADED: Bank is fully loaded and ready
- FMOD_STUDIO_LOADING_STATE_ERROR: An error occurred during loading
</description>
</method>
<method name="get_string_count">
<return type="int" />
<description>
Returns the number of strings in the bank's string table. This includes names for events, buses, VCAs, and parameters.
</description>
</method>
<method name="get_vca_count">
<return type="int" />
<description>
Returns the number of VCAs (Volume Control Automation) defined in this bank.
</description>
</method>
<method name="get_vca_list">
<return type="Array" />
<description>
Returns an array of all [FmodVCA] objects defined in this bank.
</description>
</method>
<method name="update_bank_data">
<return type="void" />
<description>
Forces an update of the bank's cached data including event descriptions, buses, and VCAs. This is typically called automatically but can be useful if the bank content changes at runtime.
</description>
</method>
</methods>
</class>
43 changes: 43 additions & 0 deletions doc_classes/FmodBankLoader.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="FmodBankLoader" inherits="Node" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/godotengine/godot/master/doc/class.xsd">
<brief_description>
A node for automatically loading FMOD Studio banks when entering the scene tree.
</brief_description>
<description>
FmodBankLoader is a utility node that automatically loads FMOD Studio bank files when it enters the scene tree. This provides a convenient way to ensure that required audio content is loaded before it's needed.

Banks contain the audio content and metadata for FMOD Studio events, including:
- Event definitions and parameters
- Audio samples (if not streamed)
- Bus and VCA configurations
- Mixing and effect settings

The node accepts an array of bank file paths and loads them all when _enter_tree() is called. Banks are loaded with the default loading mode, which is typically asynchronous to avoid blocking the main thread.

This is particularly useful for loading banks at the start of a level or scene, ensuring all required audio content is available when events are played.

Note: Banks must be available in the project's resources or file system at the specified paths.
</description>
<tutorials>
</tutorials>
<methods>
<method name="get_bank_paths">
<return type="Array" />
<description>
Returns the array of bank file paths that will be loaded by this node.
</description>
</method>
<method name="set_bank_paths">
<return type="void" />
<param index="0" name="p_paths" type="Array" />
<description>
Sets the array of bank file paths to load. Each path should be a string pointing to a .bank file. The banks will be loaded when the node enters the scene tree.
</description>
</method>
</methods>
<members>
<member name="bank_paths" type="Array" setter="set_bank_paths" getter="get_bank_paths" default="[]">
An array of file paths to FMOD Studio bank files (.bank) that should be loaded when this node enters the scene tree. Paths should be relative to the project or absolute file paths.
</member>
</members>
</class>
71 changes: 71 additions & 0 deletions doc_classes/FmodBus.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="FmodBus" inherits="RefCounted" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/godotengine/godot/master/doc/class.xsd">
<brief_description>
Represents an FMOD Studio bus for audio mixing and effects processing.
</brief_description>
<description>
FmodBus represents an FMOD Studio bus, which is a mixing channel in the audio pipeline. Buses are used to group audio signals together for collective processing, volume control, and effects application.

Buses form a hierarchy where audio from events flows through buses and their parent buses until reaching the master bus. This allows for:
- Grouped volume control (e.g., "Music", "SFX", "Voice" buses)
- Collective effects processing (e.g., reverb on all music)
- Ducking and sidechaining between bus groups
- Centralized mixing control

Buses are defined in FMOD Studio and loaded as part of bank files. Use [method FmodServer.get_bus] to obtain bus references from loaded banks.

Operations on buses affect all events and child buses routing through them, making buses powerful tools for dynamic mixing control.
</description>
<tutorials>
</tutorials>
<methods>
<method name="get_mute">
<return type="bool" />
<description>
Returns [code]true[/code] if the bus is currently muted.
</description>
</method>
<method name="get_paused">
<return type="bool" />
<description>
Returns [code]true[/code] if the bus is currently paused.
</description>
</method>
<method name="get_volume">
<return type="float" />
<description>
Returns the current volume level of the bus. This is a multiplier where 1.0 is the original volume set in FMOD Studio.
</description>
</method>
<method name="set_mute">
<return type="void" />
<param index="0" name="mute" type="bool" />
<description>
Mutes or unmutes the bus. When muted, no audio will pass through this bus or its child buses.
</description>
</method>
<method name="set_paused">
<return type="void" />
<param index="0" name="paused" type="bool" />
<description>
Pauses or unpauses the bus. When paused, all audio processing through this bus is suspended, but events continue running.
</description>
</method>
<method name="set_volume">
<return type="void" />
<param index="0" name="volume" type="float" />
<description>
Sets the volume level of the bus. This is a multiplier where 1.0 is the original volume set in FMOD Studio. Values greater than 1.0 will amplify the audio.
</description>
</method>
<method name="stop_all_events">
<return type="void" />
<param index="0" name="stopMode" type="int" />
<description>
Stops all events currently routing through this bus. The stopMode parameter controls how the events are stopped:
- FMOD_STUDIO_STOP_ALLOWFADEOUT: Allow events to fade out naturally
- FMOD_STUDIO_STOP_IMMEDIATE: Stop events immediately
</description>
</method>
</methods>
</class>
Loading
Loading