//
// Generated by Brutal.Fmod.Generate; do not edit by hand.
#nullable enable
namespace Brutal.FmodApi.Studio
{
public static partial class FmodStudio
{
///
///
/// Checks that the CommandReplay reference is valid.
///
///
/// Studio::CommandReplay::isValid
///
///
public static Bool32 IsValid(this CommandReplay replay) => PInvoke.CommandReplayIsValid(replay);
///
///
/// Retrieves the Studio System object associated with this replay object.
///
///
/// Studio::CommandReplay::getSystem
///
///
public static unsafe Result TryGetSystem(this CommandReplay replay, out FmodStudioSystem system)
{
fixed (FmodStudioSystem* systemPtr = &system)
return PInvoke.CommandReplayGetSystem(replay, systemPtr);
}
///
///
/// Retrieves the Studio System object associated with this replay object.
///
///
/// Studio::CommandReplay::getSystem
///
///
public static FmodStudioSystem GetSystem(this CommandReplay replay)
{
TryGetSystem(replay, out var system).Check();
return system;
}
///
///
/// Retrieves the total playback time.
///
///
/// Studio::CommandReplay::getLength
///
///
public static unsafe Result TryGetLength(this CommandReplay replay, out float length)
{
fixed (float* lengthPtr = &length)
return PInvoke.CommandReplayGetLength(replay, lengthPtr);
}
///
///
/// Retrieves the total playback time.
///
///
/// Studio::CommandReplay::getLength
///
///
public static float GetLength(this CommandReplay replay)
{
TryGetLength(replay, out var length).Check();
return length;
}
///
///
/// Retrieves the number of commands in the replay.
///
///
/// Studio::CommandReplay::getCommandCount
///
///
public static unsafe Result TryGetCommandCount(this CommandReplay replay, out int count)
{
fixed (int* countPtr = &count)
return PInvoke.CommandReplayGetCommandCount(replay, countPtr);
}
///
///
/// Retrieves the number of commands in the replay.
///
///
/// Studio::CommandReplay::getCommandCount
///
///
public static int GetCommandCount(this CommandReplay replay)
{
TryGetCommandCount(replay, out var count).Check();
return count;
}
///
///
/// Retrieves command information.
///
///
/// Studio::CommandReplay::getCommandInfo
///
///
public static unsafe Result TryGetCommandInfo(this CommandReplay replay, int commandIndex, out CommandInfo info)
{
fixed (CommandInfo* infoPtr = &info)
return PInvoke.CommandReplayGetCommandInfo(replay, commandIndex, infoPtr);
}
///
///
/// Retrieves command information.
///
///
/// Studio::CommandReplay::getCommandInfo
///
///
public static CommandInfo GetCommandInfo(this CommandReplay replay, int commandIndex)
{
TryGetCommandInfo(replay, commandIndex, out var info).Check();
return info;
}
///
///
/// Retrieves the string representation of a command.
///
///
/// Studio::CommandReplay::getCommandString
///
///
public static unsafe Result TryGetCommandString(
this CommandReplay replay,
int commandIndex,
byte* buffer,
int length
) => PInvoke.CommandReplayGetCommandString(replay, commandIndex, buffer, length);
///
///
/// Retrieves the string representation of a command.
///
///
/// Studio::CommandReplay::getCommandString
///
///
public static unsafe void GetCommandString(
this CommandReplay replay,
int commandIndex,
byte* buffer,
int length
) => TryGetCommandString(replay, commandIndex, buffer, length).Check();
///
///
/// Retrieves the command index corresponding to the given playback time.
///
///
/// Studio::CommandReplay::getCommandAtTime
///
///
public static unsafe Result TryGetCommandAtTime(this CommandReplay replay, float time, out int commandIndex)
{
fixed (int* commandIndexPtr = &commandIndex)
return PInvoke.CommandReplayGetCommandAtTime(replay, time, commandIndexPtr);
}
///
///
/// Retrieves the command index corresponding to the given playback time.
///
///
/// Studio::CommandReplay::getCommandAtTime
///
///
public static int GetCommandAtTime(this CommandReplay replay, float time)
{
TryGetCommandAtTime(replay, time, out var commandIndex).Check();
return commandIndex;
}
///
///
/// Sets a path substition that will be used when loading banks with this replay.
///
///
/// Studio::CommandReplay::setBankPath
///
///
public static unsafe Result TrySetBankPath(this CommandReplay replay, RefString8 bankPath)
{
fixed (byte* bankPathPtr = bankPath)
return PInvoke.CommandReplaySetBankPath(replay, bankPathPtr);
}
///
///
/// Sets a path substition that will be used when loading banks with this replay.
///
///
/// Studio::CommandReplay::setBankPath
///
///
public static void SetBankPath(this CommandReplay replay, RefString8 bankPath) =>
TrySetBankPath(replay, bankPath).Check();
///
///
/// Begins playback.
///
///
/// If the replay is already running then calling this function will restart replay from the beginning.
///
///
/// See Also: Studio::CommandReplay::stop, Studio::CommandReplay::getPlaybackState
///
///
/// Studio::CommandReplay::start
///
///
public static Result TryStart(this CommandReplay replay) => PInvoke.CommandReplayStart(replay);
///
///
/// Begins playback.
///
///
/// If the replay is already running then calling this function will restart replay from the beginning.
///
///
/// See Also: Studio::CommandReplay::stop, Studio::CommandReplay::getPlaybackState
///
///
/// Studio::CommandReplay::start
///
///
public static void Start(this CommandReplay replay) => TryStart(replay).Check();
///
///
/// Stops playback.
///
///
/// If the FMOD_STUDIO_COMMANDREPLAY_SKIP_CLEANUP flag has been used then the system state is left as it was
/// at the end of the playback, otherwise all resources that were created as part of the replay will be
/// cleaned up.
///
///
/// See Also: Studio::CommandReplay::start, Studio::CommandReplay::getPlaybackState,
/// Studio::System::loadCommandReplay
///
///
/// Studio::CommandReplay::stop
///
///
public static Result TryStop(this CommandReplay replay) => PInvoke.CommandReplayStop(replay);
///
///
/// Stops playback.
///
///
/// If the FMOD_STUDIO_COMMANDREPLAY_SKIP_CLEANUP flag has been used then the system state is left as it was
/// at the end of the playback, otherwise all resources that were created as part of the replay will be
/// cleaned up.
///
///
/// See Also: Studio::CommandReplay::start, Studio::CommandReplay::getPlaybackState,
/// Studio::System::loadCommandReplay
///
///
/// Studio::CommandReplay::stop
///
///
public static void Stop(this CommandReplay replay) => TryStop(replay).Check();
///
///
/// Seeks the playback position to a time.
///
///
/// Studio::CommandReplay::seekToTime
///
///
public static Result TrySeekToTime(this CommandReplay replay, float time) =>
PInvoke.CommandReplaySeekToTime(replay, time);
///
///
/// Seeks the playback position to a time.
///
///
/// Studio::CommandReplay::seekToTime
///
///
public static void SeekToTime(this CommandReplay replay, float time) => TrySeekToTime(replay, time).Check();
///
///
/// Seeks the playback position to a command.
///
///
/// Studio::CommandReplay::seekToCommand
///
///
public static Result TrySeekToCommand(this CommandReplay replay, int commandIndex) =>
PInvoke.CommandReplaySeekToCommand(replay, commandIndex);
///
///
/// Seeks the playback position to a command.
///
///
/// Studio::CommandReplay::seekToCommand
///
///
public static void SeekToCommand(this CommandReplay replay, int commandIndex) =>
TrySeekToCommand(replay, commandIndex).Check();
///
///
/// Retrieves the paused state.
///
///
/// Studio::CommandReplay::getPaused
///
///
public static unsafe Result TryGetPaused(this CommandReplay replay, out Bool32 paused)
{
fixed (Bool32* pausedPtr = &paused)
return PInvoke.CommandReplayGetPaused(replay, pausedPtr);
}
///
///
/// Retrieves the paused state.
///
///
/// Studio::CommandReplay::getPaused
///
///
public static Bool32 GetPaused(this CommandReplay replay)
{
TryGetPaused(replay, out var paused).Check();
return paused;
}
///
///
/// Sets the paused state.
///
///
/// Studio::CommandReplay::setPaused
///
///
public static Result TrySetPaused(this CommandReplay replay, Bool32 paused) =>
PInvoke.CommandReplaySetPaused(replay, paused);
///
///
/// Sets the paused state.
///
///
/// Studio::CommandReplay::setPaused
///
///
public static void SetPaused(this CommandReplay replay, Bool32 paused) => TrySetPaused(replay, paused).Check();
///
///
/// Retrieves the playback state.
///
///
/// Studio::CommandReplay::getPlaybackState
///
///
public static unsafe Result TryGetPlaybackState(this CommandReplay replay, out PlaybackState state)
{
fixed (PlaybackState* statePtr = &state)
return PInvoke.CommandReplayGetPlaybackState(replay, statePtr);
}
///
///
/// Retrieves the playback state.
///
///
/// Studio::CommandReplay::getPlaybackState
///
///
public static PlaybackState GetPlaybackState(this CommandReplay replay)
{
TryGetPlaybackState(replay, out var state).Check();
return state;
}
///
///
/// Retrieves the progress through the command replay.
///
///
/// Studio::CommandReplay::getCurrentCommand
///
///
public static unsafe Result TryGetCurrentCommand(
this CommandReplay replay,
out int commandIndex,
out float currentTime
)
{
fixed (int* commandIndexPtr = &commandIndex)
fixed (float* currentTimePtr = ¤tTime)
return PInvoke.CommandReplayGetCurrentCommand(replay, commandIndexPtr, currentTimePtr);
}
///
///
/// Retrieves the progress through the command replay.
///
///
/// Studio::CommandReplay::getCurrentCommand
///
///
public static void GetCurrentCommand(this CommandReplay replay, out int commandIndex, out float currentTime) =>
TryGetCurrentCommand(replay, out commandIndex, out currentTime).Check();
///
///
/// Releases the command replay.
///
///
/// Studio::CommandReplay::release
///
///
public static Result TryRelease(this CommandReplay replay) => PInvoke.CommandReplayRelease(replay);
///
///
/// Releases the command replay.
///
///
/// Studio::CommandReplay::release
///
///
public static void Release(this CommandReplay replay) => TryRelease(replay).Check();
///
///
/// Sets a callback that is issued each time the replay reaches a new frame.
///
///
/// Studio::CommandReplay::setFrameCallback
///
///
public static Result TrySetFrameCallback(this CommandReplay replay, CommandReplayFrameCallbackPtr callback) =>
PInvoke.CommandReplaySetFrameCallback(replay, callback);
///
///
/// Sets a callback that is issued each time the replay reaches a new frame.
///
///
/// Studio::CommandReplay::setFrameCallback
///
///
public static void SetFrameCallback(this CommandReplay replay, CommandReplayFrameCallbackPtr callback) =>
TrySetFrameCallback(replay, callback).Check();
///
///
/// Sets the bank loading callback.
///
///
/// Studio::CommandReplay::setLoadBankCallback
///
///
public static Result TrySetLoadBankCallback(
this CommandReplay replay,
CommandReplayLoadBankCallbackPtr callback
) => PInvoke.CommandReplaySetLoadBankCallback(replay, callback);
///
///
/// Sets the bank loading callback.
///
///
/// Studio::CommandReplay::setLoadBankCallback
///
///
public static void SetLoadBankCallback(this CommandReplay replay, CommandReplayLoadBankCallbackPtr callback) =>
TrySetLoadBankCallback(replay, callback).Check();
///
///
/// Sets the create event instance callback.
///
///
/// Studio::CommandReplay::setCreateInstanceCallback
///
///
public static Result TrySetCreateInstanceCallback(
this CommandReplay replay,
CommandReplayCreateInstanceCallbackPtr callback
) => PInvoke.CommandReplaySetCreateInstanceCallback(replay, callback);
///
///
/// Sets the create event instance callback.
///
///
/// Studio::CommandReplay::setCreateInstanceCallback
///
///
public static void SetCreateInstanceCallback(
this CommandReplay replay,
CommandReplayCreateInstanceCallbackPtr callback
) => TrySetCreateInstanceCallback(replay, callback).Check();
///
///
/// Retrieves user data.
///
///
/// Studio::CommandReplay::getUserData
///
///
public static unsafe Result TryGetUserData(this CommandReplay replay, out nint userData)
{
fixed (nint* userDataPtr = &userData)
return PInvoke.CommandReplayGetUserData(replay, userDataPtr);
}
///
///
/// Retrieves user data.
///
///
/// Studio::CommandReplay::getUserData
///
///
public static nint GetUserData(this CommandReplay replay)
{
TryGetUserData(replay, out var userData).Check();
return userData;
}
///
///
/// Sets user data.
///
///
/// Studio::CommandReplay::setUserData
///
///
public static Result TrySetUserData(this CommandReplay replay, nint userData) =>
PInvoke.CommandReplaySetUserData(replay, userData);
///
///
/// Sets user data.
///
///
/// Studio::CommandReplay::setUserData
///
///
public static void SetUserData(this CommandReplay replay, nint userData) =>
TrySetUserData(replay, userData).Check();
}
}