FmodStudio

Struct FmodStudio 

Source
pub struct FmodStudio(pub Studio);
Expand description

A resource that wraps the Studio object from the FMOD library.

This struct provides convenient access to the FMOD Studio API within the Bevy ECS. It derives Deref and DerefMut to allow direct access to the inner Studio object.

Tuple Fields§

§0: Studio

Methods from Deref<Target = Studio>§

Source

pub fn as_mut_ptr(&self) -> *mut FMOD_STUDIO_SYSTEM

Source

pub fn is_valid(&self) -> bool

Source

pub fn set_advanced_settings( &self, settings: StudioAdvancedSettings, ) -> Result<(), Error>

Source

pub fn get_advanced_settings(&self) -> Result<StudioAdvancedSettings, Error>

Source

pub fn initialize( &self, maxchannels: i32, studioflags: impl Into<u32>, flags: impl Into<u32>, extradriverdata: Option<*mut c_void>, ) -> Result<(), Error>

Source

pub fn release(&self) -> Result<(), Error>

Source

pub fn update(&self) -> Result<(), Error>

Source

pub fn get_core_system(&self) -> Result<System, Error>

Source

pub fn get_event(&self, path_or_id: &str) -> Result<EventDescription, Error>

Source

pub fn get_bus(&self, path_or_id: &str) -> Result<Bus, Error>

Source

pub fn get_vca(&self, path_or_id: &str) -> Result<Vca, Error>

Source

pub fn get_bank(&self, path_or_id: &str) -> Result<Bank, Error>

Source

pub fn get_event_by_id(&self, id: Guid) -> Result<EventDescription, Error>

Source

pub fn get_bus_by_id(&self, id: Guid) -> Result<Bus, Error>

Source

pub fn get_vca_by_id(&self, id: Guid) -> Result<Vca, Error>

Source

pub fn get_bank_by_id(&self, id: Guid) -> Result<Bank, Error>

Source

pub fn get_sound_info(&self, key: &str) -> Result<SoundInfo, Error>

Source

pub fn get_parameter_description_by_name( &self, name: &str, ) -> Result<ParameterDescription, Error>

Source

pub fn get_parameter_description_by_id( &self, id: ParameterId, ) -> Result<ParameterDescription, Error>

Source

pub fn get_parameter_label_by_name( &self, name: &str, labelindex: i32, size: i32, ) -> Result<(String, i32), Error>

Source

pub fn get_parameter_label_by_id( &self, id: ParameterId, labelindex: i32, size: i32, ) -> Result<(String, i32), Error>

Source

pub fn get_parameter_by_id(&self, id: ParameterId) -> Result<(f32, f32), Error>

Source

pub fn set_parameter_by_id( &self, id: ParameterId, value: f32, ignoreseekspeed: bool, ) -> Result<(), Error>

Source

pub fn set_parameter_by_id_with_label( &self, id: ParameterId, label: &str, ignoreseekspeed: bool, ) -> Result<(), Error>

Source

pub fn set_parameters_by_i_ds( &self, ids: ParameterId, values: *mut f32, count: i32, ignoreseekspeed: bool, ) -> Result<(), Error>

Source

pub fn get_parameter_by_name(&self, name: &str) -> Result<(f32, f32), Error>

Source

pub fn set_parameter_by_name( &self, name: &str, value: f32, ignoreseekspeed: bool, ) -> Result<(), Error>

Source

pub fn set_parameter_by_name_with_label( &self, name: &str, label: &str, ignoreseekspeed: bool, ) -> Result<(), Error>

Source

pub fn lookup_id(&self, path: &str) -> Result<Guid, Error>

Source

pub fn lookup_path(&self, id: Guid) -> Result<String, Error>

Source

pub fn get_num_listeners(&self) -> Result<i32, Error>

Source

pub fn set_num_listeners(&self, numlisteners: i32) -> Result<(), Error>

Source

pub fn get_listener_attributes( &self, index: i32, ) -> Result<(Attributes3d, Vector), Error>

