Studio API Reference | Studio::EventInstance

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
);
attributes Out
3D attributes. (FMOD_3D_ATTRIBUTES)

See Also: Studio::EventInstance::set3DAttributes

Studio::EventInstance::getChannelGroup

Retrieves the core channel group.

C
C++
C#
JS

FMOD_RESULT Studio::EventInstance::getChannelGroup(
  ChannelGroup **group
);
group Out
Core channel group 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
);
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
);
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
);
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
);
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::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
);
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.

C
C++
C#
JS

FMOD_RESULT Studio::EventInstance::getParameterByName(
  const char *name,
  float *value,
  float *finalvalue = nullptr
);
name
Parameter name (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
);
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
);
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
);
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
);
index
Property index. (FMOD_STUDIO_EVENT_PROPERTY)
value Out
Property value.

See Also: Studio::EventInstance::setProperty

Studio::EventInstance::getReverbLevel

Retrieves the core reverb send level.

C
C++
C#
JS

FMOD_RESULT Studio::EventInstance::getReverbLevel(
  int index,
  float *level
);
index

Core reverb instance index.

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

See Also: Studio::EventInstance::setReverbLevel

Studio::EventInstance::getTimelinePosition

Retrieves the timeline cursor position.

C
C++
C#
JS

FMOD_RESULT Studio::EventInstance::getTimelinePosition(
  int *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
);
userdata Out
User data.

See Also: Studio::EventInstance::setUserData

Studio::EventInstance::getVolume

Retrieves the volume level.

C
C++
C#
JS

FMOD_RESULT Studio::EventInstance::getVolume(
  float *volume,
  float *finalvolume = nullptr
);
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()

Studio::EventInstance::isVirtual

Retrieves the virtualization state.

C
C++
C#
JS

FMOD_RESULT Studio::EventInstance::isVirtual(
  bool *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.

Studio::EventInstance::release

Marks the event instance for release.

C
C++
C#
JS

FMOD_RESULT 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).

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
);
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
);
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
);
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
);
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 an automatic parameter then FMOD_ERR_INVALID_PARAM is returned.

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

Studio::EventInstance::setParameterByName

Sets a parameter value by name.

C
C++
C#
JS

FMOD_RESULT Studio::EventInstance::setParameterByName(
  const char *name,
  float value,
  bool ignoreseekspeed = false
);
name
Parameter name (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 an automatic parameter 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::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
);
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
);
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
);
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
);
index
Property index. (FMOD_STUDIO_EVENT_PROPERTY)
value
Property value.

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
);
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
);
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
);
userdata
User data.

This function allows arbitrary user data to be attached to an event instance. The user data can be retrieved by calling Studio::EventInstance::getUserData.

Studio::EventInstance::setVolume

Sets the volume level.

C
C++
C#
JS

FMOD_RESULT Studio::EventInstance::setVolume(
  float 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();

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

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
);
mode
Stop mode. (FMOD_STUDIO_STOP_MODE)

See Also: Studio::EventInstance::start

Studio::EventInstance::triggerCue

Triggers a cue on the event instance.

C
C++
C#
JS

FMOD_RESULT Studio::EventInstance::triggerCue();

Triggering cues allows the timeline cursor to continue past sustain points.

Multiple cues may be triggered ahead of time and the trigger 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::hasCue

FMOD_STUDIO_EVENT_CALLBACK

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

C
C++
C#
JS

FMOD_RESULT F_CALLBACK FMOD_STUDIO_EVENT_CALLBACK(
  FMOD_STUDIO_EVENT_CALLBACK_TYPE type,
  FMOD_STUDIO_EVENTINSTANCE *event,
  void *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.

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

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_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 not 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 plugin instance has just been created. Parameters = FMOD_STUDIO_PLUGIN_INSTANCE_PROPERTIES.
FMOD_STUDIO_EVENT_CALLBACK_PLUGIN_DESTROYED
Called when a DSP plugin 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_ALL
Pass this mask to Studio::EventDescription::setCallback or Studio::EventInstance::setCallback to receive all callback types.

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;
FMOD_STUDIO_EVENT_PROPERTY_CHANNELPRIORITY

Priority to set on Core 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.

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

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

  • Range: -1, [0, inf)
  • Default: -1
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.

See Also: Studio::EventInstance::getProperty, Studio::EventInstance::setProperty

FMOD_STUDIO_PLUGIN_INSTANCE_PROPERTIES

Describes a DSP plugin instance.

C
C++
C#
JS

typedef struct FMOD_STUDIO_PLUGIN_INSTANCE_PROPERTIES {
  const char   *name;
  FMOD_DSP    *dsp;
} FMOD_STUDIO_PLUGIN_INSTANCE_PROPERTIES;
name
Name of the plugin effect or sound (set in FMOD Studio).
dsp
DSP plugin 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 *.

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;
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;
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;
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.

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;
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