FMOD Engine User Manual 2.03

6. Studio API Reference | Studio::EventInstance

An instance of an FMOD Studio event.

Playback Control:


Playback Properties:


3D Attributes:

Parameters:

Core:

Profiling:

Callbacks:



General:

Studio::EventInstance::get3DAttributes

Retrieves the 3D attributes.

C
C++
C#
JS

FMOD_RESULT Studio::EventInstance::get3DAttributes(
  FMOD_3D_ATTRIBUTES *attributes
);
FMOD_RESULT FMOD_Studio_EventInstance_Get3DAttributes(
  FMOD_STUDIO_EVENTINSTANCE *eventinstance,
  FMOD_3D_ATTRIBUTES *attributes
);
RESULT Studio.EventInstance.get3DAttributes(
  out _3D_ATTRIBUTES attributes
);
Studio.EventInstance.get3DAttributes(
  attributes
);
attributes Out
3D attributes. (FMOD_3D_ATTRIBUTES)

See Also: Studio::EventInstance::set3DAttributes

Studio::EventInstance::getChannelGroup

Retrieves the core ChannelGroup.

C
C++
C#
JS

FMOD_RESULT Studio::EventInstance::getChannelGroup(
  ChannelGroup **group
);
FMOD_RESULT FMOD_Studio_EventInstance_GetChannelGroup(
  FMOD_STUDIO_EVENTINSTANCE *eventinstance,
  FMOD_CHANNELGROUP **group
);
RESULT Studio.EventInstance.getChannelGroup(
  out FMOD.ChannelGroup group
);
Studio.EventInstance.getChannelGroup(
  group
);
group Out
Core ChannelGroup corresponding to the master track. (ChannelGroup)

Until the event instance has been fully created this function will return FMOD_ERR_STUDIO_NOT_LOADED.

Studio::EventInstance::getCPUUsage

Retrieves the event CPU usage data.

C
C++
C#
JS

FMOD_RESULT Studio::EventInstance::getCPUUsage(
  unsigned int *exclusive,
  unsigned int *inclusive
);
FMOD_RESULT FMOD_Studio_EventInstance_GetCPUUsage(
  FMOD_STUDIO_EVENTINSTANCE *eventinstance,
  unsigned int *exclusive,
  unsigned int *inclusive
);
RESULT Studio.EventInstance.getCPUUsage(
  out uint exclusive,
  out uint inclusive
);
Studio.EventInstance.getCPUUsage(
  exclusive,
  inclusive
);
exclusive OutOpt

CPU time spent processing just this unit during the last update.

  • Units: Microseconds
inclusive OutOpt

CPU time spent processing this unit and all of its input during the last update.

  • Units: Microseconds

FMOD_INIT_PROFILE_ENABLE with System::init is required to call this function.

Studio::EventInstance::getDescription

Retrieves the event description.

C
C++
C#
JS

FMOD_RESULT Studio::EventInstance::getDescription(
  Studio::EventDescription **description
);
FMOD_RESULT FMOD_Studio_EventInstance_GetDescription(
  FMOD_STUDIO_EVENTINSTANCE *eventinstance,
  FMOD_STUDIO_EVENTDESCRIPTION **description
);
RESULT Studio.EventInstance.getDescription(
  out EventDescription description
);
Studio.EventInstance.getDescription(
  description
);
description Out
Event description. (Studio::EventDescription)

Studio::EventInstance::getListenerMask

Retrieves the listener mask.

C
C++
C#
JS

FMOD_RESULT Studio::EventInstance::getListenerMask(
  unsigned int *mask
);
FMOD_RESULT FMOD_Studio_EventInstance_GetListenerMask(
  FMOD_STUDIO_EVENTINSTANCE *eventinstance,
  unsigned int *mask
);
RESULT Studio.EventInstance.getListenerMask(
  out uint mask
);
Studio.EventInstance.getListenerMask(
  mask
);
mask Out
Listener mask.

See Also: Studio::EventInstance::setListenerMask

Studio::EventInstance::getMemoryUsage

Retrieves memory usage statistics.

C
C++
C#
JS

FMOD_RESULT Studio::EventInstance::getMemoryUsage(
  FMOD_STUDIO_MEMORY_USAGE *memoryusage
);
FMOD_RESULT FMOD_Studio_EventInstance_GetMemoryUsage(
  FMOD_STUDIO_EVENTINSTANCE *eventinstance,
  FMOD_STUDIO_MEMORY_USAGE *memoryusage
);
RESULT Studio.EventInstance.getMemoryUsage(
  out MEMORY_USAGE memoryusage
);

Not supported for JavaScript.

memoryusage Out
Memory usage. (FMOD_STUDIO_MEMORY_USAGE)

Memory usage statistics are only available in logging builds, in release builds memoryusage will contain zero for all values this function.

Studio::EventInstance::getMinMaxDistance

Retrieves the minimum and maximum distances for 3D attenuation.

C
C++
C#
JS

FMOD_RESULT Studio::EventInstance::getMinMaxDistance(
  float *min,
  float *max
);
FMOD_RESULT FMOD_Studio_EventInstance_GetMinMaxDistance(
  FMOD_STUDIO_EVENTINSTANCE *eventinstance,
  float *min,
  float *max
);
RESULT Studio.EventInstance.getMinMaxDistance(
  out float min,
  out float max
);
Studio.EventInstance.getMinMaxDistance(
  min,
  max
);
min OutOpt

Minimum distance.

max OutOpt

Maximum distance.

See Also: Studio::EventDescription::getMinMaxDistance

Studio::EventInstance::getParameterByID

Retrieves a parameter value by unique identifier.

C
C++
C#
JS

FMOD_RESULT Studio::EventInstance::getParameterByID(
  FMOD_STUDIO_PARAMETER_ID id,
  float *value,
  float *finalvalue = nullptr
);
FMOD_RESULT FMOD_Studio_EventInstance_GetParameterByID(
  FMOD_STUDIO_EVENTINSTANCE *eventinstance,
  FMOD_STUDIO_PARAMETER_ID id,
  float *value,
  float *finalvalue
);
RESULT Studio.EventInstance.getParameterByID(
  PARAMETER_ID id,
  out float value
);
RESULT Studio.EventInstance.getParameterByID(
  PARAMETER_ID id,
  out float value,
  out float finalvalue
);
Studio.EventInstance.getParameterByID(
  id,
  value,
  finalvalue
);
id
Parameter identifier. (FMOD_STUDIO_PARAMETER_ID)
value OutOpt
Parameter value as set from the public API.
finalvalue OutOpt
Final combined parameter value.

Automatic parameters always return value as 0 since they can never have their value set from the public API.

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::EventInstance::setParameterByID

Studio::EventInstance::getParameterByName

Retrieves a parameter value by name, including the path if needed.

C
C++
C#
JS

