FMOD API User Manual 2.00
The description for an FMOD Studio Event.
Event descriptions belong to banks and can be queried after the relevant bank has been loaded. Event descriptions may be retrieved via path or GUID lookup, or by enumerating all descriptions in a bank.
Instances:
Sample Data:
Attributes:
Parameters:
User Properties:
General:
See Also:
Creates a playable instance.
FMOD_RESULT Studio::EventDescription::createInstance(
Studio::EventInstance **instance
);
When an event instance is created, any required non-streaming sample data is loaded asynchronously.
Use Studio::EventDescription::getSampleLoadingState to check the loading status.
Sample data can be loaded ahead of time with Studio::EventDescription::loadSampleData or Studio::Bank::loadSampleData. See Sample Data Loading for more information.
See Also: Studio::EventInstance::release
Retrieves the GUID.
FMOD_RESULT Studio::EventDescription::getID(
FMOD_GUID *id
);
Retrieves the number of instances.
FMOD_RESULT Studio::EventDescription::getInstanceCount(
int *count
);
May be used in conjunction with Studio::EventDescription::getInstanceList to enumerate the instances of this event.
Retrieves a list of the instances.
FMOD_RESULT Studio::EventDescription::getInstanceList(
Studio::EventInstance **array,
int capacity,
int *count
);
array.array.This function returns a maximum of capacity instances. If more than capacity instances have been created then additional instances will be silently ignored.
May be used in conjunction with Studio::EventDescription::getInstanceCount to enumerate the instances of this event.
Retrieves the length of the timeline.
FMOD_RESULT Studio::EventDescription::getLength(
int *length
);
Timeline length.
A timeline's length is the largest of any logic markers, transition leadouts and the end of any trigger boxes on the timeline.
See Also: Studio::EventInstance::getTimelinePosition, Studio::EventInstance::setTimelinePosition
Retrieves the maximum distance for 3D attenuation.
FMOD_RESULT Studio::EventDescription::getMaximumDistance(
float *distance
);
Maximum distance.
Retrieves the largest maximum distance value of all FMOD Spatializers FMOD_DSP_TYPE_PAN and FMOD Object Spatializers FMOD_DSP_TYPE_OBJECTPAN on the event's master track. Returns zero if none are found. This function is not compatible with third party spatializers.
See Also: Studio::EventDescription::getMinimumDistance
Retrieves the minimum distance for 3D attenuation.
FMOD_RESULT Studio::EventDescription::getMinimumDistance(
float *distance
);
Minimum distance.
Retrieves the smallest minimum distance value of all FMOD Spatializers FMOD_DSP_TYPE_PAN and FMOD Object Spatializers FMOD_DSP_TYPE_OBJECTPAN on the event's master track. Returns zero if none are found. This function is not compatible with third party spatializers.
See Also: Studio::EventDescription::getMaximumDistance
Retrieves an event parameter description by id.
FMOD_RESULT Studio::EventDescription::getParameterDescriptionByID(
FMOD_STUDIO_PARAMETER_ID id,
FMOD_STUDIO_PARAMETER_DESCRIPTION *parameter
);
Retrieves an event parameter description by index.
FMOD_RESULT Studio::EventDescription::getParameterDescriptionByIndex(
int index,
FMOD_STUDIO_PARAMETER_DESCRIPTION *parameter
);
May be used in combination with Studio::EventDescription::getParameterDescriptionCount to enumerate event parameters.
The order of parameters is not necessarily the same as what is shown in the FMOD Studio event editor.
Retrieves an event parameter description by name.
FMOD_RESULT Studio::EventDescription::getParameterDescriptionByName(
const char *name,
FMOD_STUDIO_PARAMETER_DESCRIPTION *parameter
);
Retrieves the number of parameters in the event.
FMOD_RESULT Studio::EventDescription::getParameterDescriptionCount(
int *count
);
May be used in conjunction with Studio::EventDescription::getParameterDescriptionByIndex to enumerate event parameters.
Retrieves the path.
FMOD_RESULT Studio::EventDescription::getPath(
char *path,
int size,
int *retrieved
);
path is null.The strings bank must be loaded prior to calling this function, otherwise FMOD_ERR_EVENT_NOTFOUND is returned.
If the path is longer than size then it is truncated and this function returns FMOD_ERR_TRUNCATED.
The retrieved parameter can be used to get the buffer size required to hold the full path.
Retrieves the sample data loading state.
FMOD_RESULT Studio::EventDescription::getSampleLoadingState(
FMOD_STUDIO_LOADING_STATE *state
);
If the event is invalid, then the state is set to FMOD_STUDIO_LOADING_STATE_UNLOADED and this function returns FMOD_ERR_INVALID_HANDLE.
See Also: Studio::EventDescription::loadSampleData, Studio::Bank::loadSampleData, Studio::EventDescription::createInstance, Sample Data Loading
Retrieves the sound size for 3D panning.
FMOD_RESULT Studio::EventDescription::getSoundSize(
float *size
);
Retrieves the largest Sound Size value of all Spatializers and 3D Object Spatializers on the event's master track. Returns zero if there are no Spatializers or 3D Object Spatializers.
See Also: Studio::EventDescription::is3D
Retrieves the event user data.
FMOD_RESULT Studio::EventDescription::getUserData(
void **userdata
);
Retrieves a user property by name.
FMOD_RESULT Studio::EventDescription::getUserProperty(
const char *name,
FMOD_STUDIO_USER_PROPERTY *property
);
See Also: Studio::EventDescription::getUserPropertyCount, Studio::EventDescription::getUserPropertyByIndex
Retrieves a user property by index.
FMOD_RESULT Studio::EventDescription::getUserPropertyByIndex(
int index,
FMOD_STUDIO_USER_PROPERTY *property
);
May be used in combination with Studio::EventDescription::getUserPropertyCount to enumerate event user properties.
See Also: Studio::EventDescription::getUserProperty
Retrieves the number of user properties attached to the event.
FMOD_RESULT Studio::EventDescription::getUserPropertyCount(
int *count
);
May be used in combination with Studio::EventDescription::getUserPropertyByIndex to enumerate event user properties.
See Also: Studio::EventDescription::getUserProperty
Retrieves whether the event has any sustain points.
FMOD_RESULT Studio::EventDescription::hasCue(
bool *cue
);
Cue status. True if the event has one or more sustain points.
Retrieves the event's 3D status.
FMOD_RESULT Studio::EventDescription::is3D(
bool *is3d
);
3D status. True if the event is 3D.
An event is considered 3D if any of these conditions are met:
Note: If the event contains nested events built to separate banks using versions of FMOD Studio prior to 2.00.10 and those banks have not been loaded then this function may fail to correctly determine the event's 3D status.
Retrieves the event's oneshot status.
FMOD_RESULT Studio::EventDescription::isOneshot(
bool *oneshot
);
oneshot status. True if the event is a oneshot event.
An event is considered oneshot if it is guaranteed to terminate without intervention in bounded time after being started. Instances of such events can be played in a fire-and-forget fashion by calling Studio::EventInstance::start immediately followed by Studio::EventInstance::release.
Note: If the event contains nested events built to separate banks and those banks have not been loaded then this function may fail to correctly determine the event's oneshot status.
Retrieves the event's snapshot status.
FMOD_RESULT Studio::EventDescription::isSnapshot(
bool *snapshot
);
Snapshot status. True if the event is a snapshot.
Retrieves the event's stream status.
FMOD_RESULT Studio::EventDescription::isStream(
bool *isStream
);
Stream status. True if the event contains one or more streamed sounds.
Note: If the event contains nested events built to separate banks and those banks have not been loaded then this function may fail to correctly determine the event's stream status.
Checks that the EventDescription reference is valid.
bool Studio::EventDescription::isValid()
Loads non-streaming sample data used by the event.
FMOD_RESULT Studio::EventDescription::loadSampleData();
This function will load all non-streaming sample data required by the event and any referenced events.
Sample data is loaded asynchronously, Studio::EventDescription::getSampleLoadingState may be used to poll the loading state.
See Also: Studio::EventDescription::unloadSampleData, Sample Data Loading
Releases all instances.
FMOD_RESULT Studio::EventDescription::releaseAllInstances();
This function immediately stops and releases all instances of the event.
See Also: Studio::EventInstance::release
Sets the user callback.
FMOD_RESULT Studio::EventDescription::setCallback(
FMOD_STUDIO_EVENT_CALLBACK callback,
FMOD_STUDIO_EVENT_CALLBACK_TYPE callbackmask = FMOD_STUDIO_EVENT_CALLBACK_ALL
);
This function sets a user callback which will be assigned to all event instances subsequently created from the event. The callback for individual instances can be set with Studio::EventInstance::setCallback.
See Event Callbacks for more information about when callbacks occur.
See Also: Callback Behavior
Sets the event user data.
FMOD_RESULT Studio::EventDescription::setUserData(
void *userdata
);
This function allows arbitrary user data to be attached to an event description. The user data can be retrieved by calling Studio::EventDescription::getUserData.
Unloads all non-streaming sample data.
FMOD_RESULT Studio::EventDescription::unloadSampleData();
Sample data will not be unloaded until all instances of the event are released.
See Also: Studio::EventDescription::loadSampleData, Sample Data Loading
Describes a user property.
typedef struct FMOD_STUDIO_USER_PROPERTY {
const char *name;
FMOD_STUDIO_USER_PROPERTY_TYPE type;
union
{
int intvalue;
FMOD_BOOL boolvalue;
float floatvalue;
const char *stringvalue;
}
} FMOD_STUDIO_USER_PROPERTY;
Boolean value. Only valid when type is FMOD_STUDIO_USER_PROPERTY_TYPE_BOOLEAN.
See Also: Studio::EventDescription::getUserProperty
User property types.
typedef enum FMOD_STUDIO_USER_PROPERTY_TYPE {
FMOD_STUDIO_USER_PROPERTY_TYPE_INTEGER,
FMOD_STUDIO_USER_PROPERTY_TYPE_BOOLEAN,
FMOD_STUDIO_USER_PROPERTY_TYPE_FLOAT,
FMOD_STUDIO_USER_PROPERTY_TYPE_STRING
} FMOD_STUDIO_USER_PROPERTY_TYPE;
See Also: FMOD_STUDIO_USER_PROPERTY