FMOD Engine User Manual 2.03
The main system object for FMOD Studio.
Initializing the studio system object also initializes the core System object.
Lifetime:
Update:
Banks:
Listeners:
Buses:
Events:
Parameters:
VCAs:
Advanced settings:
Command capture and replay:
Profiling:
Plug-ins:
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;
struct Studio.ADVANCEDSETTINGS
{
int cbsize;
int commandqueuesize;
int handleinitialsize;
int studioupdateperiod;
int idlesampledatapoolsize;
int streamingscheduledelay;
StringWrapper encryptionkey;
}
FMOD_STUDIO_ADVANCEDSETTINGS
{
commandqueuesize,
handleinitialsize,
studioupdateperiod,
idlesampledatapoolsize,
streamingscheduledelay;
};
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;
struct Studio.BANK_INFO
{
int size;
IntPtr userdata;
int userdatalength;
FILE_OPENCALLBACK opencallback;
FILE_CLOSECALLBACK closecallback;
FILE_READCALLBACK readcallback;
FILE_SEEKCALLBACK seekcallback;
}
FMOD_STUDIO_BANK_INFO
{
userdata,
userdatalength,
opencallback,
closecallback,
readcallback,
seekcallback,
};
sizeof(FMOD_STUDIO_BANK_INFO)
.userdatalength
is zero, this must remain valid until the bank has been unloaded and all calls to opencallback
have been matched by a call to closecallback
.opencallback
have been matched by a call to closecallback
.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;
struct Studio.BUFFER_INFO
{
int currentusage;
int peakusage;
int capacity;
int stallcount;
float stalltime;
}
FMOD_STUDIO_BUFFER_INFO
{
currentusage,
peakusage,
capacity,
stallcount,
stalltime,
};
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;
struct Studio.BUFFER_USAGE
{
BUFFER_INFO studiocommandqueue;
BUFFER_INFO studiohandle;
}
FMOD_STUDIO_BUFFER_USAGE
{
studiocommandqueue,
studiohandle,
};
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
enum Studio.COMMANDCAPTURE_FLAGS : uint
{
NORMAL = 0x00000000,
FILEFLUSH = 0x00000001,
SKIP_INITIAL_STATE = 0x00000002,
}
STUDIO_COMMANDCAPTURE_NORMAL 0x00000000
STUDIO_COMMANDCAPTURE_FILEFLUSH 0x00000001
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
enum Studio.COMMANDREPLAY_FLAGS : uint
{
NORMAL = 0x00000000,
SKIP_CLEANUP = 0x00000001,
FAST_FORWARD = 0x00000002,
SKIP_BANK_LOAD = 0x00000004,
}
STUDIO_COMMANDREPLAY_NORMAL 0x00000000
STUDIO_COMMANDREPLAY_SKIP_CLEANUP 0x00000001
STUDIO_COMMANDREPLAY_FAST_FORWARD 0x00000002
STUDIO_COMMANDREPLAY_SKIP_BANK_LOAD 0x00000004
See Also: Studio::System::loadCommandReplay
Performance information for Studio API functionality.
typedef struct FMOD_STUDIO_CPU_USAGE {
float update;
} FMOD_STUDIO_CPU_USAGE;
struct Studio.CPU_USAGE
{
float update;
}
FMOD_STUDIO_CPU_USAGE
{
update
};
Studio::System::update CPU usage. Percentage of main thread, or main thread if FMOD_STUDIO_INIT_SYNCHRONOUS_UPDATE flag is used with Studio::System::initialize.
This structure is filled in with Studio::System::getCPUUsage.
See Also: System::getCPUUsage, FMOD_CPU_USAGE
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
enum Studio.INITFLAGS : uint
{
NORMAL = 0x00000000
LIVEUPDATE = 0x00000001
ALLOW_MISSING_PLUGINS = 0x00000002
SYNCHRONOUS_UPDATE = 0x00000004
DEFERRED_CALLBACKS = 0x00000008
LOAD_FROM_UPDATE = 0x00000010
MEMORY_TRACKING = 0x00000020
}
STUDIO_INIT_NORMAL 0x00000000
STUDIO_INIT_LIVEUPDATE 0x00000001
STUDIO_INIT_ALLOW_MISSING_PLUGINS 0x00000002
STUDIO_INIT_SYNCHRONOUS_UPDATE 0x00000004
STUDIO_INIT_DEFERRED_CALLBACKS 0x00000008
STUDIO_INIT_LOAD_FROM_UPDATE 0x00000010
STUDIO_INIT_MEMORY_TRACKING 0x00000020
See Also: Studio::System::initialize
Flags for 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
enum Studio.LOAD_BANK_FLAGS : uint
{
NORMAL = 0x00000000,
NONBLOCKING = 0x00000001,
DECOMPRESS_SAMPLES = 0x00000002,
UNENCRYPTED = 0x00000004,
}
STUDIO_LOAD_BANK_NORMAL 0x00000000
STUDIO_LOAD_BANK_NONBLOCKING 0x00000001
STUDIO_LOAD_BANK_DECOMPRESS_SAMPLES 0x00000002
STUDIO_LOAD_BANK_UNENCRYPTED 0x00000004
See Also: Studio::System::loadBankFile, Studio::System::loadBankMemory, Studio::System::loadBankCustom
The required memory alignment of banks in user memory.
#define FMOD_STUDIO_LOAD_MEMORY_ALIGNMENT 32
Not supported for C#.
Not supported for JavaScript.
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;
Not supported for C#.
STUDIO_LOAD_MEMORY 0
STUDIO_LOAD_MEMORY_POINT 1
It is not currently possible for the FMOD Engine to use banks loaded into user memory. Only FMOD.STUDIO_LOAD_MEMORY is supported.
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;
class Studio.SOUND_INFO
{
byte[] name_or_data;
MODE mode;
CREATESOUNDEXINFO exinfo;
int subsoundindex;
string name { get; }
}
FMOD_STUDIO_SOUND_INFO
{
name_or_data,
mode,
exinfo,
subsoundindex,
};
Mode flags required for loading the sound. (FMOD_MODE)
The name
property is a getter for the name_or_data
member which will return null if the sound should be loaded from memory.
See Also: Studio::System::getSoundInfo
Callback for Studio system events.
FMOD_RESULT F_CALL FMOD_STUDIO_SYSTEM_CALLBACK(
FMOD_STUDIO_SYSTEM *system,
FMOD_STUDIO_SYSTEM_CALLBACK_TYPE type,
void *commanddata,
void *userdata
);
delegate RESULT Studio.SYSTEM_CALLBACK(
IntPtr system,
SYSTEM_CALLBACK_TYPE type,
IntPtr commanddata,
IntPtr userdata
);
function FMOD_STUDIO_SYSTEM_CALLBACK(
system,
type,
commanddata,
userdata
)
system
can be cast to Studio::System *
.
See Also: Callback Behavior, User Data
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_LIVEUPDATE_CONNECTED 0x00000008
#define FMOD_STUDIO_SYSTEM_CALLBACK_LIVEUPDATE_DISCONNECTED 0x00000010
#define FMOD_STUDIO_SYSTEM_CALLBACK_ALL 0xFFFFFFFF
enum Studio.SYSTEM_CALLBACK_TYPE : uint
{
PREUPDATE = 0x00000001,
POSTUPDATE = 0x00000002,
BANK_UNLOAD = 0x00000004,
LIVEUPDATE_CONNECTED = 0x00000008,
LIVEUPDATE_DISCONNECTED = 0x00000010,
ALL = 0xFFFFFFFF,
}
STUDIO_SYSTEM_CALLBACK_PREUPDATE 0x00000001
STUDIO_SYSTEM_CALLBACK_POSTUPDATE 0x00000002
STUDIO_SYSTEM_CALLBACK_BANK_UNLOAD 0x00000004
STUDIO_SYSTEM_CALLBACK_LIVEUPDATE_CONNECTED 0x00000008
STUDIO_SYSTEM_CALLBACK_LIVEUPDATE_DISCONNECTED 0x00000010
STUDIO_SYSTEM_CALLBACK_ALL 0xFFFFFFFF
commanddata
argument is the bank handle.Callbacks are called from the Studio Update Thread in default / async mode and the main (calling) thread in synchronous mode.
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
);
FMOD_RESULT FMOD_Studio_System_Create(
FMOD_STUDIO_SYSTEM **system,
unsigned int headerversion
);
static RESULT Studio.System.create(
out System system
);
static Studio_System_Create(
system
);
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 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 Studio API calls. All other 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();
FMOD_RESULT FMOD_Studio_System_FlushCommands(FMOD_STUDIO_SYSTEM *system);
RESULT Studio.System.flushCommands();
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();
FMOD_RESULT FMOD_Studio_System_FlushSampleLoading(FMOD_STUDIO_SYSTEM *system);
RESULT Studio.System.flushSampleLoading();
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
);
FMOD_RESULT FMOD_Studio_System_GetAdvancedSettings(
FMOD_STUDIO_SYSTEM *system,
FMOD_STUDIO_ADVANCEDSETTINGS *settings
);
RESULT Studio.System.getAdvancedSettings(
out ADVANCEDSETTINGS settings
);
Studio.System.getAdvancedSettings(
settings
);
See Also: Studio::System::setAdvancedSettings
Retrieves a loaded bank with the specified file path.
FMOD_RESULT Studio::System::getBank(
const char *path,
Studio::Bank **bank
);
FMOD_RESULT FMOD_Studio_System_GetBank(
FMOD_STUDIO_SYSTEM *system,
const char *path,
FMOD_STUDIO_BANK **bank
);
RESULT Studio.System.getBank(
string path,
out Bank bank
);
Studio.System.getBank(
path,
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 with the specified ID.
FMOD_RESULT Studio::System::getBankByID(
const FMOD_GUID *id,
Studio::Bank **bank
);
FMOD_RESULT FMOD_Studio_System_GetBankByID(
FMOD_STUDIO_SYSTEM *system,
const FMOD_GUID *id,
FMOD_STUDIO_BANK **bank
);
RESULT Studio.System.getBankByID(
Guid id,
out Bank bank
);
Studio.System.getBankByID(
id,
bank
);
See Also: Studio::parseID, Studio::System::lookupID, Studio::System::getBank
Retrieves the number of currently-loaded banks.
FMOD_RESULT Studio::System::getBankCount(
int *count
);
FMOD_RESULT FMOD_Studio_System_GetBankCount(
FMOD_STUDIO_SYSTEM *system,
int *count
);
RESULT Studio.System.getBankCount(
out int count
);
Studio.System.getBankCount(
count
);
May be used in conjunction with Studio::System::getBankList to enumerate the loaded banks.
Retrieves a list of the currently-loaded banks.
FMOD_RESULT Studio::System::getBankList(
Studio::Bank **array,
int capacity,
int *count
);
FMOD_RESULT FMOD_Studio_System_GetBankList(
FMOD_STUDIO_SYSTEM *system,
FMOD_STUDIO_BANK **array,
int capacity,
int *count
);
RESULT Studio.System.getBankList(
out Bank[] array
);
Studio.System.getBankList(
array,
capacity,
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
);
FMOD_RESULT FMOD_Studio_System_GetBufferUsage(
FMOD_STUDIO_SYSTEM *system,
FMOD_STUDIO_BUFFER_USAGE *usage
);
RESULT Studio.System.getBufferUsage(
out BUFFER_USAGE usage
);
Studio.System.getBufferUsage(
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
);
FMOD_RESULT FMOD_Studio_System_GetBus(
FMOD_STUDIO_SYSTEM *system,
const char *path,
FMOD_STUDIO_BUS **bus
);
RESULT Studio.System.getBus(
string path,
out Bus bus
);
Studio.System.getBus(
path,
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}
.
Path lookups only succeed if the strings bank is loaded.
See Also: Studio::System::getBusByID
Retrieves a loaded bus.
FMOD_RESULT Studio::System::getBusByID(
const FMOD_GUID *id,
Studio::Bus **bus
);
FMOD_RESULT FMOD_Studio_System_GetBusByID(
FMOD_STUDIO_SYSTEM *system,
const FMOD_GUID *id,
FMOD_STUDIO_BUS **bus
);
RESULT Studio.System.getBusByID(
Guid id,
out Bus bus
);
Studio.System.getBusByID(
id,
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
);
FMOD_RESULT FMOD_Studio_System_GetCoreSystem(
FMOD_STUDIO_SYSTEM *system,
FMOD_SYSTEM **system
);
RESULT Studio.System.getCoreSystem(
out FMOD.System system
);
Studio.System.getCoreSystem(
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 the amount of CPU used for different parts of the FMOD Engine.
FMOD_RESULT Studio::System::getCPUUsage(
FMOD_STUDIO_CPU_USAGE *usage,
FMOD_CPU_USAGE *usage_core
);
FMOD_RESULT FMOD_Studio_System_GetCPUUsage(
FMOD_STUDIO_SYSTEM *system,
FMOD_STUDIO_CPU_USAGE *usage,
FMOD_CPU_USAGE *usage_core
);
RESULT Studio.System.getCPUUsage(
out CPU_USAGE usage,
out FMOD.CPU_USAGE usage_core
);
Studio.System.getCPUUsage(
usage,
usage_core
);
For readability, the percentage values are smoothed to provide a more stable output.
See Also: System::getCPUUsage
Retrieves an EventDescription of an event or snapshot with the specified file path.
FMOD_RESULT Studio::System::getEvent(
const char *path,
Studio::EventDescription **event
);
FMOD_RESULT FMOD_Studio_System_GetEvent(
FMOD_STUDIO_SYSTEM *system,
const char *path,
FMOD_STUDIO_EVENTDESCRIPTION **event
);
RESULT Studio.System.getEvent(
string path,
out EventDescription _event
);
Studio.System.getEvent(
path,
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}
.
Path lookups only succeed if the strings bank is 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
);
FMOD_RESULT FMOD_Studio_System_GetEventByID(
FMOD_STUDIO_SYSTEM *system,
const FMOD_GUID *id,
FMOD_STUDIO_EVENTDESCRIPTION **event
);
RESULT Studio.System.getEventByID(
Guid id,
out EventDescription _event
);
Studio.System.getEventByID(
id,
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,
FMOD_VECTOR *attenuationposition = nullptr
);
FMOD_RESULT FMOD_Studio_System_GetListenerAttributes(
FMOD_STUDIO_SYSTEM *system,
int listener,
FMOD_3D_ATTRIBUTES *attributes,
FMOD_VECTOR *attenuationposition
);
RESULT Studio.System.getListenerAttributes(
int listener,
out _3D_ATTRIBUTES attributes
);
RESULT Studio.System.getListenerAttributes(
int listener,
out _3D_ATTRIBUTES attributes,
out VECTOR attenuationposition
);
Studio.System.getListenerAttributes(
listener,
attributes,
attenuationposition
);
See Also: Studio::EventInstance::get3DAttributes, Studio::System::getNumListeners, Studio::System::setListenerAttributes
Retrieves listener weighting.
FMOD_RESULT Studio::System::getListenerWeight(
int listener,
float *weight
);
FMOD_RESULT FMOD_Studio_System_GetListenerWeight(
FMOD_STUDIO_SYSTEM *system,
int listener,
float *weight
);
RESULT Studio.System.getListenerWeight(
int listener,
out float weight
);
Studio.System.getListenerWeight(
listener,
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
);
FMOD_RESULT FMOD_Studio_System_GetMemoryUsage(
FMOD_STUDIO_SYSTEM *system,
FMOD_STUDIO_MEMORY_USAGE *memoryusage
);
RESULT Studio.System.getMemoryUsage(
out MEMORY_USAGE memoryusage
);
Not supported for JavaScript.
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
);
FMOD_RESULT FMOD_Studio_System_GetNumListeners(
FMOD_STUDIO_SYSTEM *system,
int *numlisteners
);
RESULT Studio.System.getNumListeners(
out int numlisteners
);
Studio.System.getNumListeners(
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
);
FMOD_RESULT FMOD_Studio_System_GetParameterByID(
FMOD_STUDIO_SYSTEM *system,
FMOD_STUDIO_PARAMETER_ID id,
float *value,
float *finalvalue
);
RESULT Studio.System.getParameterByID(
PARAMETER_ID id,
out float value
);
RESULT Studio.System.getParameterByID(
PARAMETER_ID id,
out float value,
out float finalvalue
);
Studio.System.getParameterByID(
id,
value,
finalvalue
);
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, including the path if needed.
FMOD_RESULT Studio::System::getParameterByName(
const char *name,
float *value,
float *finalvalue = nullptr
);
FMOD_RESULT FMOD_Studio_System_GetParameterByName(
FMOD_STUDIO_SYSTEM *system,
const char *name,
float *value,
float *finalvalue
);
RESULT Studio.System.getParameterByName(
string name,
out float value
);
RESULT Studio.System.getParameterByName(
string name,
out float value,
out float finalvalue
);
Studio.System.getParameterByName(
name,
value,
finalvalue
);
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
);
FMOD_RESULT FMOD_Studio_System_GetParameterDescriptionByID(
FMOD_STUDIO_SYSTEM *system,
FMOD_STUDIO_PARAMETER_ID id,
FMOD_STUDIO_PARAMETER_DESCRIPTION *parameter
);
RESULT Studio.System.getParameterDescriptionByID(
PARAMETER_ID id,
out PARAMETER_DESCRIPTION parameter
);
Studio.System.getParameterDescriptionByID(
id,
parameter
);
Retrieves a global parameter by name, including the path if needed.
FMOD_RESULT Studio::System::getParameterDescriptionByName(
const char *name,
FMOD_STUDIO_PARAMETER_DESCRIPTION *parameter
);
FMOD_RESULT FMOD_Studio_System_GetParameterDescriptionByName(
FMOD_STUDIO_SYSTEM *system,
const char *name,
FMOD_STUDIO_PARAMETER_DESCRIPTION *parameter
);
RESULT Studio.System.getParameterDescriptionByName(
string name,
out PARAMETER_DESCRIPTION parameter
);
Studio.System.getParameterDescriptionByName(
name,
parameter
);
name
can be the short name (such as 'Wind') or the full path (such as 'parameter:/Ambience/Wind'). Path lookups only succeed if the strings bank is loaded.
Retrieves the number of global parameters.
FMOD_RESULT Studio::System::getParameterDescriptionCount(
int *count
);
FMOD_RESULT FMOD_Studio_System_GetParameterDescriptionCount(
FMOD_STUDIO_SYSTEM *system,
int *count
);
RESULT Studio.System.getParameterDescriptionCount(
out int count
);
Studio.System.getParameterDescriptionCount(
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
);
FMOD_RESULT FMOD_Studio_System_GetParameterDescriptionList(
FMOD_STUDIO_SYSTEM *system,
FMOD_STUDIO_PARAMETER_DESCRIPTION *array,
int capacity,
int *count
);
RESULT Studio.System.getParameterDescriptionList(
out PARAMETER_DESCRIPTION[] array
);
Studio.System.getParameterDescriptionList(
array,
capacity,
count
);
array
.See Also: Studio::System::getParameterDescriptionCount
Retrieves a global parameter label by ID.
FMOD_RESULT Studio::System::getParameterLabelByID(
FMOD_STUDIO_PARAMETER_ID id,
int labelindex,
char *label,
int size,
int *retrieved
);
FMOD_RESULT FMOD_Studio_System_GetParameterLabelByID(
FMOD_STUDIO_SYSTEM *system,
FMOD_STUDIO_PARAMETER_ID id,
int labelindex,
char *label,
int size,
int *retrieved
);
RESULT Studio.System.getParameterLabelByID(
PARAMETER_ID id,
int labelindex,
out string label
);
Studio.System.getParameterLabelByID(
id,
labelindex,
label,
size,
retrieved
);
Label index to retrieve.
label
is null.If the label 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 label.
Retrieves a global parameter label by name, including the path if needed.
FMOD_RESULT Studio::System::getParameterLabelByName(
const char *name,
int labelindex,
char *label,
int size,
int *retrieved
);
FMOD_RESULT FMOD_Studio_System_GetParameterLabelByName(
FMOD_STUDIO_SYSTEM *system,
const char *name,
int labelindex,
char *label,
int size,
int *retrieved
);
RESULT Studio.System.getParameterLabelByName(
string name,
int labelindex,
out string label
);
Studio.System.getParameterLabelByName(
name,
labelindex,
label,
size,
retrieved
);
Label index to retrieve.
label
is null.name
can be the short name (such as 'Wind') or the full path (such as 'parameter:/Ambience/Wind'). Path lookups only succeed if the strings bank is loaded.
If the label 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 label.
Retrieves information for loading a sound from the audio table.
FMOD_RESULT Studio::System::getSoundInfo(
const char *key,
FMOD_STUDIO_SOUND_INFO *info
);
FMOD_RESULT FMOD_Studio_System_GetSoundInfo(
FMOD_STUDIO_SYSTEM *system,
const char *key,
FMOD_STUDIO_SOUND_INFO *info
);
RESULT Studio.System.getSoundInfo(
string key,
out SOUND_INFO info
);
Studio.System.getSoundInfo(
key,
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.
If the banks were loaded by Studio::System::loadBankMemory, the mode is returned as FMOD_OPENMEMORY_POINT. This won't work with the default FMOD_CREATESAMPLE mode. For in-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
);
FMOD_RESULT FMOD_Studio_System_GetUserData(
FMOD_STUDIO_SYSTEM *system,
void **userdata
);
RESULT Studio.System.getUserData(
out IntPtr userdata
);
Studio.System.getUserData(
userdata
);
This function allows arbitrary user data to be retrieved from this object. See the User Data section of the glossary for an example of how to get and set user data.
Retrieves a loaded VCA.
FMOD_RESULT Studio::System::getVCA(
const char *path,
Studio::VCA **vca
);
FMOD_RESULT FMOD_Studio_System_GetVCA(
FMOD_STUDIO_SYSTEM *system,
const char *path,
FMOD_STUDIO_VCA **vca
);
RESULT Studio.System.getVCA(
string path,
out VCA vca
);
Studio.System.getVCA(
path,
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}
.
Path lookups only succeed if the strings bank is loaded.
See Also: Studio::System::getVCAByID
Retrieves a loaded VCA.
FMOD_RESULT Studio::System::getVCAByID(
const FMOD_GUID *id,
Studio::VCA **vca
);
FMOD_RESULT FMOD_Studio_System_GetVCAByID(
FMOD_STUDIO_SYSTEM *system,
const FMOD_GUID *id,
FMOD_STUDIO_VCA **vca
);
RESULT Studio.System.getVCAByID(
Guid id,
out VCA vca
);
Studio.System.getVCAByID(
id,
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
);
FMOD_RESULT FMOD_Studio_System_Initialize(
FMOD_STUDIO_SYSTEM *system,
int maxchannels,
FMOD_STUDIO_INITFLAGS studioflags,
FMOD_INITFLAGS flags,
void *extradriverdata
);
RESULT Studio.System.initialize(
int maxchannels,
INITFLAGS studioflags,
FMOD.INITFLAGS flags,
IntPtr extradriverdata
);
Studio.System.initialize(
maxchannels,
studioflags,
flags,
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()
bool FMOD_Studio_System_IsValid(FMOD_STUDIO_SYSTEM *system)
bool Studio.System.isValid()
Studio.System.isValid()
Loads the metadata of a 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
);
FMOD_RESULT FMOD_Studio_System_LoadBankCustom(
FMOD_STUDIO_SYSTEM *system,
const FMOD_STUDIO_BANK_INFO *info,
FMOD_STUDIO_LOAD_BANK_FLAGS flags,
FMOD_STUDIO_BANK **bank
);
RESULT Studio.System.loadBankCustom(
BANK_INFO info,
LOAD_BANK_FLAGS flags,
out Bank bank
);
Studio.System.loadBankCustom(
info,
flags,
bank
);
Sample data must be loaded separately see Sample Data Loading for details.
By default this function blocks until the load finishes, and returns the FMOD_RESULT to indicate the result. If the load fails then bank
contains NULL.
Using the FMOD_STUDIO_LOAD_BANK_NONBLOCKING flag causes the bank to be loaded asynchronously. In that case, this function always returns FMOD_OK and bank
contains 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 info.userdata
is set but info.userdatalength
is zero, info.userdata
must remain valid until the bank is unloaded and each call to info.opencallback
is matched by a call to info.closecallback
. This requirement allows playback of shared streaming assets to continue after a bank is unloaded.
If a bank is split, separating out sample data and optionally streams from the metadata bank, all parts must be loaded before any APIs that use the data are called. We recommend you load each part one after another (the order in which they are loaded 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 bank. This does not load the bank's sample data.
FMOD_RESULT Studio::System::loadBankFile(
const char *filename,
FMOD_STUDIO_LOAD_BANK_FLAGS flags,
Studio::Bank **bank
);
FMOD_RESULT FMOD_Studio_System_LoadBankFile(
FMOD_STUDIO_SYSTEM *system,
const char *filename,
FMOD_STUDIO_LOAD_BANK_FLAGS flags,
FMOD_STUDIO_BANK **bank
);
RESULT Studio.System.loadBankFile(
string filename,
LOAD_BANK_FLAGS flags,
out Bank bank
);
Studio.System.loadBankFile(
filename,
flags,
bank
);
Sample data must be loaded separately see Sample Data Loading for details.
By default this function blocks until the file load finishes and returns the FMOD_RESULT to indicate the result. If the load fails, then bank
contains NULL.
Using the FMOD_STUDIO_LOAD_BANK_NONBLOCKING flag causes the bank to be loaded asynchronously. In that case, this function returns FMOD_OK and bank
contains 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 is split, separating out sample data, metadata, and optionally streams into separate .bank files, all parts of the bank must be loaded before any APIs that use the data are called. We recommend you load each part one after another (the 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 bank from memory. Does not load the bank's sample data.
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
);
FMOD_RESULT FMOD_Studio_System_LoadBankMemory(
FMOD_STUDIO_SYSTEM *system,
const char *buffer,
int length,
FMOD_STUDIO_LOAD_MEMORY_MODE mode,
FMOD_STUDIO_LOAD_BANK_FLAGS flags,
FMOD_STUDIO_BANK **bank
);
RESULT Studio.System.loadBankMemory(
byte[] buffer,
LOAD_BANK_FLAGS flags,
out Bank bank
);
Studio.System.loadBankMemory(
buffer,
length,
mode,
flags,
bank
);
Sample data must be loaded separately. See the Sample Data Loading section of the Studio API Guide chapter for details.
When mode
is FMOD_STUDIO_LOAD_MEMORY, the FMOD Engine allocates an internal buffer and copies 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, the FMOD Engine uses 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 is fully unloaded, which may not happen until some time after calling Studio::Bank::unload. 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 blocks until the load finishes and returns the FMOD_RESULT to indicate the result. If the load fails, bank
contains NULL.
Using the FMOD_STUDIO_LOAD_BANK_NONBLOCKING flag causes the bank to be loaded asynchronously. In that case, this function always returns FMOD_OK and bank
contains 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 is split, separating out sample data, metadata, and optionally streams into separate .bank files, all parts of the bank must be loaded before any APIs that use the data are called. We recommend you load each part one after another (the 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
);
FMOD_RESULT FMOD_Studio_System_LoadCommandReplay(
FMOD_STUDIO_SYSTEM *system,
const char *filename,
FMOD_STUDIO_COMMANDREPLAY_FLAGS flags,
FMOD_STUDIO_COMMANDREPLAY **replay
);
RESULT Studio.System.loadCommandReplay(
string filename,
COMMANDREPLAY_FLAGS flags,
out Studio.CommandReplay replay
);
Studio.System.loadCommandReplay(
filename,
flags,
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
);
FMOD_RESULT FMOD_Studio_System_LookupID(
FMOD_STUDIO_SYSTEM *system,
const char *path,
FMOD_GUID *id
);
RESULT Studio.System.lookupID(
string path,
out Guid id
);
Studio.System.lookupID(
path,
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 by 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
);
FMOD_RESULT FMOD_Studio_System_LookupPath(
FMOD_STUDIO_SYSTEM *system,
const FMOD_GUID *id,
char *path,
int size,
int *retrieved
);
RESULT Studio.System.lookupPath(
Guid id,
out string path
);
Studio.System.lookupPath(
id,
path,
size,
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 DSP plug-in.
FMOD_RESULT Studio::System::registerPlugin(
const FMOD_DSP_DESCRIPTION *description
);
FMOD_RESULT FMOD_Studio_System_RegisterPlugin(
FMOD_STUDIO_SYSTEM *system,
const FMOD_DSP_DESCRIPTION *description
);
Studio.System.registerPlugin(
description
);
Not supported for C#.
DSP plug-ins 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();
FMOD_RESULT FMOD_Studio_System_Release(FMOD_STUDIO_SYSTEM *system);
RESULT Studio.System.release();
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 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 Studio API calls. All other 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 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();
FMOD_RESULT FMOD_Studio_System_ResetBufferUsage(FMOD_STUDIO_SYSTEM *system);
RESULT Studio.System.resetBufferUsage();
Studio.System.resetBufferUsage();
This function resets the buffer usage data tracked by the Studio system.
See Also: FMOD_STUDIO_BUFFER_USAGE, Studio::System::getBufferUsage
Sets advanced settings.
FMOD_RESULT Studio::System::setAdvancedSettings(
FMOD_STUDIO_ADVANCEDSETTINGS *settings
);
FMOD_RESULT FMOD_Studio_System_SetAdvancedSettings(
FMOD_STUDIO_SYSTEM *system,
FMOD_STUDIO_ADVANCEDSETTINGS *settings
);
RESULT Studio.System.setAdvancedSettings(
ADVANCEDSETTINGS settings
);
RESULT Studio.System.setAdvancedSettings(
ADVANCEDSETTINGS settings,
String encryptionkey
);
Studio.System.setAdvancedSettings(
settings
);
This function must be called prior to Studio system initialization.
Use the overloaded function to provide a C# string rather than directly setting ADVANCEDSETTINGS.encryptionkey.
See Also: Studio::System::getAdvancedSettings, Studio::System::initialize
Sets a callback for the Studio System.
FMOD_RESULT Studio::System::setCallback(
FMOD_STUDIO_SYSTEM_CALLBACK callback,
FMOD_STUDIO_SYSTEM_CALLBACK_TYPE callbackmask = FMOD_STUDIO_SYSTEM_CALLBACK_ALL
);
FMOD_RESULT FMOD_Studio_System_SetCallback(
FMOD_STUDIO_SYSTEM *system,
FMOD_STUDIO_SYSTEM_CALLBACK callback,
FMOD_STUDIO_SYSTEM_CALLBACK_TYPE callbackmask
);
RESULT Studio.System.setCallback(
SYSTEM_CALLBACK callback,
SYSTEM_CALLBACK_TYPE callbackmask = SYSTEM_CALLBACK_TYPE.ALL
);
Studio.System.setCallback(
callback,
callbackmask
);
The system callback function is called for a variety of reasons, use the callbackmask
to choose which callbacks you are interested in.
Callbacks are called from the Studio Update Thread in default / async mode and the main (calling) thread in synchronous mode. 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,
const FMOD_VECTOR *attenuationposition = nullptr
);
FMOD_RESULT FMOD_Studio_System_SetListenerAttributes(
FMOD_STUDIO_SYSTEM *system,
int listener,
const FMOD_3D_ATTRIBUTES *attributes,
const FMOD_VECTOR *attenuationposition
);
RESULT Studio.System.setListenerAttributes(
int listener,
_3D_ATTRIBUTES attributes
);
RESULT Studio.System.setListenerAttributes(
int listener,
_3D_ATTRIBUTES attributes,
VECTOR attenuationposition
);
Studio.System.setListenerAttributes(
listener,
attributes,
attenuationposition
);
Passing NULL for attenuationposition
will result in the listener only using the position in attributes
.
See Also: Studio::System::getListenerAttributes
Sets the listener weighting.
FMOD_RESULT Studio::System::setListenerWeight(
int listener,
float weight
);
FMOD_RESULT FMOD_Studio_System_SetListenerWeight(
FMOD_STUDIO_SYSTEM *system,
int listener,
float weight
);
RESULT Studio.System.setListenerWeight(
int listener,
float weight
);
Studio.System.setListenerWeight(
listener,
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
);
FMOD_RESULT FMOD_Studio_System_SetNumListeners(
FMOD_STUDIO_SYSTEM *system,
int numlisteners
);
RESULT Studio.System.setNumListeners(
int numlisteners
);
Studio.System.setNumListeners(
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 the Studio 3D Events white paper for more information.
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
);
FMOD_RESULT FMOD_Studio_System_SetParameterByID(
FMOD_STUDIO_SYSTEM *system,
FMOD_STUDIO_PARAMETER_ID id,
float value,
FMOD_BOOL ignoreseekspeed
);
RESULT Studio.System.setParameterByID(
PARAMETER_ID id,
float value,
bool ignoreseekspeed = false
);
Studio.System.setParameterByID(
id,
value,
ignoreseekspeed
);
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 unique identifier, looking up the value label.
FMOD_RESULT Studio::System::setParameterByIDWithLabel(
FMOD_STUDIO_PARAMETER_ID id,
const char *label,
bool ignoreseekspeed = false
);
FMOD_RESULT FMOD_Studio_System_SetParameterByIDWithLabel(
FMOD_STUDIO_SYSTEM *system,
FMOD_STUDIO_PARAMETER_ID id,
const char *label,
FMOD_BOOL ignoreseekspeed
);
RESULT Studio.System.setParameterByIDWithLabel(
PARAMETER_ID id,
string label,
bool ignoreseekspeed = false
);
Studio.System.setParameterByIDWithLabel(
id,
label,
ignoreseekspeed
);
If the specified label is not found, FMOD_ERR_EVENT_NOTFOUND is returned. This lookup is case sensitive.
See Also: Studio::System::setParameterByName, Studio::System::setParametersByIDs, Studio::System::getParameterByID, Studio::System::getParameterByName
Sets a global parameter value by name, including the path if needed.
FMOD_RESULT Studio::System::setParameterByName(
const char *name,
float value,
bool ignoreseekspeed = false
);
FMOD_RESULT FMOD_Studio_System_SetParameterByName(
FMOD_STUDIO_SYSTEM *system,
const char *name,
float value,
FMOD_BOOL ignoreseekspeed
);
RESULT Studio.System.setParameterByName(
string name,
float value,
bool ignoreseekspeed = false
);
Studio.System.setParameterByName(
name,
value,
ignoreseekspeed
);
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 a global parameter value by name, including the path if needed, looking up the value label.
FMOD_RESULT Studio::System::setParameterByNameWithLabel(
const char *name,
const char *label,
bool ignoreseekspeed = false
);
FMOD_RESULT FMOD_Studio_System_SetParameterByNameWithLabel(
FMOD_STUDIO_SYSTEM *system,
const char *name,
const char *label,
FMOD_BOOL ignoreseekspeed
);
RESULT Studio.System.setParameterByNameWithLabel(
string name,
string label,
bool ignoreseekspeed = false
);
Studio.System.setParameterByNameWithLabel(
name,
label,
ignoreseekspeed
);
If the specified label is not found, FMOD_ERR_EVENT_NOTFOUND is returned. This lookup is case sensitive.
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
);
FMOD_RESULT FMOD_Studio_System_SetParametersByIDs(
FMOD_STUDIO_SYSTEM *system,
const FMOD_STUDIO_PARAMETER_ID *ids,
float *values,
int count,
FMOD_BOOL ignoreseekspeed
);
RESULT Studio.System.setParametersByIDs(
PARAMETER_ID[] ids,
float[] values,
int count,
bool ignoreseekspeed = false
);
Studio.System.setParametersByIDs(
ids,
values,
count,
ignoreseekspeed
);
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
);
FMOD_RESULT FMOD_Studio_System_SetUserData(
FMOD_STUDIO_SYSTEM *system,
void *userdata
);
RESULT Studio.System.setUserData(
IntPtr userdata
);
Studio.System.setUserData(
userdata
);
This function allows arbitrary user data to be attached to this object, which wll be passed through the userdata
parameter in any FMOD_STUDIO_SYSTEM_CALLBACKs. See the User Data section of the glossary for an example of how to get and set user data.
See Also: Studio::System::getUserData, Studio::System::setCallback
Start recording Studio API commands to a file.
FMOD_RESULT Studio::System::startCommandCapture(
const char *filename,
FMOD_STUDIO_COMMANDCAPTURE_FLAGS flags
);
FMOD_RESULT FMOD_Studio_System_StartCommandCapture(
FMOD_STUDIO_SYSTEM *system,
const char *filename,
FMOD_STUDIO_COMMANDCAPTURE_FLAGS flags
);
RESULT Studio.System.startCommandCapture(
string filename,
COMMANDCAPTURE_FLAGS flags
);
Studio.System.startCommandCapture(
filename,
flags
);
Commands generated by the Studio API can be captured and later replayed for debugging and profiling purposes.
Unless the FMOD_STUDIO_COMMANDCAPTURE_SKIP_INITIAL_STATE flag is specified, the command capture first records the set of all banks and event instances that currently exist.
See Also: Studio::System::stopCommandCapture, Studio::System::loadCommandReplay
Stop recording Studio API commands.
FMOD_RESULT Studio::System::stopCommandCapture();
FMOD_RESULT FMOD_Studio_System_StopCommandCapture(FMOD_STUDIO_SYSTEM *system);
RESULT Studio.System.stopCommandCapture();
Studio.System.stopCommandCapture();
See Also: Studio::System::startCommandCapture, Studio::System::loadCommandReplay
Unloads all currently loaded banks.
FMOD_RESULT Studio::System::unloadAll();
FMOD_RESULT FMOD_Studio_System_UnloadAll(FMOD_STUDIO_SYSTEM *system);
RESULT Studio.System.unloadAll();
Studio.System.unloadAll();
See Also: Studio::System::loadBankFile, Studio::System::loadBankMemory, Studio::System::loadBankCustom
Unregisters a DSP plug-in.
FMOD_RESULT Studio::System::unregisterPlugin(
const char *name
);
FMOD_RESULT FMOD_Studio_System_UnregisterPlugin(
FMOD_STUDIO_SYSTEM *system,
const char *name
);
Studio.System.unregisterPlugin(
name
);
Not supported for C#.
See Also: Studio::System::registerPlugin
Update the studio system.
FMOD_RESULT Studio::System::update();
FMOD_RESULT FMOD_Studio_System_Update(FMOD_STUDIO_SYSTEM *system);
RESULT Studio.System.update();
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