Struct playdate::sound::player::fp::api::Cache

source ·
pub struct Cache(/* private fields */);
Expand description

Cached file player api end-point.

Stores one reference, so size on stack is eq usize.

All calls approximately costs ~1 deref.

Trait Implementations§

source§

impl Api for Cache

source§

fn new_player(&self) -> unsafe extern "C" fn() -> *mut FilePlayer

source§

fn free_player(&self) -> unsafe extern "C" fn(_: *mut FilePlayer)

source§

fn load_into_player( &self ) -> unsafe extern "C" fn(_: *mut FilePlayer, _: *const i8) -> i32

source§

fn set_buffer_length(&self) -> unsafe extern "C" fn(_: *mut FilePlayer, _: f32)

source§

fn play(&self) -> unsafe extern "C" fn(_: *mut FilePlayer, _: i32) -> i32

source§

fn is_playing(&self) -> unsafe extern "C" fn(_: *mut FilePlayer) -> i32

source§

fn stop(&self) -> unsafe extern "C" fn(_: *mut FilePlayer)

source§

fn set_volume(&self) -> unsafe extern "C" fn(_: *mut FilePlayer, _: f32, _: f32)

source§

fn get_volume( &self ) -> unsafe extern "C" fn(_: *mut FilePlayer, _: *mut f32, _: *mut f32)

source§

fn get_length(&self) -> unsafe extern "C" fn(_: *mut FilePlayer) -> f32

source§

fn set_offset(&self) -> unsafe extern "C" fn(_: *mut FilePlayer, _: f32)

source§

fn set_rate(&self) -> unsafe extern "C" fn(_: *mut FilePlayer, _: f32)

source§

fn set_loop_range( &self ) -> unsafe extern "C" fn(_: *mut FilePlayer, _: f32, _: f32)

source§

fn did_underrun(&self) -> unsafe extern "C" fn(_: *mut FilePlayer) -> i32

source§

fn set_stop_on_underrun( &self ) -> unsafe extern "C" fn(_: *mut FilePlayer, _: i32)

source§

fn set_finish_callback( &self ) -> unsafe extern "C" fn(_: *mut FilePlayer, _: Option<unsafe extern "C" fn(_: *mut SoundSource, _: *mut c_void)>, _: *mut c_void)

source§

fn set_loop_callback( &self ) -> unsafe extern "C" fn(_: *mut FilePlayer, _: Option<unsafe extern "C" fn(_: *mut SoundSource, _: *mut c_void)>, _: *mut c_void)

source§

fn get_offset(&self) -> unsafe extern "C" fn(_: *mut FilePlayer) -> f32

source§

fn get_rate(&self) -> unsafe extern "C" fn(_: *mut FilePlayer) -> f32

source§

fn fade_volume( &self ) -> unsafe extern "C" fn(_: *mut FilePlayer, _: f32, _: f32, _: i32, _: Option<unsafe extern "C" fn(_: *mut SoundSource, _: *mut c_void)>, _: *mut c_void)

source§

fn set_mp3_stream_source( &self ) -> unsafe extern "C" fn(_: *mut FilePlayer, _: Option<unsafe extern "C" fn(_: *mut u8, _: i32, _: *mut c_void) -> i32>, _: *mut c_void, _: f32)

source§

impl Clone for Cache

source§

fn clone(&self) -> Cache

Returns a copy of the value. Read more
1.0.0§

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

Performs copy-assignment from source. Read more
source§

impl Debug for Cache

source§

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

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

impl Default for Cache

source§

fn default() -> Cache

Returns the “default value” for a type. Read more
source§

impl From<&NonNull<playdate_sound_fileplayer>> for Cache

source§

fn from(ptr: &NonNull<playdate_sound_fileplayer>) -> Cache

Converts to this type from the input type.
source§

impl From<&'static playdate_sound_fileplayer> for Cache

source§

fn from(r: &'static playdate_sound_fileplayer) -> Cache

Converts to this type from the input type.
source§

impl From<*const playdate_sound_fileplayer> for Cache

source§

fn from(ptr: *const playdate_sound_fileplayer) -> Cache

Converts to this type from the input type.
source§

impl From<NonNull<playdate_sound_fileplayer>> for Cache

source§

fn from(ptr: NonNull<playdate_sound_fileplayer>) -> Cache

Converts to this type from the input type.
source§

impl Copy for Cache

Auto Trait Implementations§

§

impl Freeze for Cache

§

impl RefUnwindSafe for Cache

§

impl Send for Cache

§

impl Sync for Cache

§

impl Unpin for Cache

§

impl UnwindSafe for Cache

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

fn into(self) -> U

Calls U::from(self).

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

§

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

§

type Owned = T

The resulting type after obtaining ownership.
§

fn to_owned(&self) -> T

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

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

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

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

§

type Error = Infallible

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

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

Performs the conversion.
§

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

§

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

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

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

Performs the conversion.

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 4 bytes