FMOD_RESULT Studio::EventInstance::getParameterByName(
  const char *name,
  float *value,
  float *finalvalue = nullptr
);
FMOD_RESULT FMOD_Studio_EventInstance_GetParameterByName(
  FMOD_STUDIO_EVENTINSTANCE *eventinstance,
  const char *name,
  float *value,
  float *finalvalue
);
RESULT Studio.EventInstance.getParameterByName(
  string name,
  out float value
);
RESULT Studio.EventInstance.getParameterByName(
  string name,
  out float value,
  out float finalvalue
);
Studio.EventInstance.getParameterByName(
  name,
  value,
  finalvalue
);
name
Parameter name, including the path if needed (case-insensitive). (UTF-8 string)
value OutOpt
Parameter value as set from the public API.
finalvalue OutOpt
Final combined parameter value.

Automatic parameters always return value as 0 since they can never have their value set from the public API.

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::EventInstance::setParameterByName

Studio::EventInstance::getPaused

Retrieves the pause state.

C
C++
C#
JS

FMOD_RESULT Studio::EventInstance::getPaused(
  bool *paused
);
FMOD_RESULT FMOD_Studio_EventInstance_GetPaused(
  FMOD_STUDIO_EVENTINSTANCE *eventinstance,
  FMOD_BOOL *paused
);
RESULT Studio.EventInstance.getPaused(
  out bool paused
);
Studio.EventInstance.getPaused(
  paused
);
paused Out

Pause state. True if the event instance is paused.

  • Units: Boolean

See Also: Studio::EventInstance::setPaused

Studio::EventInstance::getPitch

Retrieves the pitch multiplier.

C
C++
C#
JS

FMOD_RESULT Studio::EventInstance::getPitch(
  float *pitch,
  float *finalpitch = nullptr
);
FMOD_RESULT FMOD_Studio_EventInstance_GetPitch(
  FMOD_STUDIO_EVENTINSTANCE *eventinstance,
  float *pitch,
  float *finalpitch
);
RESULT Studio.EventInstance.getPitch(
  out float pitch
);
RESULT Studio.EventInstance.getPitch(
  out float pitch,
  out float finalpitch
);
Studio.EventInstance.getPitch(
  pitch,
  finalpitch
);
pitch OutOpt
Pitch multiplier as set from the public API.
finalpitch OutOpt
Final combined pitch.

The final combined value returned in finalpitch combines the pitch set using Studio::EventInstance::setPitch with the result of any automation or modulation. The final combined pitch is calculated asynchronously when the Studio system updates.

Studio::EventInstance::getPlaybackState

Retrieves the playback state.

C
C++
C#
JS

FMOD_RESULT Studio::EventInstance::getPlaybackState(
  FMOD_STUDIO_PLAYBACK_STATE *state
);
FMOD_RESULT FMOD_Studio_EventInstance_GetPlaybackState(
  FMOD_STUDIO_EVENTINSTANCE *eventinstance,
  FMOD_STUDIO_PLAYBACK_STATE *state
);
RESULT Studio.EventInstance.getPlaybackState(
  out PLAYBACK_STATE state
);
Studio.EventInstance.getPlaybackState(
  state
);
state Out
Playback state. (FMOD_STUDIO_PLAYBACK_STATE)

You can poll this function to track the playback state of an event instance.

If the instance is invalid, then the state will be set to FMOD_STUDIO_PLAYBACK_STOPPED.

See Also: Studio::EventInstance::start, Studio::EventInstance::stop, FMOD_STUDIO_EVENT_CALLBACK_TYPE

Studio::EventInstance::getProperty

Retrieves the value of a built-in property.

C
C++
C#
JS

FMOD_RESULT Studio::EventInstance::getProperty(
  FMOD_STUDIO_EVENT_PROPERTY index,
  float *value
);
FMOD_RESULT FMOD_Studio_EventInstance_GetProperty(
  FMOD_STUDIO_EVENTINSTANCE *eventinstance,
  FMOD_STUDIO_EVENT_PROPERTY index,
  float *value
);
RESULT Studio.EventInstance.getProperty(
  EVENT_PROPERTY index,
  out float value
);
Studio.EventInstance.getProperty(
  index,
  value
);
index
Property index. (FMOD_STUDIO_EVENT_PROPERTY)
value Out
Property value set via Studio::EventInstance::setProperty.

A default FMOD_STUDIO_EVENT_PROPERTY value means that the Instance is using the value set in Studio and it has not been overridden using Studio::EventInstance::setProperty. Access the default property values through the Studio::EventDescription.

Studio::EventInstance::getReverbLevel

Retrieves the core reverb send level.

C
C++
C#
JS

FMOD_RESULT Studio::EventInstance::getReverbLevel(
  int index,
  float *level
);
FMOD_RESULT FMOD_Studio_EventInstance_GetReverbLevel(
  FMOD_STUDIO_EVENTINSTANCE *eventinstance,
  int index,
  float *level
);
RESULT Studio.EventInstance.getReverbLevel(
  int index,
  out float level
);
Studio.EventInstance.getReverbLevel(
  index,
  level
);
index

Core reverb instance index.

  • Range: [0, 3]
level Out
Reverb send level.

See Also: Studio::EventInstance::setReverbLevel

Studio::EventInstance::getSystem

Retrieves the FMOD Studio System.

C
C++
C#
JS

FMOD_RESULT Studio::EventInstance::getSystem(
  Studio::System **system
);
FMOD_RESULT FMOD_Studio_EventInstance_GetSystem(
  FMOD_STUDIO_EVENTINSTANCE *eventinstance,
  FMOD_STUDIO_SYSTEM **system
);
RESULT Studio.EventInstance.getSystem(
  out System system
);
Studio.EventInstance.getSystem(
  system
);
system Out
Studio System. (Studio::System)

Studio::EventInstance::getTimelinePosition

Retrieves the timeline cursor position.

C
C++
C#
JS

FMOD_RESULT Studio::EventInstance::getTimelinePosition(
  int *position
);
FMOD_RESULT FMOD_Studio_EventInstance_GetTimelinePosition(
  FMOD_STUDIO_EVENTINSTANCE *eventinstance,
  int *position
);
RESULT Studio.EventInstance.getTimelinePosition(
  out int position
);
Studio.EventInstance.getTimelinePosition(
  position
);
position Out
Timeline position.

See Also: Studio::EventInstance::setTimelinePosition

Studio::EventInstance::getUserData

Retrieves the event instance user data.

C
C++
C#
JS

FMOD_RESULT Studio::EventInstance::getUserData(
  void **userdata
);
FMOD_RESULT FMOD_Studio_EventInstance_GetUserData(
  FMOD_STUDIO_EVENTINSTANCE *eventinstance,
  void **userdata
);
RESULT Studio.EventInstance.getUserData(
  out IntPtr userdata
);
Studio.EventInstance.getUserData(
  userdata
);
userdata Out
User data set by calling Studio::EventInstance::setUserData.

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.

Studio::EventInstance::getVolume

Retrieves the volume level.

C
C++
C#
JS

FMOD_RESULT Studio::EventInstance::getVolume(
  float *volume,
  float *finalvolume = nullptr
);
FMOD_RESULT FMOD_Studio_EventInstance_GetVolume(
  FMOD_STUDIO_EVENTINSTANCE *eventinstance,
  float *volume,
  float *finalvolume
);
RESULT Studio.EventInstance.getVolume(
  out float volume
);
RESULT Studio.EventInstance.getVolume(
  out float volume,
  out float finalvolume
);
Studio.EventInstance.getVolume(
  volume,
  finalvolume
);
volume OutOpt
Volume as set from the public API.
finalvolume OutOpt
Final combined volume.

