FMOD API User Manual 2.00
The main system object for FMOD Studio.
Initializing the FMOD Studio System object will also initialize the core System object.
Lifetime:
Update:
Banks:
Listeners:
Buses:
Events:
Parameters:
VCAs:
Advanced settings:
Command capture and replay:
Profiling:
Plugins:
System callback:
Sound table:
General:
Settings for advanced features like configuring memory and cpu usage.
typedef struct FMOD_STUDIO_ADVANCEDSETTINGS {
int cbsize;
unsigned int commandqueuesize;
unsigned int handleinitialsize;
int studioupdateperiod;
int idlesampledatapoolsize;
unsigned int streamingscheduledelay;
const char* encryptionkey;
} FMOD_STUDIO_ADVANCEDSETTINGS;
sizeof(FMOD_STUDIO_ADVANCEDSETTINGS) before calling Studio::System::setAdvancedSettings or Studio::System::getAdvancedSettings.Command queue size for studio async processing.
Initial size to allocate for handles. Memory for handles will grow as needed in pages.
Update period of Studio when in async mode, in milliseconds. Will be quantized to the nearest multiple of mixer duration.
Size in bytes of sample data to retain in memory when no longer used, to avoid repeated disk I/O. Use -1 to disable.
Specify the schedule delay for streams, in samples. Lower values can reduce latency when scheduling events containing streams but may cause scheduling issues if too small.
When calling Studio::System::setAdvancedSettings any member other than cbsize may be set to zero to use the default value for that setting.
Information for loading a bank using user callbacks.
typedef struct FMOD_STUDIO_BANK_INFO {
int size;
void *userdata;
int userdatalength;
FMOD_FILE_OPEN_CALLBACK opencallback;
FMOD_FILE_CLOSE_CALLBACK closecallback;
FMOD_FILE_READ_CALLBACK readcallback;
FMOD_FILE_SEEK_CALLBACK seekcallback;
} FMOD_STUDIO_BANK_INFO;
sizeof(FMOD_STUDIO_BANK_INFO).See Also: Studio::System::loadBankCustom
Information for a single buffer in FMOD Studio.
typedef struct FMOD_STUDIO_BUFFER_INFO {
int currentusage;
int peakusage;
int capacity;
int stallcount;
float stalltime;
} FMOD_STUDIO_BUFFER_INFO;
See Also: FMOD_STUDIO_BUFFER_USAGE
Information for FMOD Studio buffer usage.
typedef struct FMOD_STUDIO_BUFFER_USAGE {
FMOD_STUDIO_BUFFER_INFO studiocommandqueue;
FMOD_STUDIO_BUFFER_INFO studiohandle;
} FMOD_STUDIO_BUFFER_USAGE;
See Also: Studio::System::getBufferUsage
Flags controling command capture.
#define FMOD_STUDIO_COMMANDCAPTURE_NORMAL 0x00000000
#define FMOD_STUDIO_COMMANDCAPTURE_FILEFLUSH 0x00000001
#define FMOD_STUDIO_COMMANDCAPTURE_SKIP_INITIAL_STATE 0x00000002
See Also: Studio::System::startCommandCapture
Flags controlling command replay.
#define FMOD_STUDIO_COMMANDREPLAY_NORMAL 0x00000000
#define FMOD_STUDIO_COMMANDREPLAY_SKIP_CLEANUP 0x00000001
#define FMOD_STUDIO_COMMANDREPLAY_FAST_FORWARD 0x00000002
#define FMOD_STUDIO_COMMANDREPLAY_SKIP_BANK_LOAD 0x00000004
See Also: Studio::System::loadCommandReplay
Performance information for FMOD Studio and core systems.
typedef struct FMOD_STUDIO_CPU_USAGE {
float dspusage;
float streamusage;
float geometryusage;
float updateusage;
float studiousage;
} FMOD_STUDIO_CPU_USAGE;
See Also: Studio::System::getCPUUsage
Studio System initialization flags.
#define FMOD_STUDIO_INIT_NORMAL 0x00000000
#define FMOD_STUDIO_INIT_LIVEUPDATE 0x00000001
#define FMOD_STUDIO_INIT_ALLOW_MISSING_PLUGINS 0x00000002
#define FMOD_STUDIO_INIT_SYNCHRONOUS_UPDATE 0x00000004
#define FMOD_STUDIO_INIT_DEFERRED_CALLBACKS 0x00000008
#define FMOD_STUDIO_INIT_LOAD_FROM_UPDATE 0x00000010
#define FMOD_STUDIO_INIT_MEMORY_TRACKING 0x00000020
See Also: Studio::System::initialize
Flags to controlling bank loading.
#define FMOD_STUDIO_LOAD_BANK_NORMAL 0x00000000
#define FMOD_STUDIO_LOAD_BANK_NONBLOCKING 0x00000001
#define FMOD_STUDIO_LOAD_BANK_DECOMPRESS_SAMPLES 0x00000002
#define FMOD_STUDIO_LOAD_BANK_UNENCRYPTED 0x00000004
See Also: Studio::System::loadBankFile, Studio::System::loadBankMemory, Studio::System::loadBankCustom
Required memory alignment of banks in user memory.
#define FMOD_STUDIO_LOAD_MEMORY_ALIGNMENT 32
See Also: Studio::System::loadBankMemory
Specifies how to use the memory buffer passed to Studio::System::loadBankMemory.
typedef enum FMOD_STUDIO_LOAD_MEMORY_MODE {
FMOD_STUDIO_LOAD_MEMORY,
FMOD_STUDIO_LOAD_MEMORY_POINT
} FMOD_STUDIO_LOAD_MEMORY_MODE;
See Also: Studio::System::loadBankMemory
Describes a sound in the audio table.
typedef struct FMOD_STUDIO_SOUND_INFO {
const char *name_or_data;
FMOD_MODE mode;
FMOD_CREATESOUNDEXINFO exinfo;
int subsoundindex;
} FMOD_STUDIO_SOUND_INFO;
See Also: Studio::System::getSoundInfo
Callback for Studio system events.
FMOD_RESULT F_CALLBACK FMOD_STUDIO_SYSTEM_CALLBACK(
FMOD_STUDIO_SYSTEM *system,
FMOD_STUDIO_SYSTEM_CALLBACK_TYPE type,
void *commanddata,
void *userdata
);
system can be cast to Studio::System *.
See Also: Callback Behavior
Callback types for the Studio System callback.
#define FMOD_STUDIO_SYSTEM_CALLBACK_PREUPDATE 0x00000001
#define FMOD_STUDIO_SYSTEM_CALLBACK_POSTUPDATE 0x00000002
#define FMOD_STUDIO_SYSTEM_CALLBACK_BANK_UNLOAD 0x00000004
#define FMOD_STUDIO_SYSTEM_CALLBACK_ALL 0xFFFFFFFF
commanddata argument will be the bank handle.See Also: Callback Behavior, FMOD_STUDIO_SYSTEM_CALLBACK, Studio::System::setCallback
FMOD Studio System creation function.
static FMOD_RESULT Studio::System::create(
Studio::System **system,
unsigned int headerversion = FMOD_VERSION
);
Pass FMOD_VERSION in headerversion to ensure the library and header versions being used match.
Call Studio::System::release to free the Studio System.
Studio::System::create and Studio::System::release are not thread-safe. Calling either of these functions concurrently with any FMOD Studio API function (including these two functions) may cause undefined behavior. External synchronization must be used if calls to Studio::System::create or Studio::System::release could overlap other FMOD Studio API calls. All other FMOD Studio API functions are thread safe and may be called freely from any thread unless otherwise documented.
See Also: Creating the Studio System
Block until all pending commands have been executed.
FMOD_RESULT Studio::System::flushCommands();
This function blocks the calling thread until all pending commands have been executed and all non-blocking bank loads have been completed.
This is equivalent to calling Studio::System::update and then sleeping until the asynchronous thread has finished executing all pending commands.
See Also: Studio::System::initialize, Studio::System::update, Studio::System::flushSampleLoading
Block until all sample loading and unloading has completed.
FMOD_RESULT Studio::System::flushSampleLoading();
This function may stall for a long time if other threads are continuing to issue calls to load and unload sample data, e.g. by creating new event instances.
See Also: Studio::System::flushCommands, Sample Data Loading
Retrieves advanced settings.
FMOD_RESULT Studio::System::getAdvancedSettings(
FMOD_STUDIO_ADVANCEDSETTINGS *settings
);
See Also: Studio::System::setAdvancedSettings
Retrieves a loaded bank.
FMOD_RESULT Studio::System::getBank(
const char *path,
Studio::Bank **bank
);
path may be a path, such as bank:/Weapons or an ID string such as {793cddb6-7fa1-4e06-b805-4c74c0fd625b}.
Note that path lookups will only succeed if the strings bank has been loaded.
See Also: Studio::System::getBankByID
Retrieves a loaded bank.
FMOD_RESULT Studio::System::getBankByID(
const FMOD_GUID *id,
Studio::Bank **bank
);
See Also: Studio::parseID, Studio::System::lookupID, Studio::System::getBank
Retrieves the number of loaded banks.
FMOD_RESULT Studio::System::getBankCount(
int *count
);
May be used in conjunction with Studio::System::getBankList to enumerate the loaded banks.
Retrieves the loaded Banks.
FMOD_RESULT Studio::System::getBankList(
Studio::Bank **array,
int capacity,
int *count
);
array.array.May be used in conjunction with Studio::System::getBankCount to enumerate the loaded banks.
Retrieves buffer usage information.
FMOD_RESULT Studio::System::getBufferUsage(
FMOD_STUDIO_BUFFER_USAGE *usage
);
Stall count and time values are cumulative. They can be reset by calling Studio::System::resetBufferUsage.
Stalls due to the studio command queue overflowing can be avoided by setting a larger command queue size with Studio::System::setAdvancedSettings.
Retrieves a loaded bus.
FMOD_RESULT Studio::System::getBus(
const char *path,
Studio::Bus **bus
);
This function allows you to retrieve a handle for any bus in the global mixer.
path may be a path, such as bus:/SFX/Ambience, or an ID string, such as {d9982c58-a056-4e6c-b8e3-883854b4bffb}.
Note that path lookups will only succeed if the strings bank has been loaded.
See Also: Studio::System::getBusByID
Retrieves a loaded bus.
FMOD_RESULT Studio::System::getBusByID(
const FMOD_GUID *id,
Studio::Bus **bus
);
This function allows you to retrieve a handle for any bus in the global mixer.
See Also: Studio::System::getBus
Retrieves the Core System.
FMOD_RESULT Studio::System::getCoreSystem(
System **system
);
The Core System object can be retrieved before initializing the Studio System object to call additional core configuration functions.
See Also: System::setFileSystem, System::setDSPBufferSize, System::setSoftwareChannels, System::setSoftwareFormat, System::setAdvancedSettings, System::setCallback
Retrieves performance information.
FMOD_RESULT Studio::System::getCPUUsage(
FMOD_STUDIO_CPU_USAGE *usage
);
Retrieves an EventDescription.
FMOD_RESULT Studio::System::getEvent(
const char *path,
Studio::EventDescription **event
);
This function allows you to retrieve a handle to any loaded event description.
path may be a path, such as event:/UI/Cancel or snapshot:/IngamePause, or an ID string, such as {2a3e48e6-94fc-4363-9468-33d2dd4d7b00}.
Note that path lookups will only succeed if the strings bank has been loaded.
See Also: Studio::parseID, Studio::System::lookupID, Studio::System::getEventByID, Studio::EventDescription::isSnapshot, Studio::EventDescription::createInstance
Retrieves an EventDescription.
FMOD_RESULT Studio::System::getEventByID(
const FMOD_GUID *id,
Studio::EventDescription **event
);
This function allows you to retrieve a handle to any loaded event description.
See Also: Studio::System::getEvent
Retrieves listener 3D attributes.
FMOD_RESULT Studio::System::getListenerAttributes(
int listener,
FMOD_3D_ATTRIBUTES *attributes
);
See Also: Studio::EventInstance::get3DAttributes, Studio::System::getNumListeners, Studio::System::setListenerAttributes
Retrieves listener weighting.
FMOD_RESULT Studio::System::getListenerWeight(
int listener,
float *weight
);
See Also: Studio::System::setListenerWeight, Studio::System::setNumListeners, Studio::System::getListenerAttributes
Retrieves memory usage statistics.
FMOD_RESULT Studio::System::getMemoryUsage(
FMOD_STUDIO_MEMORY_USAGE *memoryusage
);
The memory usage sampledata value for the system is the total size of non-streaming sample data currently loaded.
Memory usage statistics are only available in logging builds, in release builds memoryusage will contain zero for all values after calling this function.
Retrieves the number of listeners.
FMOD_RESULT Studio::System::getNumListeners(
int *numlisteners
);
See Also: Studio::System::setNumListeners
Retrieves a global parameter value by unique identifier.
FMOD_RESULT Studio::System::getParameterByID(
FMOD_STUDIO_PARAMETER_ID id,
float *value,
float *finalvalue = nullptr
);
finalvalue is the final value of the parameter after applying adjustments due to automation, modulation, seek speed, and parameter velocity to value. This is calculated asynchronously when the Studio system updates.
See Also: Studio::System::setParameterByID
Retrieves a global parameter value by name.
FMOD_RESULT Studio::System::getParameterByName(
const char *name,
float *value,
float *finalvalue = nullptr
);
finalvalue is the final value of the parameter after applying adjustments due to automation, modulation, seek speed, and parameter velocity to value. This is calculated asynchronously when the Studio system updates.
See Also: Studio::System::setParameterByName
Retrieves a global parameter by ID.
FMOD_RESULT Studio::System::getParameterDescriptionByID(
FMOD_STUDIO_PARAMETER_ID id,
FMOD_STUDIO_PARAMETER_DESCRIPTION *parameter
);
Retrieves a global parameter by name or path.
FMOD_RESULT Studio::System::getParameterDescriptionByName(
const char *name,
FMOD_STUDIO_PARAMETER_DESCRIPTION *parameter
);
name can be the short name (such as 'Wind') or the full path (such as 'parameter:/Ambience/Wind'). Path lookups will only succeed if the strings bank has been loaded.
Retrieves the number of global parameters.
FMOD_RESULT Studio::System::getParameterDescriptionCount(
int *count
);
See Also: Studio::System::getParameterDescriptionList
Retrieves a list of global parameters.
FMOD_RESULT Studio::System::getParameterDescriptionList(
FMOD_STUDIO_PARAMETER_DESCRIPTION *array,
int capacity,
int *count
);
array.See Also: Studio::System::getParameterDescriptionCount
Retrieves information for loading a sound from the audio table.
FMOD_RESULT Studio::System::getSoundInfo(
const char *key,
FMOD_STUDIO_SOUND_INFO *info
);
The FMOD_STUDIO_SOUND_INFO structure contains information to be passed to System::createSound (which will create a parent sound), along with a subsound index to be passed to Sound::getSubSound once the parent sound is loaded.
The user is expected to call System::createSound with the given information. It is up to the user to combine in any desired loading flags, such as FMOD_CREATESTREAM, FMOD_CREATECOMPRESSEDSAMPLE or FMOD_NONBLOCKING with the flags in FMOD_STUDIO_SOUND_INFO::mode.
When the banks have been loaded via Studio::System::loadBankMemory, the mode will be returned as FMOD_OPENMEMORY_POINT. This won't work with the default FMOD_CREATESAMPLE mode. For memory banks, you should add in the FMOD_CREATECOMPRESSEDSAMPLE or FMOD_CREATESTREAM flag, or remove FMOD_OPENMEMORY_POINT and add FMOD_OPENMEMORY to decompress the sample into a new allocation.
Retrieves the user data.
FMOD_RESULT Studio::System::getUserData(
void **userdata
);
See Also: Studio::System::setUserData
Retrieves a loaded VCA.
FMOD_RESULT Studio::System::getVCA(
const char *path,
Studio::VCA **vca
);
This function allows you to retrieve a handle for any VCA in the global mixer.
path may be a path, such as vca:/MyVCA, or an ID string, such as {d9982c58-a056-4e6c-b8e3-883854b4bffb}.
Note that path lookups will only succeed if the strings bank has been loaded.
See Also: Studio::System::getVCAByID
Retrieves a loaded VCA.
FMOD_RESULT Studio::System::getVCAByID(
const FMOD_GUID *id,
Studio::VCA **vca
);
This function allows you to retrieve a handle for any VCA in the global mixer.
See Also: Studio::System::getVCA
Initializes the Studio System.
FMOD_RESULT Studio::System::initialize(
int maxchannels,
FMOD_STUDIO_INITFLAGS studioflags,
FMOD_INITFLAGS flags,
void *extradriverdata
);
The core system used by the studio system is initialized at the same time as the studio system.
The flags and extradriverdata parameters are passed to System::init to initialize the core.
See Also: Creating the Studio System
Checks that the System reference is valid and has been initialized.
bool Studio::System::isValid()
Loads the metadata of a Studio bank using custom read callbacks.
FMOD_RESULT Studio::System::loadBankCustom(
const FMOD_STUDIO_BANK_INFO *info,
FMOD_STUDIO_LOAD_BANK_FLAGS flags,
Studio::Bank **bank
);
Sample data must be loaded separately see Sample Data Loading for details.
By default this function will block until the load finishes and return the FMOD_RESULT indicating the result. If the load fails then bank will contain NULL.
Using the FMOD_STUDIO_LOAD_BANK_NONBLOCKING flag will cause the bank to be loaded asynchronously. In that case this function will always return FMOD_OK and bank will contain a valid bank handle. Load errors for asynchronous banks can be detected by calling Studio::Bank::getLoadingState. Failed asynchronous banks should be released by calling Studio::Bank::unload.
If a bank has been split, separating out assets and optionally streams from the metadata bank, all parts must be loaded before any APIs that use the data are called. It is recommended you load each part one after another (order is not important), then proceed with dependent API calls such as Studio::Bank::loadSampleData or Studio::System::getEvent.
See Also: Studio::System::loadBankFile, Studio::System::loadBankMemory
Loads the metadata of a Studio bank from file.
FMOD_RESULT Studio::System::loadBankFile(
const char *filename,
FMOD_STUDIO_LOAD_BANK_FLAGS flags,
Studio::Bank **bank
);
Sample data must be loaded separately see Sample Data Loading for details.
By default this function will block until the file load finishes and return the FMOD_RESULT indicating the result. If the load fails then bank will contain NULL.
Using the FMOD_STUDIO_LOAD_BANK_NONBLOCKING flag will cause the bank to be loaded asynchronously. In that case this function will always return FMOD_OK and bank will contain a valid bank handle. Load errors for asynchronous banks can be detected by calling Studio::Bank::getLoadingState. Failed asynchronous banks should be released by calling Studio::Bank::unload.
If a bank has been split, separating out assets and optionally streams from the metadata bank, all parts must be loaded before any APIs that use the data are called. It is recommended you load each part one after another (order is not important), then proceed with dependent API calls such as Studio::Bank::loadSampleData or Studio::System::getEvent.
See Also: Studio::System::loadBankCustom, Studio::System::loadBankMemory
Loads the metadata of a Studio bank from memory.
FMOD_RESULT Studio::System::loadBankMemory(
const char *buffer,
int length,
FMOD_STUDIO_LOAD_MEMORY_MODE mode,
FMOD_STUDIO_LOAD_BANK_FLAGS flags,
Studio::Bank **bank
);
Sample data must be loaded separately see Sample Data Loading for details.
When mode is FMOD_STUDIO_LOAD_MEMORY FMOD will allocate an internal buffer and copy the data from the passed in buffer before using it. When used in this mode there are no alignment restrictions on buffer and the memory pointed to by buffer may be cleaned up at any time after this function returns.
When mode is FMOD_STUDIO_LOAD_MEMORY_POINT FMOD will use the passed memory buffer directly. When using this mode the buffer must be aligned to FMOD_STUDIO_LOAD_MEMORY_ALIGNMENT and the memory must persist until the bank has been fully unloaded, which can be some time after calling Studio::Bank::unload to unload the bank. You can ensure the memory is not being freed prematurely by only freeing it after receiving the FMOD_STUDIO_SYSTEM_CALLBACK_BANK_UNLOAD callback.
By default this function will block until the load finishes and return the FMOD_RESULT indicating the result. If the load fails then bank will contain NULL.
Using the FMOD_STUDIO_LOAD_BANK_NONBLOCKING flag will cause the bank to be loaded asynchronously. In that case this function will always return FMOD_OK and bank will contain a valid bank handle. Load errors for asynchronous banks can be detected by calling Studio::Bank::getLoadingState. Failed asynchronous banks should be released by calling Studio::Bank::unload.
This function is not compatible with FMOD_STUDIO_ADVANCEDSETTINGS::encryptionkey, using them together will cause an error to be returned.
If a bank has been split, separating out assets and optionally streams from the metadata bank, all parts must be loaded before any APIs that use the data are called. It is recommended you load each part one after another (order is not important), then proceed with dependent API calls such as Studio::Bank::loadSampleData or Studio::System::getEvent.
See Also: Studio::System::loadBankFile, Studio::System::loadBankCustom, Studio::System::setCallback
Load a command replay.
FMOD_RESULT Studio::System::loadCommandReplay(
const char *filename,
FMOD_STUDIO_COMMANDREPLAY_FLAGS flags,
Studio::CommandReplay **replay
);
See Also: Studio::System::startCommandCapture, Studio::System::stopCommandCapture, Studio::CommandReplay::start, Studio::CommandReplay::stop, Studio::CommandReplay::release
Retrieves the ID for a bank, event, snapshot, bus or VCA.
FMOD_RESULT Studio::System::lookupID(
const char *path,
FMOD_GUID *id
);
The strings bank must be loaded prior to calling this function, otherwise FMOD_ERR_EVENT_NOTFOUND is returned.
The path can be copied to the system clipboard from FMOD Studio using the "Copy Path" context menu command.
See Also: Studio::System::lookupPath
Retrieves the path for a bank, event, snapshot, bus or VCA.
FMOD_RESULT Studio::System::lookupPath(
const FMOD_GUID *id,
char *path,
int size,
int *retrieved
);
path is null.The strings bank must be loaded prior to calling this function, otherwise FMOD_ERR_EVENT_NOTFOUND is returned.
If the path is longer than size then it is truncated and this function returns FMOD_ERR_TRUNCATED.
The retrieved parameter can be used to get the buffer size required to hold the full path.
See Also: Studio::System::lookupID
Registers a plugin DSP.
FMOD_RESULT Studio::System::registerPlugin(
const FMOD_DSP_DESCRIPTION *description
);
Plugin DSPs used by an event must be registered using this function before loading the bank containing the event.
See Also: Studio::System::unregisterPlugin
Shut down and free the Studio System object.
FMOD_RESULT Studio::System::release();
This function will free the memory used by the Studio System object and everything created under it.
Studio::System::create and Studio::System::release are not thread-safe. Calling either of these functions concurrently with any FMOD Studio API function (including these two functions) may cause undefined behavior. External synchronization must be used if calls to Studio::System::create or Studio::System::release could overlap other FMOD Studio API calls. All other FMOD Studio API functions are thread safe and may be called freely from any thread unless otherwise documented.
All handles or pointers to objects associated with a Studio System object become invalid when the Studio System object is released. The FMOD Studio API attempts to protect against stale handles and pointers being used with a different Studio System object but this protection cannot be guaranteed and attempting to use stale handles or pointers may cause undefined behavior.
See Also: Creating the Studio System
Resets memory buffer usage statistics.
FMOD_RESULT Studio::System::resetBufferUsage();
This function resets the buffer usage data tracked by the FMOD Studio System.
See Also: FMOD_STUDIO_BUFFER_USAGE, Studio::System::getBufferUsage
Sets advanced settings.
FMOD_RESULT Studio::System::setAdvancedSettings(
FMOD_STUDIO_ADVANCEDSETTINGS *settings
);
This function must be called prior to Studio initialization.
See Also: Studio::System::getAdvancedSettings, Studio::System::initialize
Sets a callback for the FMOD Studio System.
FMOD_RESULT Studio::System::setCallback(
FMOD_STUDIO_SYSTEM_CALLBACK callback,
FMOD_STUDIO_SYSTEM_CALLBACK_TYPE callbackmask = FMOD_STUDIO_SYSTEM_CALLBACK_ALL
);
The system callback function is called for a variety of reasons, use the callbackmask to choose which callbacks you are interested in.
Some callbacks are called on the game thread when Studio::System::update is called and others are called asynchronously from the Studio System update thread. See the FMOD_STUDIO_SYSTEM_CALLBACK_TYPE for details.
See Also: Callback Behavior, Studio::System::setUserData
Sets the 3D attributes of the listener.
FMOD_RESULT Studio::System::setListenerAttributes(
int listener,
const FMOD_3D_ATTRIBUTES *attributes
);
See Also: Studio::System::getListenerAttributes
Sets the listener weighting.
FMOD_RESULT Studio::System::setListenerWeight(
int listener,
float weight
);
Weighting value.
Listener weighting is a factor which determines how much the listener influences the mix. It is taken into account for 3D panning, doppler, and the automatic distance event parameter. A listener with a weight of 0 has no effect on the mix.
Listener weighting can be used to fade in and out multiple listeners. For example to do a crossfade, an additional listener can be created with a weighting of 0 that ramps up to 1 while the old listener weight is ramped down to 0. After the crossfade is finished the number of listeners can be reduced to 1 again.
The sum of all the listener weights should add up to at least 1. It is a user error to set all listener weights to 0.
See Also: Studio::System::getListenerWeight, Studio::System::setNumListeners
Sets the number of listeners in the 3D sound scene.
FMOD_RESULT Studio::System::setNumListeners(
int numlisteners
);
Number of listeners.
If the number of listeners is set to more than 1 then FMOD uses a 'closest sound to the listener' method to determine what should be heard.
See Also: Studio::System::getNumListeners, Studio::System::setListenerAttributes, Studio::System::setListenerWeight
Sets a global parameter value by unique identifier.
FMOD_RESULT Studio::System::setParameterByID(
FMOD_STUDIO_PARAMETER_ID id,
float value,
bool ignoreseekspeed = false
);
Specifies whether to ignore the parameter's seek speed and set the value immediately.
See Also: Studio::System::setParameterByName, Studio::System::setParametersByIDs, Studio::System::getParameterByID, Studio::System::getParameterByName
Sets a global parameter value by name.
FMOD_RESULT Studio::System::setParameterByName(
const char *name,
float value,
bool ignoreseekspeed = false
);
Specifies whether to ignore the parameter's seek speed and set the value immediately.
See Also: Studio::System::setParameterByID, Studio::System::setParametersByIDs, Studio::System::getParameterByID, Studio::System::getParameterByName
Sets multiple global parameter values by unique identifier.
FMOD_RESULT Studio::System::setParametersByIDs(
const FMOD_STUDIO_PARAMETER_ID *ids,
float *values,
int count,
bool ignoreseekspeed = false
);
Number of items in the given arrays.
Specifies whether to ignore the parameter's seek speed and set the value immediately.
If any ID is set to all zeroes then the corresponding value will be ignored.
See Also: Studio::System::setParameterByID, Studio::System::setParameterByName, Studio::System::getParameterByID, Studio::System::getParameterByName
Sets the user data.
FMOD_RESULT Studio::System::setUserData(
void *userdata
);
The user data is passed to the system callback.
See Also: Studio::System::getUserData, Studio::System::setCallback
Recording Studio commands to a file.
FMOD_RESULT Studio::System::startCommandCapture(
const char *filename,
FMOD_STUDIO_COMMANDCAPTURE_FLAGS flags
);
The commands generated by the FMOD Studio API can be captured and later replayed for debug and profiling purposes.
Unless the FMOD_STUDIO_COMMANDCAPTURE_SKIP_INITIAL_STATE flag is specified, the command capture will first record the set of all banks and event instances that currently exist.
See Also: Studio::System::stopCommandCapture, Studio::System::loadCommandReplay
Stop recording Studio commands.
FMOD_RESULT Studio::System::stopCommandCapture();
See Also: Studio::System::startCommandCapture, Studio::System::loadCommandReplay
Unloads all currently loaded banks.
FMOD_RESULT Studio::System::unloadAll();
See Also: Studio::System::loadBankFile, Studio::System::loadBankMemory, Studio::System::loadBankCustom
Unregisters a plugin DSP.
FMOD_RESULT Studio::System::unregisterPlugin(
const char *name
);
See Also: Studio::System::registerPlugin
Update the FMOD Studio System.
FMOD_RESULT Studio::System::update();
When Studio is initialized in the default asynchronous processing mode this function submits all buffered commands for execution on the Studio Update thread for asynchronous processing. This is a fast operation since the commands are not processed on the calling thread. If Studio is initialized with FMOD_STUDIO_INIT_DEFERRED_CALLBACKS then any deferred callbacks fired during any asynchronous updates since the last call to this function will be called. If an error occurred during any asynchronous updates since the last call to this function then this function will return the error result.
When Studio is initialized with FMOD_STUDIO_INIT_SYNCHRONOUS_UPDATE queued commands will be processed immediately when calling this function, the scheduling and update logic for the Studio system are executed and all callbacks are fired. This may block the calling thread for a substantial amount of time.
See Also: Studio System Processing