Struct reaper_medium::PcmSourceTransfer
source · [−]#[repr(transparent)]pub struct PcmSourceTransfer(_);
Expand description
PCM source transfer.
Implementations
sourceimpl PcmSourceTransfer
impl PcmSourceTransfer
sourcepub fn as_ptr(&self) -> NonNull<PCM_source_transfer_t>
pub fn as_ptr(&self) -> NonNull<PCM_source_transfer_t>
Returns the pointer to this source transfer.
sourcepub fn time_s(&self) -> PositionInSeconds
pub fn time_s(&self) -> PositionInSeconds
Returns the start time of the block.
sourcepub fn set_time_s(&mut self, time: PositionInSeconds)
pub fn set_time_s(&mut self, time: PositionInSeconds)
Sets the start time of the block.
sourcepub fn absolute_time_s(&self) -> PositionInSeconds
pub fn absolute_time_s(&self) -> PositionInSeconds
Returns the absolute start time of the block.
sourcepub fn set_absolute_time_s(&mut self, time: PositionInSeconds)
pub fn set_absolute_time_s(&mut self, time: PositionInSeconds)
Sets the absolute start time of the block.
sourcepub fn samples_out(&self) -> i32
pub fn samples_out(&self) -> i32
Returns the number of sample(pair)s actually rendered.
sourcepub unsafe fn set_samples_out(&mut self, number: i32)
pub unsafe fn set_samples_out(&mut self, number: i32)
sourcepub unsafe fn set_length(&mut self, length: i32)
pub unsafe fn set_length(&mut self, length: i32)
sourcepub unsafe fn samples_as_slice(&self) -> &[f64]
pub unsafe fn samples_as_slice(&self) -> &[f64]
Returns the samples as read-only slice.
Safety
If the length or the samples are set incorrectly, this results in undefined behavior.
TODO-high-unstable
sourcepub unsafe fn samples_as_mut_slice(&mut self) -> &mut [f64]
pub unsafe fn samples_as_mut_slice(&mut self) -> &mut [f64]
Returns the samples as mutable slice.
Safety
If the length or the samples are set incorrectly, this results in undefined behavior.
TODO-high-unstable
sourcepub unsafe fn set_samples(&mut self, samples: *mut f64)
pub unsafe fn set_samples(&mut self, samples: *mut f64)
sourcepub fn sample_rate(&self) -> Hz
pub fn sample_rate(&self) -> Hz
Returns the desired output sample rate.
sourcepub fn set_sample_rate(&mut self, rate: Hz)
pub fn set_sample_rate(&mut self, rate: Hz)
Sets the desired output sample rate.
sourcepub fn midi_event_list_mut(&mut self) -> Option<&mut BorrowedMidiEventList>
pub fn midi_event_list_mut(&mut self) -> Option<&mut BorrowedMidiEventList>
Returns the list of MIDI events to be filled.
sourcepub fn set_midi_event_list(&mut self, list: &BorrowedMidiEventList)
pub fn set_midi_event_list(&mut self, list: &BorrowedMidiEventList)
Sets the list of MIDI events to be filled. TODO-high This is bad modeling. Passing a reference and saving it.
pub fn force_bpm(&self) -> Bpm
pub fn set_force_bpm(&mut self, force_bpm: Bpm)
Trait Implementations
sourceimpl Clone for PcmSourceTransfer
impl Clone for PcmSourceTransfer
sourcefn clone(&self) -> PcmSourceTransfer
fn clone(&self) -> PcmSourceTransfer
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl Debug for PcmSourceTransfer
impl Debug for PcmSourceTransfer
sourceimpl Default for PcmSourceTransfer
impl Default for PcmSourceTransfer
sourcefn default() -> PcmSourceTransfer
fn default() -> PcmSourceTransfer
sourceimpl PartialEq<PcmSourceTransfer> for PcmSourceTransfer
impl PartialEq<PcmSourceTransfer> for PcmSourceTransfer
sourcefn eq(&self, other: &PcmSourceTransfer) -> bool
fn eq(&self, other: &PcmSourceTransfer) -> bool
sourceimpl RefCast for PcmSourceTransfer
impl RefCast for PcmSourceTransfer
type From = PCM_source_transfer_t
fn ref_cast(_from: &Self::From) -> &Self
fn ref_cast_mut(_from: &mut Self::From) -> &mut Self
impl Copy for PcmSourceTransfer
impl StructuralPartialEq for PcmSourceTransfer
Auto Trait Implementations
impl RefUnwindSafe for PcmSourceTransfer
impl !Send for PcmSourceTransfer
impl !Sync for PcmSourceTransfer
impl Unpin for PcmSourceTransfer
impl UnwindSafe for PcmSourceTransfer
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
sourceimpl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
sourcefn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read moresourcefn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read moresourcefn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read moresourcefn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more