The final combined value returned in finalvolume combines the volume set using the public API with the result of any automation or modulation. The final combined volume is calculated asynchronously when the Studio system updates.

See Also: Studio::EventInstance::setVolume

Studio::EventInstance::isValid

Checks that the EventInstance reference is valid.

C
C++
C#
JS

bool Studio::EventInstance::isValid()
bool FMOD_Studio_EventInstance_IsValid(FMOD_STUDIO_EVENTINSTANCE *eventinstance)
bool Studio.EventInstance.isValid()
Studio.EventInstance.isValid()

Studio::EventInstance::isVirtual

Retrieves the virtualization state.

C
C++
C#
JS

FMOD_RESULT Studio::EventInstance::isVirtual(
  bool *virtualstate
);
FMOD_RESULT FMOD_Studio_EventInstance_IsVirtual(
  FMOD_STUDIO_EVENTINSTANCE *eventinstance,
  FMOD_BOOL *virtualstate
);
RESULT Studio.EventInstance.isVirtual(
  out bool virtualstate
);
Studio.EventInstance.isVirtual(
  virtualstate
);
virtualstate Out

Virtualization state. True if the event instance has been virtualized.

  • Units: Boolean

This function checks whether an event instance has been virtualized due to the polyphony limit being exceeded. See the Virtual Voice guide for more information.

Studio::EventInstance::keyOff

Allow an event to continue past a sustain point.

C
C++
C#
JS

FMOD_RESULT Studio::EventInstance::keyOff();
FMOD_RESULT FMOD_Studio_EventInstance_KeyOff(FMOD_STUDIO_EVENTINSTANCE *eventinstance);
RESULT Studio.EventInstance.keyOff();
Studio.EventInstance.keyOff();

Multiple sustain points may be bypassed ahead of time and the key off count will be decremented each time the timeline cursor passes a sustain point.

This function returns FMOD_ERR_EVENT_NOTFOUND if the event has no sustain points.

See Also: Studio::EventDescription::hasSustainPoint

Studio::EventInstance::release

Marks the event instance for release.

C
C++
C#
JS

FMOD_RESULT Studio::EventInstance::release();
FMOD_RESULT FMOD_Studio_EventInstance_Release(FMOD_STUDIO_EVENTINSTANCE *eventinstance);
RESULT Studio.EventInstance.release();
Studio.EventInstance.release();

This function marks the event instance to be released. Event instances marked for release are destroyed by the asynchronous update when they are in the stopped state (FMOD_STUDIO_PLAYBACK_STOPPED).

Generally it is a best practice to release event instances immediately after calling Studio::EventInstance::start, unless you want to play the event instance multiple times or explicitly stop it and start it again later. It is possible to interact with the instance after falling release(), however if the sound has stopped ERR_INVALID_HANDLE will be returned.

See Also: Studio::EventInstance::stop, Studio::EventInstance::getPlaybackState

Studio::EventInstance::set3DAttributes

Sets the 3D attributes.

C
C++
C#
JS

FMOD_RESULT Studio::EventInstance::set3DAttributes(
  const FMOD_3D_ATTRIBUTES *attributes
);
FMOD_RESULT FMOD_Studio_EventInstance_Set3DAttributes(
  FMOD_STUDIO_EVENTINSTANCE *eventinstance,
  FMOD_3D_ATTRIBUTES *attributes
);
RESULT Studio.EventInstance.set3DAttributes(
  _3D_ATTRIBUTES attributes
);
Studio.EventInstance.set3DAttributes(
  attributes
);
attributes
3D attributes. (FMOD_3D_ATTRIBUTES)

An event's 3D attributes specify its position, velocity and orientation. The 3D attributes are used to calculate 3D panning, doppler and the values of automatic distance and angle parameters.

See Also: Studio::EventInstance::get3DAttributes

Studio::EventInstance::setCallback

Sets the user callback.

C
C++
C#
JS

FMOD_RESULT Studio::EventInstance::setCallback(
  FMOD_STUDIO_EVENT_CALLBACK callback,
  FMOD_STUDIO_EVENT_CALLBACK_TYPE callbackmask = FMOD_STUDIO_EVENT_CALLBACK_ALL
);
FMOD_RESULT FMOD_Studio_EventInstance_SetCallback(
  FMOD_STUDIO_EVENTINSTANCE *eventinstance,
  FMOD_STUDIO_EVENT_CALLBACK callback,
  FMOD_STUDIO_EVENT_CALLBACK_TYPE callbackmask
);
RESULT Studio.EventInstance.setCallback(
  EVENT_CALLBACK callback,
  EVENT_CALLBACK_TYPE callbackmask = EVENT_CALLBACK_TYPE.ALL
);
Studio.EventInstance.setCallback(
  callback,
  callbackmask
);
callback
User callback. (FMOD_STUDIO_EVENT_CALLBACK)
callbackmask
Bitfield specifying which callback types are required. (FMOD_STUDIO_EVENT_CALLBACK_TYPE)

See Event Callbacks for more information about when callbacks occur.

See Also: Callback Behavior, Studio::EventDescription::setCallback

Studio::EventInstance::setListenerMask

Sets the listener mask.

C
C++
C#
JS

FMOD_RESULT Studio::EventInstance::setListenerMask(
  unsigned int mask
);
FMOD_RESULT FMOD_Studio_EventInstance_SetListenerMask(
  FMOD_STUDIO_EVENTINSTANCE *eventinstance,
  unsigned int mask
);
RESULT Studio.EventInstance.setListenerMask(
  uint mask
);
Studio.EventInstance.setListenerMask(
  mask
);
mask

Listener mask.

  • Default: 0xFFFFFFFF

The listener mask controls which listeners are considered when calculating 3D panning and the values of listener relative automatic parameters.

To create the mask you must perform bitwise OR and shift operations, the basic form is 1 << listener_index ORd together with other required listener indices.
For example to create a mask for listener index 0 and 2 the calculation would be mask = (1 << 0) | (1 << 2), to include all listeners use the default mask of 0xFFFFFFFF.

See Also: Studio::EventInstance::getListenerMask

Studio::EventInstance::setParameterByID

Sets a parameter value by unique identifier.

C
C++
C#
JS

FMOD_RESULT Studio::EventInstance::setParameterByID(
  FMOD_STUDIO_PARAMETER_ID id,
  float value,
  bool ignoreseekspeed = false
);
FMOD_RESULT FMOD_Studio_EventInstance_SetParameterByID(
  FMOD_STUDIO_EVENTINSTANCE *eventinstance,
  FMOD_STUDIO_PARAMETER_ID id,
  float value,
  FMOD_BOOL ignoreseekspeed
);
RESULT Studio.EventInstance.setParameterByID(
  PARAMETER_ID id,
  float value,
  bool ignoreseekspeed = false
);
Studio.EventInstance.setParameterByID(
  id,
  value,
  ignoreseekspeed
);
id
Parameter identifier. (FMOD_STUDIO_PARAMETER_ID)
value
Value for given identifier.
ignoreseekspeed

Specifies whether to ignore the parameter's seek speed and set the value immediately.

  • Units: Boolean

