Struct fmod::studio::CommandReplay
source · pub struct CommandReplay { /* private fields */ }Implementations§
source§impl CommandReplay
impl CommandReplay
pub fn set_userdata(&self, userdata: Userdata) -> Result<()>
pub fn get_userdata(&self) -> Result<Option<Userdata>>
source§impl CommandReplay
impl CommandReplay
pub fn set_raw_userdata(&self, userdata: *mut c_void) -> Result<()>
pub fn get_raw_userdata(&self) -> Result<*mut c_void>
pub fn set_create_instance_callback<C: CreateInstanceCallback>( &self, ) -> Result<()>
pub fn set_frame_callback<C: FrameCallback>(&self) -> Result<()>
pub fn set_load_bank_callback<C: LoadBankCallback>(&self) -> Result<()>
source§impl CommandReplay
impl CommandReplay
sourcepub fn start(&self) -> Result<()>
pub fn start(&self) -> Result<()>
Begins playback.
If the replay is already running then calling this function will restart replay from the beginning.
sourcepub fn stop(&self) -> Result<()>
pub fn stop(&self) -> Result<()>
Stops playback.
If the [CommandReplayFlags::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.
sourcepub fn get_current_command(&self) -> Result<(c_int, c_float)>
pub fn get_current_command(&self) -> Result<(c_int, c_float)>
Retrieves the progress through the command replay.
If this function is called before CommandReplay::start then both tuple fields will be 0.
If this function is called after CommandReplay::stop then the index and time of the last command which was replayed will be returned.
sourcepub fn get_playback_state(&self) -> Result<PlaybackState>
pub fn get_playback_state(&self) -> Result<PlaybackState>
Retrieves the playback state.
sourcepub fn set_paused(&self, paused: bool) -> Result<()>
pub fn set_paused(&self, paused: bool) -> Result<()>
Sets the paused state.
sourcepub fn get_paused(&self) -> Result<bool>
pub fn get_paused(&self) -> Result<bool>
Retrieves the paused state.
sourcepub fn seek_to_command(&self, index: c_int) -> Result<()>
pub fn seek_to_command(&self, index: c_int) -> Result<()>
Seeks the playback position to a command.
sourcepub fn seek_to_time(&self, time: c_float) -> Result<()>
pub fn seek_to_time(&self, time: c_float) -> Result<()>
Seeks the playback position to a time.
This function moves the playback position to the the first command at or after time.
If no command exists at or after time then FMOD_RESULT::FMOD_ERR_EVENT_NOTFOUND is returned.
source§impl CommandReplay
impl CommandReplay
sourcepub fn set_bank_path(&self, path: &Utf8CStr) -> Result<()>
pub fn set_bank_path(&self, path: &Utf8CStr) -> Result<()>
Sets a path substition that will be used when loading banks with this replay.
System::load_bank_file commands in the replay are redirected to load banks from the specified directory, instead of using the directory recorded in the captured commands.
sourcepub fn command_at_time(&self, time: c_float) -> Result<c_int>
pub fn command_at_time(&self, time: c_float) -> Result<c_int>
Retrieves the command index corresponding to the given playback time.
This function will return an index for the first command at or after time.
If time is greater than the total playback time then FMOD_RESULT::FMOD_ERR_EVENT_NOTFOUND is returned.
sourcepub fn get_command_count(&self) -> Result<c_int>
pub fn get_command_count(&self) -> Result<c_int>
Retrieves the number of commands in the replay.
sourcepub fn get_command_info(&self, index: c_int) -> Result<CommandInfo>
pub fn get_command_info(&self, index: c_int) -> Result<CommandInfo>
Retrieves command information.
sourcepub fn get_command_string(&self, index: c_int) -> Result<Utf8CString>
pub fn get_command_string(&self, index: c_int) -> Result<Utf8CString>
Retrieves the string representation of a command.
sourcepub fn get_length(&self) -> Result<c_float>
pub fn get_length(&self) -> Result<c_float>
Retrieves the total playback time.
sourcepub fn get_system(&self) -> Result<System>
pub fn get_system(&self) -> Result<System>
Retrieves the Studio System object associated with this replay object.
sourcepub fn is_valid(&self) -> bool
pub fn is_valid(&self) -> bool
Checks that the CommandReplay reference is valid.
Trait Implementations§
source§impl Clone for CommandReplay
impl Clone for CommandReplay
source§fn clone(&self) -> CommandReplay
fn clone(&self) -> CommandReplay
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for CommandReplay
impl Debug for CommandReplay
source§impl From<*mut FMOD_STUDIO_COMMANDREPLAY> for CommandReplay
impl From<*mut FMOD_STUDIO_COMMANDREPLAY> for CommandReplay
source§fn from(inner: *mut FMOD_STUDIO_COMMANDREPLAY) -> Self
fn from(inner: *mut FMOD_STUDIO_COMMANDREPLAY) -> Self
source§impl From<CommandReplay> for *mut FMOD_STUDIO_COMMANDREPLAY
impl From<CommandReplay> for *mut FMOD_STUDIO_COMMANDREPLAY
source§fn from(value: CommandReplay) -> Self
fn from(value: CommandReplay) -> Self
source§impl Hash for CommandReplay
impl Hash for CommandReplay
source§impl PartialEq for CommandReplay
impl PartialEq for CommandReplay
source§fn eq(&self, other: &CommandReplay) -> bool
fn eq(&self, other: &CommandReplay) -> bool
self and other values to be equal, and is used
by ==.