Struct CommandReplay

Source
pub struct CommandReplay { /* private fields */ }

Implementations§

Source§

impl CommandReplay

Source

pub fn set_userdata(&self, userdata: Userdata) -> Result<()>

Source

pub fn get_userdata(&self) -> Result<Option<Userdata>>

Source§

impl CommandReplay

Source§

impl CommandReplay

Source

pub fn release(self) -> Result<()>

Releases the command replay.

Source§

impl CommandReplay

Source

pub fn start(&self) -> Result<()>

Begins playback.

If the replay is already running then calling this function will restart replay from the beginning.

Source

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.

Source

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.

Source

pub fn get_playback_state(&self) -> Result<PlaybackState>

Retrieves the playback state.

Source

pub fn set_paused(&self, paused: bool) -> Result<()>

Sets the paused state.

Source

pub fn get_paused(&self) -> Result<bool>

Retrieves the paused state.

Source

pub fn seek_to_command(&self, index: c_int) -> Result<()>

Seeks the playback position to a command.

Source

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

Source

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.

Source

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.

Source

pub fn get_command_count(&self) -> Result<c_int>

Retrieves the number of commands in the replay.

Source

pub fn get_command_info(&self, index: c_int) -> Result<CommandInfo>

Retrieves command information.

Source

pub fn get_command_string(&self, index: c_int) -> Result<Utf8CString>

Retrieves the string representation of a command.

Source

pub fn get_length(&self) -> Result<c_float>

Retrieves the total playback time.

Source

pub fn get_system(&self) -> Result<System>

Retrieves the Studio System object associated with this replay object.

Source

pub fn is_valid(&self) -> bool

Checks that the CommandReplay reference is valid.

Trait Implementations§

Source§

impl Clone for CommandReplay

Source§

fn clone(&self) -> CommandReplay

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CommandReplay

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<*mut FMOD_STUDIO_COMMANDREPLAY> for CommandReplay

Source§

fn from(inner: *mut FMOD_STUDIO_COMMANDREPLAY) -> Self

Converts to this type from the input type.
Source§

impl From<CommandReplay> for *mut FMOD_STUDIO_COMMANDREPLAY

Source§

fn from(value: CommandReplay) -> Self

Converts to this type from the input type.
Source§

impl Hash for CommandReplay

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for CommandReplay

Source§

fn eq(&self, other: &CommandReplay) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for CommandReplay

Source§

impl Eq for CommandReplay

Source§

impl Send for CommandReplay

Source§

impl StructuralPartialEq for CommandReplay

Source§

impl Sync for CommandReplay

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Shareable for T
where T: Send + Sync + 'static,