Source

pub fn set_listener_attributes( &self, index: i32, attributes: Attributes3d, attenuationposition: Option<Vector>, ) -> Result<(), Error>

Source

pub fn get_listener_weight(&self, index: i32) -> Result<f32, Error>

Source

pub fn set_listener_weight(&self, index: i32, weight: f32) -> Result<(), Error>

Source

pub fn load_bank_file( &self, filename: &str, flags: impl Into<u32>, ) -> Result<Bank, Error>

Source

pub fn load_bank_memory( &self, buffer: &[u8], flags: impl Into<u32>, ) -> Result<Bank, Error>

Source

pub fn load_bank_custom( &self, info: BankInfo, flags: impl Into<u32>, ) -> Result<Bank, Error>

Source

pub fn register_plugin(&self, description: DspDescription) -> Result<(), Error>

Source

pub fn unregister_plugin(&self, name: &str) -> Result<(), Error>

Source

pub fn unload_all(&self) -> Result<(), Error>

Source

pub fn flush_commands(&self) -> Result<(), Error>

Source

pub fn flush_sample_loading(&self) -> Result<(), Error>

Source

pub fn start_command_capture( &self, filename: &str, flags: impl Into<u32>, ) -> Result<(), Error>

Source

pub fn stop_command_capture(&self) -> Result<(), Error>

Source

pub fn load_command_replay( &self, filename: &str, flags: impl Into<u32>, ) -> Result<CommandReplay, Error>

Source

pub fn get_bank_count(&self) -> Result<i32, Error>

Source

pub fn get_bank_list(&self, capacity: i32) -> Result<Vec<Bank>, Error>

Source

pub fn get_parameter_description_count(&self) -> Result<i32, Error>

Source

pub fn get_parameter_description_list( &self, capacity: i32, ) -> Result<Vec<ParameterDescription>, Error>

Source

pub fn get_cpu_usage(&self) -> Result<(StudioCpuUsage, CpuUsage), Error>

Source

pub fn get_buffer_usage(&self) -> Result<BufferUsage, Error>

Source

pub fn reset_buffer_usage(&self) -> Result<(), Error>

Source

pub fn set_callback( &self, callback: Option<unsafe extern "C" fn(*mut FMOD_STUDIO_SYSTEM, u32, *mut c_void, *mut c_void) -> i32>, callbackmask: impl Into<u32>, ) -> Result<(), Error>

Source

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

Source

pub fn get_user_data(&self) -> Result<*mut c_void, Error>

Source

pub fn get_memory_usage(&self) -> Result<MemoryUsage, Error>

Trait Implementations§

Source§

impl Deref for FmodStudio

Source§

type Target = Studio

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl DerefMut for FmodStudio

Source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
Source§

impl Resource for FmodStudio
where Self: Send + Sync + 'static,

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> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Converts Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Converts Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Converts &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Converts &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> DowncastSend for T
where T: Any + Send,

Source§

fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>

Converts Box<Trait> (where Trait: DowncastSend) to Box<dyn Any + Send>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, W> HasTypeWitness<W> for T
where W: MakeTypeWitness<Arg = T>, T: ?Sized,

Source§

const WITNESS: W = W::MAKE

A constant of the type witness
Source§

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

Source§

const TYPE_EQ: TypeEq<T, <T as Identity>::Type> = TypeEq::NEW

Proof that Self is the same type as Self::Type, provides methods for casting between Self and Self::Type.
Source§

type Type = T

The same type as Self, used to emulate type equality bounds (T == U) with associated type equality constraints (T: Identity<Type = U>).
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> IntoResult<T> for T

Source§

fn into_result(self) -> Result<T, RunSystemError>

Converts this type into the system output type.
Source§

impl<A> Is for A
where A: Any,

Source§

fn is<T>() -> bool
where T: Any,

Checks if the current type “is” another type, using a TypeId equality comparison. This is most useful in the context of generic logic. Read more
Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
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> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ConditionalSend for T
where T: Send,

Source§

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

Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,