Struct playdate_sys::ffi::playdate_sound_source
source · #[repr(C)]pub struct playdate_sound_source {
pub setVolume: Option<unsafe extern "C" fn(c: *mut SoundSource, lvol: c_float, rvol: c_float)>,
pub getVolume: Option<unsafe extern "C" fn(c: *mut SoundSource, outl: *mut c_float, outr: *mut c_float)>,
pub isPlaying: Option<unsafe extern "C" fn(c: *mut SoundSource) -> c_int>,
pub setFinishCallback: Option<unsafe extern "C" fn(c: *mut SoundSource, callback: sndCallbackProc, userdata: *mut c_void)>,
}
Fields§
§setVolume: Option<unsafe extern "C" fn(c: *mut SoundSource, lvol: c_float, rvol: c_float)>
void playdate->sound->source->setVolume(SoundSource* c, float lvol, float rvol)
Sets the playback volume (0.0 - 1.0) for left and right channels of the source.
getVolume: Option<unsafe extern "C" fn(c: *mut SoundSource, outl: *mut c_float, outr: *mut c_float)>
void playdate->sound->source->getVolume(SoundSource* c, float* outlvol, float* outrvol)
Gets the playback volume (0.0 - 1.0) for left and right channels of the source.
isPlaying: Option<unsafe extern "C" fn(c: *mut SoundSource) -> c_int>
int playdate->sound->source->isPlaying(SoundSource* c)
Returns 1 if the source is currently playing.
setFinishCallback: Option<unsafe extern "C" fn(c: *mut SoundSource, callback: sndCallbackProc, userdata: *mut c_void)>
Trait Implementations§
source§impl Clone for playdate_sound_source
impl Clone for playdate_sound_source
source§fn clone(&self) -> playdate_sound_source
fn clone(&self) -> playdate_sound_source
Returns a copy of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for playdate_sound_source
impl Debug for playdate_sound_source
source§impl Default for playdate_sound_source
impl Default for playdate_sound_source
source§fn default() -> playdate_sound_source
fn default() -> playdate_sound_source
Returns the “default value” for a type. Read more
source§impl Hash for playdate_sound_source
impl Hash for playdate_sound_source
source§impl Ord for playdate_sound_source
impl Ord for playdate_sound_source
source§impl PartialEq for playdate_sound_source
impl PartialEq for playdate_sound_source
source§fn eq(&self, other: &playdate_sound_source) -> bool
fn eq(&self, other: &playdate_sound_source) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for playdate_sound_source
impl PartialOrd for playdate_sound_source
impl Copy for playdate_sound_source
impl Eq for playdate_sound_source
impl StructuralPartialEq for playdate_sound_source
Auto Trait Implementations§
impl Freeze for playdate_sound_source
impl RefUnwindSafe for playdate_sound_source
impl Send for playdate_sound_source
impl Sync for playdate_sound_source
impl Unpin for playdate_sound_source
impl UnwindSafe for playdate_sound_source
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T, U> Into<U> for Twhere
U: From<T>,
impl<T, U> Into<U> for Twhere
U: From<T>,
§impl<T> ToOwned for Twhere
T: Clone,
impl<T> ToOwned for Twhere
T: Clone,
§impl<T, U> TryFrom<U> for Twhere
U: Into<T>,
impl<T, U> TryFrom<U> for Twhere
U: Into<T>,
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: 16 bytes