The value will be set instantly regardless of ignoreseekspeed when the Event playback state is FMOD_STUDIO_PLAYBACK_STOPPED.

If the specified parameter is read only, is an automatic parameter, or is not of type FMOD_STUDIO_PARAMETER_GAME_CONTROLLED, then FMOD_ERR_INVALID_PARAM is returned.

See Also: Studio::EventInstance::setParameterByName, Studio::EventInstance::setParametersByIDs, Studio::EventInstance::getParameterByName, Studio::EventInstance::getParameterByID

Studio::EventInstance::setParameterByIDWithLabel

Sets a parameter value by unique identifier, looking up the value label.

C
C++
C#
JS

FMOD_RESULT Studio::EventInstance::setParameterByIDWithLabel(
  FMOD_STUDIO_PARAMETER_ID id,
  const char *label,
  bool ignoreseekspeed = false
);
FMOD_RESULT FMOD_Studio_EventInstance_SetParameterByIDWithLabel(
  FMOD_STUDIO_EVENTINSTANCE *eventinstance,
  FMOD_STUDIO_PARAMETER_ID id,
  const char *label,
  FMOD_BOOL ignoreseekspeed
);
RESULT Studio.EventInstance.setParameterByIDWithLabel(
  PARAMETER_ID id,
  string label,
  bool ignoreseekspeed = false
);
Studio.EventInstance.setParameterByIDWithLabel(
  id,
  label,
  ignoreseekspeed
);
id
Parameter identifier. (FMOD_STUDIO_PARAMETER_ID)
label
Labeled value for given name.
ignoreseekspeed
Specifies whether to ignore the parameter's seek speed and set the value immediately.

The label will be set instantly regardless of ignoreseekspeed when the Event playback state is FMOD_STUDIO_PLAYBACK_STOPPED.

If the specified parameter is read only, is an automatic parameter or is not of type FMOD_STUDIO_PARAMETER_GAME_CONTROLLED then FMOD_ERR_INVALID_PARAM is returned.

If the specified label is not found, FMOD_ERR_EVENT_NOTFOUND is returned. This lookup is case sensitive.

See Also: Studio::EventInstance::setParameterByName, Studio::EventInstance::setParametersByIDs, Studio::EventInstance::getParameterByName, Studio::EventInstance::getParameterByID

Studio::EventInstance::setParameterByName

Sets a parameter value by name, including the path if needed.

C
C++
C#
JS

FMOD_RESULT Studio::EventInstance::setParameterByName(
  const char *name,
  float value,
  bool ignoreseekspeed = false
);
FMOD_RESULT FMOD_Studio_EventInstance_SetParameterByName(
  FMOD_STUDIO_EVENTINSTANCE *eventinstance,
  const char *name,
  float value,
  FMOD_BOOL ignoreseekspeed
);
RESULT Studio.EventInstance.setParameterByName(
  string name,
  float value,
  bool ignoreseekspeed = false
);
Studio.EventInstance.setParameterByName(
  name,
  value,
  ignoreseekspeed
);
name
Parameter name, including the path if needed (case-insensitive). (UTF-8 string)
value
Value for given name.
ignoreseekspeed

Specifies whether to ignore the parameter's seek speed and set the value immediately.

  • Units: Boolean

The value will be set instantly regardless of ignoreseekspeed when the Event playback state is FMOD_STUDIO_PLAYBACK_STOPPED.

If the specified parameter is read only, is an automatic parameter or is not of type FMOD_STUDIO_PARAMETER_GAME_CONTROLLED then FMOD_ERR_INVALID_PARAM is returned.

If the event has no parameter matching name then FMOD_ERR_EVENT_NOTFOUND is returned.

See Also: Studio::EventInstance::setParameterByID, Studio::EventInstance::setParametersByIDs, Studio::EventInstance::getParameterByName, Studio::EventInstance::getParameterByID

Studio::EventInstance::setParameterByNameWithLabel

Sets a parameter value by name, including the path if needed, looking up the value label.

C
C++
C#
JS

FMOD_RESULT Studio::EventInstance::setParameterByNameWithLabel(
  const char *name,
  const char *label,
  bool ignoreseekspeed = false
);
FMOD_RESULT FMOD_Studio_EventInstance_SetParameterByNameWithLabel(
  FMOD_STUDIO_EVENTINSTANCE *eventinstance,
  const char *name,
  const char *label,
  FMOD_BOOL ignoreseekspeed
);
RESULT Studio.EventInstance.setParameterByNameWithLabel(
  string name,
  string label,
  bool ignoreseekspeed = false
);
Studio.EventInstance.setParameterByNameWithLabel(
  name,
  label,
  ignoreseekspeed
);
name
Parameter name, including the path if needed (case-insensitive). (UTF-8 string)
label
Labeled value for given name.
ignoreseekspeed
Specifies whether to ignore the parameter's seek speed and set the value immediately.

The label will be set instantly regardless of ignoreseekspeed when the Event playback state is FMOD_STUDIO_PLAYBACK_STOPPED.

If the specified parameter is read only, is an automatic parameter or is not of type FMOD_STUDIO_PARAMETER_GAME_CONTROLLED then FMOD_ERR_INVALID_PARAM is returned.

If the event has no parameter matching name then FMOD_ERR_EVENT_NOTFOUND is returned.

If the specified label is not found, FMOD_ERR_EVENT_NOTFOUND is returned. This lookup is case sensitive.

See Also: Studio::EventInstance::setParameterByID, Studio::EventInstance::setParametersByIDs, Studio::EventInstance::getParameterByName, Studio::EventInstance::getParameterByID

Studio::EventInstance::setParametersByIDs

Sets multiple parameter values by unique identifier.

C
C++
C#
JS

FMOD_RESULT Studio::EventInstance::setParametersByIDs(
  const FMOD_STUDIO_PARAMETER_ID *ids,
  float *values,
  int count,
  bool ignoreseekspeed = false
);
FMOD_RESULT FMOD_Studio_EventInstance_SetParametersByIDs(
  FMOD_STUDIO_EVENTINSTANCE *eventinstance,
  const FMOD_STUDIO_PARAMETER_ID *ids,
  float *values,
  int count,
  FMOD_BOOL ignoreseekspeed
);
RESULT Studio.EventInstance.setParametersByIDs(
  PARAMETER_ID[] ids,
  float[] values,
  int count,
  bool ignoreseekspeed = false
);
Studio.EventInstance.setParametersByIDs(
  ids,
  values,
  count,
  ignoreseekspeed
);
ids
Array of parameter identifiers. (FMOD_STUDIO_PARAMETER_ID)
values
Array of values for each given identifier.
count

Number of items in the given arrays.

  • Range: [1, 32]
ignoreseekspeed

Specifies whether to ignore the parameter's seek speed and set the value immediately.

  • Units: Boolean

All values will be set instantly regardless of ignoreseekspeed when the Event playback state is FMOD_STUDIO_PLAYBACK_STOPPED.

If any ID is set to all zeroes then the corresponding value will be ignored.

See Also: Studio::EventInstance::setParameterByName, Studio::EventInstance::setParameterByID, Studio::EventInstance::getParameterByName, Studio::EventInstance::getParameterByID

Studio::EventInstance::setPaused

