Struct Bank

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

Implementations§

Source§

impl Bank

Source

pub fn get_id(&self) -> Result<Guid>

Retrieves the GUID.

Source

pub fn get_path(&self) -> Result<Utf8CString>

Retrieves the path.

Source

pub fn is_valid(&self) -> bool

Checks that the Bank reference is valid.

Source

pub fn set_raw_userdata(&self, userdata: *mut c_void) -> Result<()>

Source

pub fn get_raw_userdata(&self) -> Result<*mut c_void>

Source§

impl Bank

Source

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

Source

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

Source§

impl Bank

Source

pub fn get_loading_state(&self) -> Result<LoadingState>

This function may be used to check the loading state of a bank which has been loaded asynchronously using the [super::LoadBankFlags::NONBLOCKING] flag, or is pending unload following a call to Bank::unload.

If an asynchronous load failed due to a file error state will contain LoadingState::Error and the return code from this function will be the error code of the bank load function.

Source

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

Use this function to preload sample data ahead of time so that the events in the bank can play immediately when started.

This function is equivalent to calling [super::EventDescription::load_sample_data] for all events in the bank, including referenced events.

Source

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

Unloads non-streaming sample data for all events in the bank.

Sample data loading is reference counted and the sample data will remain loaded until unload requests corresponding to all load requests are made, or until the bank is unloaded.

Source

pub fn get_sample_loading_state(&self) -> Result<LoadingState>

Retrieves the loading state of the samples in the bank.

May be used for tracking the status of the Bank::load_sample_data operation.

If Bank::load_sample_data has not been called for the bank then this function will return LoadingState::Unloaded even though sample data may have been loaded by other API calls.

Source

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

Unloads the bank.

This will destroy all objects created from the bank, unload all sample data inside the bank, and invalidate all API handles referring to the bank.

If the bank was loaded from user-managed memory, e.g. by [super::System::load_bank_pointer], then the memory must not be freed until the unload has completed. Poll the loading state using Bank::get_loading_state or use the FMOD_STUDIO_SYSTEM_CALLBACK_BANK_UNLOAD system callback to determine when it is safe to free the memory.

Source§

impl Bank

Source

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

Retrieves the number of buses in the bank.

Source

pub fn get_bus_list(&self) -> Result<Vec<Bus>>

Retrieves a list of the buses in the bank.

Source

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

Retrives the number of event descriptions in the bank.

This function counts the events which were added to the bank by the sound designer. The bank may contain additional events which are referenced by event instruments but were not added to the bank, and those referenced events are not counted.

Source

pub fn get_event_list(&self) -> Result<Vec<EventDescription>>

Retrieves a list of the event descriptions in the bank.

This function counts the events which were added to the bank by the sound designer. The bank may contain additional events which are referenced by event instruments but were not added to the bank, and those referenced events are not counted.

Source

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

Retrieves the number of string table entries in the bank.

Source

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

Retrieves a string table entry.

May be used in conjunction with Bank::string_count to enumerate the string table in a bank.

Source

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

Retrieves the number of VCAs in the bank.

Source

pub fn get_vca_list(&self) -> Result<Vec<Vca>>

Retrieves a list of the VCAs in the bank.

Trait Implementations§

Source§

impl Clone for Bank

Source§

fn clone(&self) -> Bank

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 Bank

Source§

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

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

impl From<*mut FMOD_STUDIO_BANK> for Bank

Source§

fn from(value: *mut FMOD_STUDIO_BANK) -> Self

Converts to this type from the input type.
Source§

impl From<Bank> for *mut FMOD_STUDIO_BANK

Source§

fn from(value: Bank) -> Self

Converts to this type from the input type.
Source§

impl Hash for Bank

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 Bank

Source§

fn eq(&self, other: &Bank) -> 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 Bank

Source§

impl Eq for Bank

Source§

impl Send for Bank

Source§

impl StructuralPartialEq for Bank

Source§

impl Sync for Bank

Auto Trait Implementations§

§

impl Freeze for Bank

§

impl RefUnwindSafe for Bank

§

impl Unpin for Bank

§

impl UnwindSafe for Bank

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,