mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-25 12:38:24 +01:00
1123 lines
48 KiB
C#
1123 lines
48 KiB
C#
// <auto-generated/>
|
|
// Generated by Brutal.Fmod.Generate; do not edit by hand.
|
|
#nullable enable
|
|
|
|
namespace Brutal.FmodApi.Studio
|
|
{
|
|
public static partial class FmodStudio
|
|
{
|
|
/// <summary>
|
|
/// <para>
|
|
/// Checks that the EventInstance reference is valid.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_isvalid">Studio::EventInstance::isValid</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static Bool32 IsValid(this EventInstance eventInstance) => PInvoke.EventInstanceIsValid(eventInstance);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the event description.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_getdescription">Studio::EventInstance::getDescription</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TryGetDescription(
|
|
this EventInstance eventInstance,
|
|
out EventDescription description
|
|
)
|
|
{
|
|
fixed (EventDescription* descriptionPtr = &description)
|
|
return PInvoke.EventInstanceGetDescription(eventInstance, descriptionPtr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the event description.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_getdescription">Studio::EventInstance::getDescription</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static EventDescription GetDescription(this EventInstance eventInstance)
|
|
{
|
|
TryGetDescription(eventInstance, out var description).Check();
|
|
return description;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the FMOD Studio System.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_getsystem">Studio::EventInstance::getSystem</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TryGetSystem(this EventInstance eventInstance, out FmodStudioSystem system)
|
|
{
|
|
fixed (FmodStudioSystem* systemPtr = &system)
|
|
return PInvoke.EventInstanceGetSystem(eventInstance, systemPtr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the FMOD Studio System.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_getsystem">Studio::EventInstance::getSystem</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static FmodStudioSystem GetSystem(this EventInstance eventInstance)
|
|
{
|
|
TryGetSystem(eventInstance, out var system).Check();
|
|
return system;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the volume level.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_getvolume">Studio::EventInstance::getVolume</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TryGetVolume(
|
|
this EventInstance eventInstance,
|
|
out float volume,
|
|
out float finalVolume
|
|
)
|
|
{
|
|
fixed (float* volumePtr = &volume)
|
|
fixed (float* finalVolumePtr = &finalVolume)
|
|
return PInvoke.EventInstanceGetVolume(eventInstance, volumePtr, finalVolumePtr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the volume level.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_getvolume">Studio::EventInstance::getVolume</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void GetVolume(this EventInstance eventInstance, out float volume, out float finalVolume) =>
|
|
TryGetVolume(eventInstance, out volume, out finalVolume).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets the volume level.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_setvolume">Studio::EventInstance::setVolume</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static Result TrySetVolume(this EventInstance eventInstance, float volume) =>
|
|
PInvoke.EventInstanceSetVolume(eventInstance, volume);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets the volume level.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_setvolume">Studio::EventInstance::setVolume</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void SetVolume(this EventInstance eventInstance, float volume) =>
|
|
TrySetVolume(eventInstance, volume).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the pitch multiplier.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_getpitch">Studio::EventInstance::getPitch</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TryGetPitch(this EventInstance eventInstance, out float pitch, out float finalPitch)
|
|
{
|
|
fixed (float* pitchPtr = &pitch)
|
|
fixed (float* finalPitchPtr = &finalPitch)
|
|
return PInvoke.EventInstanceGetPitch(eventInstance, pitchPtr, finalPitchPtr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the pitch multiplier.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_getpitch">Studio::EventInstance::getPitch</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void GetPitch(this EventInstance eventInstance, out float pitch, out float finalPitch) =>
|
|
TryGetPitch(eventInstance, out pitch, out finalPitch).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets the pitch multiplier.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_setpitch">Studio::EventInstance::setPitch</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static Result TrySetPitch(this EventInstance eventInstance, float pitch) =>
|
|
PInvoke.EventInstanceSetPitch(eventInstance, pitch);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets the pitch multiplier.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_setpitch">Studio::EventInstance::setPitch</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void SetPitch(this EventInstance eventInstance, float pitch) =>
|
|
TrySetPitch(eventInstance, pitch).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the 3D attributes.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_get3dattributes">Studio::EventInstance::get3DAttributes</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TryGet3dAttributes(this EventInstance eventInstance, out Attributes3d attributes)
|
|
{
|
|
fixed (Attributes3d* attributesPtr = &attributes)
|
|
return PInvoke.EventInstanceGet3dAttributes(eventInstance, attributesPtr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the 3D attributes.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_get3dattributes">Studio::EventInstance::get3DAttributes</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static Attributes3d Get3dAttributes(this EventInstance eventInstance)
|
|
{
|
|
TryGet3dAttributes(eventInstance, out var attributes).Check();
|
|
return attributes;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets the 3D attributes.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_set3dattributes">Studio::EventInstance::set3DAttributes</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TrySet3dAttributes(this EventInstance eventInstance, in Attributes3d attributes)
|
|
{
|
|
fixed (Attributes3d* attributesPtr = &attributes)
|
|
return PInvoke.EventInstanceSet3dAttributes(eventInstance, attributesPtr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets the 3D attributes.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_set3dattributes">Studio::EventInstance::set3DAttributes</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void Set3dAttributes(this EventInstance eventInstance, in Attributes3d attributes) =>
|
|
TrySet3dAttributes(eventInstance, attributes).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the listener mask.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_getlistenermask">Studio::EventInstance::getListenerMask</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TryGetListenerMask(this EventInstance eventInstance, out uint mask)
|
|
{
|
|
fixed (uint* maskPtr = &mask)
|
|
return PInvoke.EventInstanceGetListenerMask(eventInstance, maskPtr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the listener mask.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_getlistenermask">Studio::EventInstance::getListenerMask</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static uint GetListenerMask(this EventInstance eventInstance)
|
|
{
|
|
TryGetListenerMask(eventInstance, out var mask).Check();
|
|
return mask;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets the listener mask.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_setlistenermask">Studio::EventInstance::setListenerMask</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static Result TrySetListenerMask(this EventInstance eventInstance, uint mask) =>
|
|
PInvoke.EventInstanceSetListenerMask(eventInstance, mask);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets the listener mask.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_setlistenermask">Studio::EventInstance::setListenerMask</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void SetListenerMask(this EventInstance eventInstance, uint mask) =>
|
|
TrySetListenerMask(eventInstance, mask).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the value of a built-in property.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_getproperty">Studio::EventInstance::getProperty</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TryGetProperty(
|
|
this EventInstance eventInstance,
|
|
EventProperty index,
|
|
out float value
|
|
)
|
|
{
|
|
fixed (float* valuePtr = &value)
|
|
return PInvoke.EventInstanceGetProperty(eventInstance, index, valuePtr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the value of a built-in property.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_getproperty">Studio::EventInstance::getProperty</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static float GetProperty(this EventInstance eventInstance, EventProperty index)
|
|
{
|
|
TryGetProperty(eventInstance, index, out var value).Check();
|
|
return value;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets the value of a built-in property.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_setproperty">Studio::EventInstance::setProperty</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static Result TrySetProperty(this EventInstance eventInstance, EventProperty index, float value) =>
|
|
PInvoke.EventInstanceSetProperty(eventInstance, index, value);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets the value of a built-in property.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_setproperty">Studio::EventInstance::setProperty</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void SetProperty(this EventInstance eventInstance, EventProperty index, float value) =>
|
|
TrySetProperty(eventInstance, index, value).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the core reverb send level.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_getreverblevel">Studio::EventInstance::getReverbLevel</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TryGetReverbLevel(this EventInstance eventInstance, int index, out float level)
|
|
{
|
|
fixed (float* levelPtr = &level)
|
|
return PInvoke.EventInstanceGetReverbLevel(eventInstance, index, levelPtr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the core reverb send level.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_getreverblevel">Studio::EventInstance::getReverbLevel</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static float GetReverbLevel(this EventInstance eventInstance, int index)
|
|
{
|
|
TryGetReverbLevel(eventInstance, index, out var level).Check();
|
|
return level;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets the core reverb send level.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_setreverblevel">Studio::EventInstance::setReverbLevel</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static Result TrySetReverbLevel(this EventInstance eventInstance, int index, float level) =>
|
|
PInvoke.EventInstanceSetReverbLevel(eventInstance, index, level);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets the core reverb send level.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_setreverblevel">Studio::EventInstance::setReverbLevel</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void SetReverbLevel(this EventInstance eventInstance, int index, float level) =>
|
|
TrySetReverbLevel(eventInstance, index, level).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the pause state.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_getpaused">Studio::EventInstance::getPaused</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TryGetPaused(this EventInstance eventInstance, out Bool32 paused)
|
|
{
|
|
fixed (Bool32* pausedPtr = &paused)
|
|
return PInvoke.EventInstanceGetPaused(eventInstance, pausedPtr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the pause state.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_getpaused">Studio::EventInstance::getPaused</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static Bool32 GetPaused(this EventInstance eventInstance)
|
|
{
|
|
TryGetPaused(eventInstance, out var paused).Check();
|
|
return paused;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets the pause state.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_setpaused">Studio::EventInstance::setPaused</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static Result TrySetPaused(this EventInstance eventInstance, Bool32 paused) =>
|
|
PInvoke.EventInstanceSetPaused(eventInstance, paused);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets the pause state.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_setpaused">Studio::EventInstance::setPaused</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void SetPaused(this EventInstance eventInstance, Bool32 paused) =>
|
|
TrySetPaused(eventInstance, paused).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Starts playback.
|
|
/// </para>
|
|
/// <para>
|
|
/// If the instance was already playing then calling this function will restart the event.
|
|
/// </para>
|
|
/// <para>
|
|
/// 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.
|
|
/// </para>
|
|
/// <para>
|
|
/// <b>See Also:</b> Studio::EventInstance::stop, Sample Data Loading
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_start">Studio::EventInstance::start</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static Result TryStart(this EventInstance eventInstance) => PInvoke.EventInstanceStart(eventInstance);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Starts playback.
|
|
/// </para>
|
|
/// <para>
|
|
/// If the instance was already playing then calling this function will restart the event.
|
|
/// </para>
|
|
/// <para>
|
|
/// 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.
|
|
/// </para>
|
|
/// <para>
|
|
/// <b>See Also:</b> Studio::EventInstance::stop, Sample Data Loading
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_start">Studio::EventInstance::start</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void Start(this EventInstance eventInstance) => TryStart(eventInstance).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Stops playback.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_stop">Studio::EventInstance::stop</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static Result TryStop(this EventInstance eventInstance, StopMode mode) =>
|
|
PInvoke.EventInstanceStop(eventInstance, mode);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Stops playback.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_stop">Studio::EventInstance::stop</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void Stop(this EventInstance eventInstance, StopMode mode) =>
|
|
TryStop(eventInstance, mode).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the timeline cursor position.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_gettimelineposition">Studio::EventInstance::getTimelinePosition</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TryGetTimelinePosition(this EventInstance eventInstance, out int position)
|
|
{
|
|
fixed (int* positionPtr = &position)
|
|
return PInvoke.EventInstanceGetTimelinePosition(eventInstance, positionPtr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the timeline cursor position.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_gettimelineposition">Studio::EventInstance::getTimelinePosition</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static int GetTimelinePosition(this EventInstance eventInstance)
|
|
{
|
|
TryGetTimelinePosition(eventInstance, out var position).Check();
|
|
return position;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets the timeline cursor position.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_settimelineposition">Studio::EventInstance::setTimelinePosition</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static Result TrySetTimelinePosition(this EventInstance eventInstance, int position) =>
|
|
PInvoke.EventInstanceSetTimelinePosition(eventInstance, position);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets the timeline cursor position.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_settimelineposition">Studio::EventInstance::setTimelinePosition</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void SetTimelinePosition(this EventInstance eventInstance, int position) =>
|
|
TrySetTimelinePosition(eventInstance, position).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the playback state.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_getplaybackstate">Studio::EventInstance::getPlaybackState</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TryGetPlaybackState(this EventInstance eventInstance, out PlaybackState state)
|
|
{
|
|
fixed (PlaybackState* statePtr = &state)
|
|
return PInvoke.EventInstanceGetPlaybackState(eventInstance, statePtr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the playback state.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_getplaybackstate">Studio::EventInstance::getPlaybackState</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static PlaybackState GetPlaybackState(this EventInstance eventInstance)
|
|
{
|
|
TryGetPlaybackState(eventInstance, out var state).Check();
|
|
return state;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the core ChannelGroup.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_getchannelgroup">Studio::EventInstance::getChannelGroup</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TryGetChannelGroup(this EventInstance eventInstance, out ChannelGroup group)
|
|
{
|
|
fixed (ChannelGroup* groupPtr = &group)
|
|
return PInvoke.EventInstanceGetChannelGroup(eventInstance, groupPtr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the core ChannelGroup.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_getchannelgroup">Studio::EventInstance::getChannelGroup</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static ChannelGroup GetChannelGroup(this EventInstance eventInstance)
|
|
{
|
|
TryGetChannelGroup(eventInstance, out var group).Check();
|
|
return group;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the minimum and maximum distances for 3D attenuation.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_getminmaxdistance">Studio::EventInstance::getMinMaxDistance</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TryGetMinMaxDistance(this EventInstance eventInstance, out float min, out float max)
|
|
{
|
|
fixed (float* minPtr = &min)
|
|
fixed (float* maxPtr = &max)
|
|
return PInvoke.EventInstanceGetMinMaxDistance(eventInstance, minPtr, maxPtr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the minimum and maximum distances for 3D attenuation.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_getminmaxdistance">Studio::EventInstance::getMinMaxDistance</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void GetMinMaxDistance(this EventInstance eventInstance, out float min, out float max) =>
|
|
TryGetMinMaxDistance(eventInstance, out min, out max).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Marks the event instance for release.
|
|
/// </para>
|
|
/// <para>
|
|
/// 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).
|
|
/// </para>
|
|
/// <para>
|
|
/// 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
|
|
/// <c>release()</c>, however if the sound has stopped <c>ERR_INVALID_HANDLE</c> will be returned.
|
|
/// </para>
|
|
/// <para>
|
|
/// <b>See Also:</b> Studio::EventInstance::stop, Studio::EventInstance::getPlaybackState
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_release">Studio::EventInstance::release</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static Result TryRelease(this EventInstance eventInstance) =>
|
|
PInvoke.EventInstanceRelease(eventInstance);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Marks the event instance for release.
|
|
/// </para>
|
|
/// <para>
|
|
/// 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).
|
|
/// </para>
|
|
/// <para>
|
|
/// 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
|
|
/// <c>release()</c>, however if the sound has stopped <c>ERR_INVALID_HANDLE</c> will be returned.
|
|
/// </para>
|
|
/// <para>
|
|
/// <b>See Also:</b> Studio::EventInstance::stop, Studio::EventInstance::getPlaybackState
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_release">Studio::EventInstance::release</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void Release(this EventInstance eventInstance) => TryRelease(eventInstance).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the virtualization state.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_isvirtual">Studio::EventInstance::isVirtual</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TryIsVirtual(this EventInstance eventInstance, out Bool32 virtualState)
|
|
{
|
|
fixed (Bool32* virtualStatePtr = &virtualState)
|
|
return PInvoke.EventInstanceIsVirtual(eventInstance, virtualStatePtr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the virtualization state.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_isvirtual">Studio::EventInstance::isVirtual</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static Bool32 IsVirtual(this EventInstance eventInstance)
|
|
{
|
|
TryIsVirtual(eventInstance, out var virtualState).Check();
|
|
return virtualState;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves a parameter value by name, including the path if needed.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_getparameterbyname">Studio::EventInstance::getParameterByName</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TryGetParameterByName(
|
|
this EventInstance eventInstance,
|
|
RefString8 name,
|
|
out float value,
|
|
out float finalValue
|
|
)
|
|
{
|
|
fixed (byte* namePtr = name)
|
|
fixed (float* valuePtr = &value)
|
|
fixed (float* finalValuePtr = &finalValue)
|
|
return PInvoke.EventInstanceGetParameterByName(eventInstance, namePtr, valuePtr, finalValuePtr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves a parameter value by name, including the path if needed.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_getparameterbyname">Studio::EventInstance::getParameterByName</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void GetParameterByName(
|
|
this EventInstance eventInstance,
|
|
RefString8 name,
|
|
out float value,
|
|
out float finalValue
|
|
) => TryGetParameterByName(eventInstance, name, out value, out finalValue).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets a parameter value by name, including the path if needed.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_setparameterbyname">Studio::EventInstance::setParameterByName</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TrySetParameterByName(
|
|
this EventInstance eventInstance,
|
|
RefString8 name,
|
|
float value,
|
|
Bool32 ignoreSeekSpeed
|
|
)
|
|
{
|
|
fixed (byte* namePtr = name)
|
|
return PInvoke.EventInstanceSetParameterByName(eventInstance, namePtr, value, ignoreSeekSpeed);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets a parameter value by name, including the path if needed.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_setparameterbyname">Studio::EventInstance::setParameterByName</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void SetParameterByName(
|
|
this EventInstance eventInstance,
|
|
RefString8 name,
|
|
float value,
|
|
Bool32 ignoreSeekSpeed
|
|
) => TrySetParameterByName(eventInstance, name, value, ignoreSeekSpeed).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets a parameter value by name, including the path if needed, looking up the value label.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_setparameterbynamewithlabel">Studio::EventInstance::setParameterByNameWithLabel</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TrySetParameterByNameWithLabel(
|
|
this EventInstance eventInstance,
|
|
RefString8 name,
|
|
RefString8 label,
|
|
Bool32 ignoreSeekSpeed
|
|
)
|
|
{
|
|
fixed (byte* namePtr = name)
|
|
fixed (byte* labelPtr = label)
|
|
return PInvoke.EventInstanceSetParameterByNameWithLabel(
|
|
eventInstance,
|
|
namePtr,
|
|
labelPtr,
|
|
ignoreSeekSpeed
|
|
);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets a parameter value by name, including the path if needed, looking up the value label.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_setparameterbynamewithlabel">Studio::EventInstance::setParameterByNameWithLabel</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void SetParameterByNameWithLabel(
|
|
this EventInstance eventInstance,
|
|
RefString8 name,
|
|
RefString8 label,
|
|
Bool32 ignoreSeekSpeed
|
|
) => TrySetParameterByNameWithLabel(eventInstance, name, label, ignoreSeekSpeed).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves a parameter value by unique identifier.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_getparameterbyid">Studio::EventInstance::getParameterByID</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TryGetParameterById(
|
|
this EventInstance eventInstance,
|
|
ParameterId id,
|
|
out float value,
|
|
out float finalValue
|
|
)
|
|
{
|
|
fixed (float* valuePtr = &value)
|
|
fixed (float* finalValuePtr = &finalValue)
|
|
return PInvoke.EventInstanceGetParameterById(eventInstance, id, valuePtr, finalValuePtr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves a parameter value by unique identifier.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_getparameterbyid">Studio::EventInstance::getParameterByID</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void GetParameterById(
|
|
this EventInstance eventInstance,
|
|
ParameterId id,
|
|
out float value,
|
|
out float finalValue
|
|
) => TryGetParameterById(eventInstance, id, out value, out finalValue).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets a parameter value by unique identifier.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_setparameterbyid">Studio::EventInstance::setParameterByID</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static Result TrySetParameterById(
|
|
this EventInstance eventInstance,
|
|
ParameterId id,
|
|
float value,
|
|
Bool32 ignoreSeekSpeed
|
|
) => PInvoke.EventInstanceSetParameterById(eventInstance, id, value, ignoreSeekSpeed);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets a parameter value by unique identifier.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_setparameterbyid">Studio::EventInstance::setParameterByID</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void SetParameterById(
|
|
this EventInstance eventInstance,
|
|
ParameterId id,
|
|
float value,
|
|
Bool32 ignoreSeekSpeed
|
|
) => TrySetParameterById(eventInstance, id, value, ignoreSeekSpeed).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets a parameter value by unique identifier, looking up the value label.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_setparameterbyidwithlabel">Studio::EventInstance::setParameterByIDWithLabel</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TrySetParameterByIdWithLabel(
|
|
this EventInstance eventInstance,
|
|
ParameterId id,
|
|
RefString8 label,
|
|
Bool32 ignoreSeekSpeed
|
|
)
|
|
{
|
|
fixed (byte* labelPtr = label)
|
|
return PInvoke.EventInstanceSetParameterByIdWithLabel(eventInstance, id, labelPtr, ignoreSeekSpeed);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets a parameter value by unique identifier, looking up the value label.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_setparameterbyidwithlabel">Studio::EventInstance::setParameterByIDWithLabel</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void SetParameterByIdWithLabel(
|
|
this EventInstance eventInstance,
|
|
ParameterId id,
|
|
RefString8 label,
|
|
Bool32 ignoreSeekSpeed
|
|
) => TrySetParameterByIdWithLabel(eventInstance, id, label, ignoreSeekSpeed).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets multiple parameter values by unique identifier.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_setparametersbyids">Studio::EventInstance::setParametersByIDs</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TrySetParametersByIDs(
|
|
this EventInstance eventInstance,
|
|
ParameterId* ids,
|
|
float* values,
|
|
int count,
|
|
Bool32 ignoreSeekSpeed
|
|
) => PInvoke.EventInstanceSetParametersByIDs(eventInstance, ids, values, count, ignoreSeekSpeed);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets multiple parameter values by unique identifier.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_setparametersbyids">Studio::EventInstance::setParametersByIDs</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe void SetParametersByIDs(
|
|
this EventInstance eventInstance,
|
|
ParameterId* ids,
|
|
float* values,
|
|
int count,
|
|
Bool32 ignoreSeekSpeed
|
|
) => TrySetParametersByIDs(eventInstance, ids, values, count, ignoreSeekSpeed).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Allow an event to continue past a sustain point.
|
|
/// </para>
|
|
/// <para>
|
|
/// 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.
|
|
/// </para>
|
|
/// <para>
|
|
/// This function returns FMOD_ERR_EVENT_NOTFOUND if the event has no sustain points.
|
|
/// </para>
|
|
/// <para>
|
|
/// <b>See Also:</b> Studio::EventDescription::hasSustainPoint
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_keyoff">Studio::EventInstance::keyOff</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static Result TryKeyOff(this EventInstance eventInstance) => PInvoke.EventInstanceKeyOff(eventInstance);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Allow an event to continue past a sustain point.
|
|
/// </para>
|
|
/// <para>
|
|
/// 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.
|
|
/// </para>
|
|
/// <para>
|
|
/// This function returns FMOD_ERR_EVENT_NOTFOUND if the event has no sustain points.
|
|
/// </para>
|
|
/// <para>
|
|
/// <b>See Also:</b> Studio::EventDescription::hasSustainPoint
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_keyoff">Studio::EventInstance::keyOff</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void KeyOff(this EventInstance eventInstance) => TryKeyOff(eventInstance).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets the user callback.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_setcallback">Studio::EventInstance::setCallback</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static Result TrySetCallback(
|
|
this EventInstance eventInstance,
|
|
EventCallbackPtr callback,
|
|
EventCallbackType callbackMask
|
|
) => PInvoke.EventInstanceSetCallback(eventInstance, callback, callbackMask);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets the user callback.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_setcallback">Studio::EventInstance::setCallback</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void SetCallback(
|
|
this EventInstance eventInstance,
|
|
EventCallbackPtr callback,
|
|
EventCallbackType callbackMask
|
|
) => TrySetCallback(eventInstance, callback, callbackMask).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the event instance user data.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_getuserdata">Studio::EventInstance::getUserData</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TryGetUserData(this EventInstance eventInstance, out nint userData)
|
|
{
|
|
fixed (nint* userDataPtr = &userData)
|
|
return PInvoke.EventInstanceGetUserData(eventInstance, userDataPtr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the event instance user data.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_getuserdata">Studio::EventInstance::getUserData</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static nint GetUserData(this EventInstance eventInstance)
|
|
{
|
|
TryGetUserData(eventInstance, out var userData).Check();
|
|
return userData;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets the event instance user data.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_setuserdata">Studio::EventInstance::setUserData</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static Result TrySetUserData(this EventInstance eventInstance, nint userData) =>
|
|
PInvoke.EventInstanceSetUserData(eventInstance, userData);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets the event instance user data.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_setuserdata">Studio::EventInstance::setUserData</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void SetUserData(this EventInstance eventInstance, nint userData) =>
|
|
TrySetUserData(eventInstance, userData).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the event CPU usage data.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_getcpuusage">Studio::EventInstance::getCPUUsage</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TryGetCpuUsage(
|
|
this EventInstance eventInstance,
|
|
out uint exclusive,
|
|
out uint inclusive
|
|
)
|
|
{
|
|
fixed (uint* exclusivePtr = &exclusive)
|
|
fixed (uint* inclusivePtr = &inclusive)
|
|
return PInvoke.EventInstanceGetCpuUsage(eventInstance, exclusivePtr, inclusivePtr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the event CPU usage data.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_getcpuusage">Studio::EventInstance::getCPUUsage</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void GetCpuUsage(this EventInstance eventInstance, out uint exclusive, out uint inclusive) =>
|
|
TryGetCpuUsage(eventInstance, out exclusive, out inclusive).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves memory usage statistics.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_getmemoryusage">Studio::EventInstance::getMemoryUsage</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TryGetMemoryUsage(this EventInstance eventInstance, out MemoryUsage memoryUsage)
|
|
{
|
|
fixed (MemoryUsage* memoryUsagePtr = &memoryUsage)
|
|
return PInvoke.EventInstanceGetMemoryUsage(eventInstance, memoryUsagePtr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves memory usage statistics.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-eventinstance.html#studio_eventinstance_getmemoryusage">Studio::EventInstance::getMemoryUsage</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static MemoryUsage GetMemoryUsage(this EventInstance eventInstance)
|
|
{
|
|
TryGetMemoryUsage(eventInstance, out var memoryUsage).Check();
|
|
return memoryUsage;
|
|
}
|
|
}
|
|
}
|