Sets the pause state.

C
C++
C#
JS

FMOD_RESULT Studio::EventInstance::setPaused(
  bool paused
);
FMOD_RESULT FMOD_Studio_EventInstance_SetPaused(
  FMOD_STUDIO_EVENTINSTANCE *eventinstance,
  FMOD_BOOL paused
);
RESULT Studio.EventInstance.setPaused(
  bool paused
);
Studio.EventInstance.setPaused(
  paused
);
paused

The desired pause state. True = paused, False = unpaused.

  • Units: Boolean

This function allows pausing/unpausing of an event instance.

See Also: Studio::EventInstance::getPaused

Studio::EventInstance::setPitch

Sets the pitch multiplier.

C
C++
C#
JS

FMOD_RESULT Studio::EventInstance::setPitch(
  float pitch
);
FMOD_RESULT FMOD_Studio_EventInstance_SetPitch(
  FMOD_STUDIO_EVENTINSTANCE *eventinstance,
  float pitch
);
RESULT Studio.EventInstance.setPitch(
  float pitch
);
Studio.EventInstance.setPitch(
  pitch
);
pitch

Pitch multiplier.

  • Units: Linear
  • Range: [0, inf)
  • Default: 1

The pitch multiplier is used to modulate the event instance's pitch. The pitch multiplier can be set to any value greater than or equal to zero but the final combined pitch is clamped to the range [0, 100] before being applied.

See Also: Studio::EventInstance::getPitch

Studio::EventInstance::setProperty

Sets the value of a built-in property.

C
C++
C#
JS

FMOD_RESULT Studio::EventInstance::setProperty(
  FMOD_STUDIO_EVENT_PROPERTY index,
  float value
);
FMOD_RESULT FMOD_Studio_EventInstance_SetProperty(
  FMOD_STUDIO_EVENTINSTANCE *eventinstance,
  FMOD_STUDIO_EVENT_PROPERTY index,
  float value
);
RESULT Studio.EventInstance.setProperty(
  EVENT_PROPERTY index,
  float value
);
Studio.EventInstance.setProperty(
  index,
  value
);
index
Property index. (FMOD_STUDIO_EVENT_PROPERTY)
value
Property value.

This will override the value set in Studio. Using the default FMOD_STUDIO_EVENT_PROPERTY value will revert back to the default values set in Studio.

An FMOD spatializer or object spatializer may override the values set for FMOD_STUDIO_EVENT_PROPERTY_MINIMUM_DISTANCE and FMOD_STUDIO_EVENT_PROPERTY_MAXIMUM_DISTANCE.

See Also: Studio::EventInstance::getProperty

Studio::EventInstance::setReverbLevel

Sets the core reverb send level.

C
C++
C#
JS

FMOD_RESULT Studio::EventInstance::setReverbLevel(
  int index,
  float level
);
FMOD_RESULT FMOD_Studio_EventInstance_SetReverbLevel(
  FMOD_STUDIO_EVENTINSTANCE *eventinstance,
  int index,
  float level
);
RESULT Studio.EventInstance.setReverbLevel(
  int index,
  float level
);
Studio.EventInstance.setReverbLevel(
  index,
  level
);
index

Core reverb instance index.

  • Range: [0, 3]
level

Reverb send level.

  • Units: Linear
  • Range: [0, 1]
  • Default: 0

This function controls the send level for the signal from the event instance to a core reverb instance.

See Also: Studio::EventInstance::getReverbLevel, Working with Reverb

Studio::EventInstance::setTimelinePosition

Sets the timeline cursor position.

C
C++
C#
JS

FMOD_RESULT Studio::EventInstance::setTimelinePosition(
  int position
);
FMOD_RESULT FMOD_Studio_EventInstance_SetTimelinePosition(
  FMOD_STUDIO_EVENTINSTANCE *eventinstance,
  int position
);
RESULT Studio.EventInstance.setTimelinePosition(
  int position
);
Studio.EventInstance.setTimelinePosition(
  position
);
position

Timeline position.

  • Units: Milliseconds
  • Range: [0, inf)

See Also: Studio::EventInstance::getTimelinePosition

Studio::EventInstance::setUserData

Sets the event instance user data.

C
C++
C#
JS

FMOD_RESULT Studio::EventInstance::setUserData(
  void *userdata
);
FMOD_RESULT FMOD_Studio_EventInstance_SetUserData(
  FMOD_STUDIO_EVENTINSTANCE *eventinstance,
  void *userdata
);
RESULT Studio.EventInstance.setUserData(
  IntPtr userdata
);
Studio.EventInstance.setUserData(
  userdata
);
userdata
User data.

This function allows arbitrary user data to be attached to this object. See the User Data section of the glossary for an example of how to get and set user data.

See Also: Studio::EventInstance::getUserData

Studio::EventInstance::setVolume

Sets the volume level.

C
C++
C#
JS

FMOD_RESULT Studio::EventInstance::setVolume(
  float volume
);
FMOD_RESULT FMOD_Studio_EventInstance_SetVolume(
  FMOD_STUDIO_EVENTINSTANCE *eventinstance,
  float volume
);
RESULT Studio.EventInstance.setVolume(
  float volume
);
Studio.EventInstance.setVolume(
  volume
);
volume

Volume.

  • Units: Linear
  • Range: [0, inf)
  • Default: 1

This volume is applied as a scaling factor for the event volume. It does not override the volume level set in FMOD Studio, nor any internal volume automation or modulation.

See Also: Studio::EventInstance::getVolume

Studio::EventInstance::start

Starts playback.

C
C++
C#
JS

FMOD_RESULT Studio::EventInstance::start();
FMOD_RESULT FMOD_Studio_EventInstance_Start(FMOD_STUDIO_EVENTINSTANCE *eventinstance);
RESULT Studio.EventInstance.start();
Studio.EventInstance.start();

If the instance was already playing then calling this function will restart the event.

Generally it is a best practice to call Studio::EventInstance::release on event instances immediately after starting them, unless you want to play the event instance multiple times or explicitly stop it and start it again later.

See Also: Studio::EventInstance::stop, Sample Data Loading

Studio::EventInstance::stop

Stops playback.

C
C++
C#
JS

FMOD_RESULT Studio::EventInstance::stop(
  FMOD_STUDIO_STOP_MODE mode
);
FMOD_RESULT FMOD_Studio_EventInstance_Stop(
  FMOD_STUDIO_EVENTINSTANCE *eventinstance,
  FMOD_STUDIO_STOP_MODE mode
);
RESULT Studio.EventInstance.stop(
  STOP_MODE mode
);
Studio.EventInstance.stop(
  mode
);
mode
Stop mode. (FMOD_STUDIO_STOP_MODE)

See Also: Studio::EventInstance::start

FMOD_STUDIO_EVENT_CALLBACK

Callback that is fired when a Studio::EventInstance changes state.

C
C++
C#
JS

FMOD_RESULT F_CALL FMOD_STUDIO_EVENT_CALLBACK(
  FMOD_STUDIO_EVENT_CALLBACK_TYPE type,
  FMOD_STUDIO_EVENTINSTANCE *event,
  void *parameters
);
delegate RESULT Studio.EVENT_CALLBACK(
  EVENT_CALLBACK_TYPE type,
  IntPtr event,
  IntPtr parameters
);
function FMOD_STUDIO_EVENT_CALLBACK(
  type,
  event,
  parameters
)
type
The type of event that has occurred. (FMOD_STUDIO_EVENT_CALLBACK_TYPE)
event
The event instance that has changed state. (Studio::EventInstance)
parameters
The callback parameters. The data passed varies based on the callback type.

The data passed to the callback function in the parameters argument varies based on the callback type. See FMOD_STUDIO_EVENT_CALLBACK_TYPE for more information.

Return FMOD_OK from the callback unless you wish to signal that there is an error. Select an appropriate error code from FMOD_RESULT. Returning an error will result in a warning or error message being logged.

The 'event' argument Can be cast to Studio::EventInstance *.

The 'event' argument can be used via EventInstance by using FMOD.Studio.EventInstance instance = new FMOD.Studio.EventInstance(event);

See Also: Callback Behavior, Studio::EventInstance::setCallback, Studio::EventDescription::setCallback, Studio::System::getSoundInfo, FMOD_STUDIO_EVENT_CALLBACK_TYPE, FMOD_STUDIO_PROGRAMMER_SOUND_PROPERTIES

FMOD_STUDIO_EVENT_CALLBACK_TYPE

Studio event callback types.

C
C++
C#
JS

#define FMOD_STUDIO_EVENT_CALLBACK_CREATED                  0x00000001
#define FMOD_STUDIO_EVENT_CALLBACK_DESTROYED                0x00000002
#define FMOD_STUDIO_EVENT_CALLBACK_STARTING                 0x00000004
#define FMOD_STUDIO_EVENT_CALLBACK_STARTED                  0x00000008
#define FMOD_STUDIO_EVENT_CALLBACK_RESTARTED                0x00000010
#define FMOD_STUDIO_EVENT_CALLBACK_STOPPED                  0x00000020
#define FMOD_STUDIO_EVENT_CALLBACK_START_FAILED             0x00000040
#define FMOD_STUDIO_EVENT_CALLBACK_CREATE_PROGRAMMER_SOUND  0x00000080
#define FMOD_STUDIO_EVENT_CALLBACK_DESTROY_PROGRAMMER_SOUND 0x00000100
#define FMOD_STUDIO_EVENT_CALLBACK_PLUGIN_CREATED           0x00000200
#define FMOD_STUDIO_EVENT_CALLBACK_PLUGIN_DESTROYED         0x00000400
#define FMOD_STUDIO_EVENT_CALLBACK_TIMELINE_MARKER          0x00000800
#define FMOD_STUDIO_EVENT_CALLBACK_TIMELINE_BEAT            0x00001000
#define FMOD_STUDIO_EVENT_CALLBACK_SOUND_PLAYED             0x00002000
#define FMOD_STUDIO_EVENT_CALLBACK_SOUND_STOPPED            0x00004000
#define FMOD_STUDIO_EVENT_CALLBACK_REAL_TO_VIRTUAL          0x00008000
#define FMOD_STUDIO_EVENT_CALLBACK_VIRTUAL_TO_REAL          0x00010000
#define FMOD_STUDIO_EVENT_CALLBACK_START_EVENT_COMMAND      0x00020000
#define FMOD_STUDIO_EVENT_CALLBACK_NESTED_TIMELINE_BEAT     0x00040000
#define FMOD_STUDIO_EVENT_CALLBACK_ALL                      0xFFFFFFFF
enum Studio.EVENT_CALLBACK_TYPE : uint
{
  CREATED                  = 0x00000001,
  DESTROYED                = 0x00000002,
  STARTING                 = 0x00000004,
  STARTED                  = 0x00000008,
  RESTARTED                = 0x00000010,
  STOPPED                  = 0x00000020,
  START_FAILED             = 0x00000040,
  CREATE_PROGRAMMER_SOUND  = 0x00000080,
  DESTROY_PROGRAMMER_SOUND = 0x00000100,
  PLUGIN_CREATED           = 0x00000200,
  PLUGIN_DESTROYED         = 0x00000400,
  TIMELINE_MARKER          = 0x00000800,
  TIMELINE_BEAT            = 0x00001000,
  SOUND_PLAYED             = 0x00002000,
  SOUND_STOPPED            = 0x00004000,
  REAL_TO_VIRTUAL          = 0x00008000,
  VIRTUAL_TO_REAL          = 0x00010000,
  START_EVENT_COMMAND      = 0x00020000,
  NESTED_TIMELINE_BEAT     = 0x00040000,
  ALL                      = 0xFFFFFFFF,
}
STUDIO_EVENT_CALLBACK_CREATED                  0x00000001
STUDIO_EVENT_CALLBACK_DESTROYED                0x00000002
STUDIO_EVENT_CALLBACK_STARTING                 0x00000004
STUDIO_EVENT_CALLBACK_STARTED                  0x00000008
STUDIO_EVENT_CALLBACK_RESTARTED                0x00000010
STUDIO_EVENT_CALLBACK_STOPPED                  0x00000020
STUDIO_EVENT_CALLBACK_START_FAILED             0x00000040
STUDIO_EVENT_CALLBACK_CREATE_PROGRAMMER_SOUND  0x00000080
STUDIO_EVENT_CALLBACK_DESTROY_PROGRAMMER_SOUND 0x00000100
STUDIO_EVENT_CALLBACK_PLUGIN_CREATED           0x00000200
STUDIO_EVENT_CALLBACK_PLUGIN_DESTROYED         0x00000400
STUDIO_EVENT_CALLBACK_TIMELINE_MARKER          0x00000800
STUDIO_EVENT_CALLBACK_TIMELINE_BEAT            0x00001000
STUDIO_EVENT_CALLBACK_SOUND_PLAYED             0x00002000
STUDIO_EVENT_CALLBACK_SOUND_STOPPED            0x00004000
STUDIO_EVENT_CALLBACK_REAL_TO_VIRTUAL          0x00008000
STUDIO_EVENT_CALLBACK_VIRTUAL_TO_REAL          0x00010000
STUDIO_EVENT_CALLBACK_START_EVENT_COMMAND      0x00020000
STUDIO_EVENT_CALLBACK_NESTED_TIMELINE_BEAT     0x00040000
STUDIO_EVENT_CALLBACK_ALL                      0xFFFFFFFF
FMOD_STUDIO_EVENT_CALLBACK_CREATED
Called when an instance is fully created. Parameters = unused.
FMOD_STUDIO_EVENT_CALLBACK_DESTROYED
Called when an instance is just about to be destroyed. Parameters = unused.
FMOD_STUDIO_EVENT_CALLBACK_STARTING
Studio::EventInstance::start has been called on an event which was not already playing. The event will remain in this state until its sample data has been loaded. Parameters = unused.
FMOD_STUDIO_EVENT_CALLBACK_STARTED
The event has commenced playing. Normally this callback will be issued immediately after FMOD_STUDIO_EVENT_CALLBACK_STARTING, but may be delayed until sample data has loaded. Parameters = unused.
FMOD_STUDIO_EVENT_CALLBACK_RESTARTED
Studio::EventInstance::start has been called on an event which was already playing. Parameters = unused.
FMOD_STUDIO_EVENT_CALLBACK_STOPPED
The event has stopped. Parameters = unused.
FMOD_STUDIO_EVENT_CALLBACK_START_FAILED
Studio::EventInstance::start has been called but the polyphony settings did not allow the event to start. In this case none of FMOD_STUDIO_EVENT_CALLBACK_STARTING, FMOD_STUDIO_EVENT_CALLBACK_STARTED and FMOD_STUDIO_EVENT_CALLBACK_STOPPED will be called. Parameters = unused.
FMOD_STUDIO_EVENT_CALLBACK_CREATE_PROGRAMMER_SOUND
A programmer sound is about to play. FMOD expects the callback to provide an FMOD::Sound object for it to use. Parameters = FMOD_STUDIO_PROGRAMMER_SOUND_PROPERTIES.
FMOD_STUDIO_EVENT_CALLBACK_DESTROY_PROGRAMMER_SOUND
A programmer sound has stopped playing. At this point it is safe to release the FMOD::Sound object that was used. Parameters = FMOD_STUDIO_PROGRAMMER_SOUND_PROPERTIES.
FMOD_STUDIO_EVENT_CALLBACK_PLUGIN_CREATED
Called when a DSP plug-in instance has just been created. Parameters = FMOD_STUDIO_PLUGIN_INSTANCE_PROPERTIES.
FMOD_STUDIO_EVENT_CALLBACK_PLUGIN_DESTROYED
Called when a DSP plug-in instance is about to be destroyed. Parameters = FMOD_STUDIO_PLUGIN_INSTANCE_PROPERTIES.
FMOD_STUDIO_EVENT_CALLBACK_TIMELINE_MARKER
Called when the timeline passes a named marker. Parameters = FMOD_STUDIO_TIMELINE_MARKER_PROPERTIES.
FMOD_STUDIO_EVENT_CALLBACK_TIMELINE_BEAT
Called when the timeline hits a beat in a tempo section. Parameters = FMOD_STUDIO_TIMELINE_BEAT_PROPERTIES.
FMOD_STUDIO_EVENT_CALLBACK_SOUND_PLAYED
Called when the event plays a sound. Parameters = Sound.
FMOD_STUDIO_EVENT_CALLBACK_SOUND_STOPPED
Called when the event finishes playing a sound. Parameters = Sound.
FMOD_STUDIO_EVENT_CALLBACK_REAL_TO_VIRTUAL
Called when the event becomes virtual. Parameters = unused.
FMOD_STUDIO_EVENT_CALLBACK_VIRTUAL_TO_REAL
Called when the event becomes real. Parameters = unused.
FMOD_STUDIO_EVENT_CALLBACK_START_EVENT_COMMAND
Called when a new event is started by a start event command. Parameters = Studio::EventInstance.
FMOD_STUDIO_EVENT_CALLBACK_NESTED_TIMELINE_BEAT
Called when the timeline hits a beat in a tempo section of a nested event. Parameters = FMOD_STUDIO_TIMELINE_NESTED_BEAT_PROPERTIES.
FMOD_STUDIO_EVENT_CALLBACK_ALL
Pass this mask to Studio::EventDescription::setCallback or Studio::EventInstance::setCallback to receive all callback types.

Callbacks are called from the Studio Update Thread in default / async mode and the main (calling) thread in synchronous mode.
If using FMOD_STUDIO_INIT_DEFERRED_CALLBACKS, FMOD_STUDIO_EVENT_CALLBACK_TIMELINE_MARKER and FMOD_STUDIO_EVENT_CALLBACK_TIMELINE_BEAT are instead called from the main thread.

See Also: Callback Behavior, Studio::EventDescription::setCallback, Studio::EventInstance::setCallback, FMOD_STUDIO_EVENT_CALLBACK

FMOD_STUDIO_EVENT_PROPERTY

These definitions describe built-in event properties.

C
C++
C#
JS

typedef enum FMOD_STUDIO_EVENT_PROPERTY {
  FMOD_STUDIO_EVENT_PROPERTY_CHANNELPRIORITY,
  FMOD_STUDIO_EVENT_PROPERTY_SCHEDULE_DELAY,
  FMOD_STUDIO_EVENT_PROPERTY_SCHEDULE_LOOKAHEAD,
  FMOD_STUDIO_EVENT_PROPERTY_MINIMUM_DISTANCE,
  FMOD_STUDIO_EVENT_PROPERTY_MAXIMUM_DISTANCE,
  FMOD_STUDIO_EVENT_PROPERTY_COOLDOWN,
  FMOD_STUDIO_EVENT_PROPERTY_MAX
} FMOD_STUDIO_EVENT_PROPERTY;
enum Studio.EVENT_PROPERTY
{
    CHANNELPRIORITY,
    SCHEDULE_DELAY,
    SCHEDULE_LOOKAHEAD,
    MINIMUM_DISTANCE,
    MAXIMUM_DISTANCE,
    COOLDOWN,
    MAX
};
STUDIO_EVENT_PROPERTY_CHANNELPRIORITY
STUDIO_EVENT_PROPERTY_SCHEDULE_DELAY
STUDIO_EVENT_PROPERTY_SCHEDULE_LOOKAHEAD
STUDIO_EVENT_PROPERTY_MINIMUM_DISTANCE
STUDIO_EVENT_PROPERTY_MAXIMUM_DISTANCE
STUDIO_EVENT_PROPERTY_COOLDOWN
STUDIO_EVENT_PROPERTY_MAX
FMOD_STUDIO_EVENT_PROPERTY_CHANNELPRIORITY

Priority to set on Core API Channels created by this event instance, or -1 for default.

  • Range: [-1, 256]
  • Default: -1
FMOD_STUDIO_EVENT_PROPERTY_SCHEDULE_DELAY

Schedule delay in DSP clocks, or -1 for default.

  • Range: -1, [0, inf)
  • Default: -1
FMOD_STUDIO_EVENT_PROPERTY_SCHEDULE_LOOKAHEAD

Schedule look-ahead on the timeline in DSP clocks, or -1 for default.

  • Range: -1, [0, inf)
  • Default: -1
FMOD_STUDIO_EVENT_PROPERTY_MINIMUM_DISTANCE

Override the event's 3D minimum distance, or -1 for default.

FMOD_STUDIO_EVENT_PROPERTY_MAXIMUM_DISTANCE

Override the event's 3D maximum distance, or -1 for default.

FMOD_STUDIO_EVENT_PROPERTY_COOLDOWN

Override the event's cooldown, or -1 for default.

  • Range: -1, [0, inf)
  • Default: -1
FMOD_STUDIO_EVENT_PROPERTY_MAX
Maximum number of event property types.

A property that returns a value of -1 from Studio::EventInstance::getProperty means it will use the values set in Studio, use Studio::EventInstance::setProperty to override these values. You can revert the properties value to default by setting it to -1.

FMOD_STUDIO_PLUGIN_INSTANCE_PROPERTIES

Describes a DSP plug-in instance.

C
C++
C#
JS

typedef struct FMOD_STUDIO_PLUGIN_INSTANCE_PROPERTIES {
  const char   *name;
  FMOD_DSP    *dsp;
} FMOD_STUDIO_PLUGIN_INSTANCE_PROPERTIES;
struct Studio.PLUGIN_INSTANCE_PROPERTIES
{
    IntPtr name;
    IntPtr dsp;
}
FMOD_STUDIO_PLUGIN_INSTANCE_PROPERTIES
{
  name,
};
name
Name of the plug-in effect or sound (set in FMOD Studio).
dsp
DSP plug-in instance. (DSP)

This data is passed to the event callback function when type is FMOD_STUDIO_EVENT_CALLBACK_PLUGIN_CREATED or FMOD_STUDIO_EVENT_CALLBACK_PLUGIN_DESTROYED.

The dsp argument can be cast to FMOD::DSP *.

The 'name' argument can be used via StringWrapper by using FMOD.StringWrapper dspName = new FMOD.StringWrapper(name);

The 'dsp' argument can be used via DSP by using FMOD.DSP dspInstance = new FMOD.DSP(dsp);

See Also: FMOD_STUDIO_EVENT_CALLBACK

FMOD_STUDIO_PROGRAMMER_SOUND_PROPERTIES

Describes a programmer sound.

C
C++
C#
JS

typedef struct FMOD_STUDIO_PROGRAMMER_SOUND_PROPERTIES {
  const char   *name;
  FMOD_SOUND   *sound;
  int          subsoundIndex;
} FMOD_STUDIO_PROGRAMMER_SOUND_PROPERTIES;
struct Studio.PROGRAMMER_SOUND_PROPERTIES
{
    StringWrapper name;
    IntPtr sound;
    int subsoundIndex;
}
FMOD_STUDIO_PROGRAMMER_SOUND_PROPERTIES
{
  name,
  sound,
  subsoundIndex,
};
name
Name of the programmer instrument (set in FMOD Studio). (UTF-8 string)
sound
Programmer-created sound. (Sound)
subsoundIndex
Subsound index.

This data is passed to the event callback function when type is FMOD_STUDIO_EVENT_CALLBACK_CREATE_PROGRAMMER_SOUND or FMOD_STUDIO_EVENT_CALLBACK_DESTROY_PROGRAMMER_SOUND.

When the callback type is FMOD_STUDIO_EVENT_CALLBACK_CREATE_PROGRAMMER_SOUND the callback should fill in the sound and subsoundIndex fields. The provided sound should be created with the FMOD_LOOP_NORMAL mode bit set. FMOD will set this bit internally if it is not set, possibly incurring a performance penalty. The subsound index should be set to the subsound to play, or -1 if the provided sound should be used directly.

When the callback type is FMOD_STUDIO_EVENT_CALLBACK_DESTROY_PROGRAMMER_SOUND the sound in sound should be cleaned up.

sound can be cast to/from FMOD::Sound *.

See Also: FMOD_STUDIO_EVENT_CALLBACK

FMOD_STUDIO_STOP_MODE

Stop modes.

C
C++
C#
JS

typedef enum FMOD_STUDIO_STOP_MODE {
  FMOD_STUDIO_STOP_ALLOWFADEOUT,
  FMOD_STUDIO_STOP_IMMEDIATE
} FMOD_STUDIO_STOP_MODE;
enum Studio.STOP_MODE
{
    ALLOWFADEOUT,
    IMMEDIATE,
}
STUDIO_STOP_ALLOWFADEOUT
STUDIO_STOP_IMMEDIATE
FMOD_STUDIO_STOP_ALLOWFADEOUT
Allows AHDSR modulators to complete their release, and DSP effect tails to play out.
FMOD_STUDIO_STOP_IMMEDIATE
Stops the event instance immediately.

See Also: Studio::EventInstance::stop, Studio::Bus::stopAllEvents

FMOD_STUDIO_TIMELINE_BEAT_PROPERTIES

Describes a beat on the timeline.

C
C++
C#
JS

typedef struct FMOD_STUDIO_TIMELINE_BEAT_PROPERTIES {
  int     bar;
  int     beat;
  int     position;
  float   tempo;
  int     timesignatureupper;
  int     timesignaturelower;
} FMOD_STUDIO_TIMELINE_BEAT_PROPERTIES;
struct Studio.TIMELINE_BEAT_PROPERTIES
{
  int bar;
  int beat;
  int position;
  float tempo;
  int timesignatureupper;
  int timesignaturelower;
}
FMOD_STUDIO_TIMELINE_BEAT_PROPERTIES
{
  bar,
  beat,
  position,
  tempo,
  timesignatureupper,
  timesignaturelower,
};
bar
Bar number (starting from 1).
beat
Beat number within bar (starting from 1).
position
Position of the beat on the timeline in milliseconds.
tempo
Current tempo in beats per minute.
timesignatureupper
Current time signature upper number (beats per bar).
timesignaturelower
Current time signature lower number (beat unit).

This data is passed to the event callback function when type is FMOD_STUDIO_EVENT_CALLBACK_TIMELINE_BEAT.

Nested events do not trigger this callback. Instead, see FMOD_STUDIO_EVENT_CALLBACK_NESTED_TIMELINE_BEAT.

See Also: FMOD_STUDIO_EVENT_CALLBACK

FMOD_STUDIO_TIMELINE_MARKER_PROPERTIES

Describes a marker on the timeline.

C
C++
C#
JS

typedef struct FMOD_STUDIO_TIMELINE_MARKER_PROPERTIES {
  const char   *name;
  int          position;
} FMOD_STUDIO_TIMELINE_MARKER_PROPERTIES;
struct Studio.TIMELINE_MARKER_PROPERTIES
{
  IntPtr name;
  int position;
}
FMOD_STUDIO_TIMELINE_MARKER_PROPERTIES
{
  name,
  position,
};
name
Marker name.
position
Position of the marker on the timeline in milliseconds.

This data is passed to the event callback function when type is FMOD_STUDIO_EVENT_CALLBACK_TIMELINE_MARKER.

See Also: Studio::EventDescription::setCallback, Studio::EventInstance::setCallback

FMOD_STUDIO_TIMELINE_NESTED_BEAT_PROPERTIES

Describes a beat on the timeline from a nested event.

C
C++
C#
JS

typedef struct FMOD_STUDIO_TIMELINE_NESTED_BEAT_PROPERTIES {
  FMOD_GUID                             eventid;
  FMOD_STUDIO_TIMELINE_BEAT_PROPERTIES  properties;
} FMOD_STUDIO_TIMELINE_NESTED_BEAT_PROPERTIES;
struct Studio.TIMELINE_NESTED_BEAT_PROPERTIES
{
  Guid                      eventid;
  TIMELINE_BEAT_PROPERTIES  properties;
}
FMOD_STUDIO_TIMELINE_NESTED_BEAT_PROPERTIES
{
  eventid,
  properties,
};
eventid
Event description GUID. (FMOD_GUID)
properties
Beat properties. (FMOD_STUDIO_TIMELINE_BEAT_PROPERTIES)

This data is passed to the event callback function when type is FMOD_STUDIO_EVENT_CALLBACK_NESTED_TIMELINE_BEAT.

See Also: FMOD_STUDIO_EVENT_CALLBACK, FMOD_STUDIO_EVENT_CALLBACK_TIMELINE_BEAT