pub struct AudioAccessor<'a, T: KnowsProject, P: ProbablyMutable> { /* private fields */ }

Implementations

Get buffer of samples with given absolute project position in samples.

Returned buffer is Vec<f64> of length samples_per_channel * n_channels: values placed sample by sample for each channel in a turn. E.g. [spl1_ch1, spl1_ch2, spl1_ch3, spl2_ch1, spl2_ch2, spl3_ch3]

start is amount of samples since audio accessor start time.

You can look at the routing scheme to see where AudioAccessor is connected in case of track or take parenting: https://wiki.cockos.com/wiki/images/5/50/SWS_loudness_analysis_signal_flow_chart.png

Example from SWS: https://github.com/reaper-oss/sws/blob/bcc8fbc96f30a943bd04fb8030b4a03ea1ff7557/Breeder/BR_Loudness.cpp#L1020-L1079

note

Samples converted back to seconds as persized as possible, but I still afraid a bit of this function being sample-accurate.

Validates the current state of the audio accessor

– must ONLY call this from the main thread.

Returns true if the state changed.

Force the accessor to reload its state from the underlying track or media item take.

Trait Implementations

Formats the value using the given formatter. Read more
Executes the destructor for this type. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
Get underlying ReaperPointer.
Get underlying ReaperPointer with validity check.
Turn validity checks off.
Turn validity checks on.
State of validity checks.
Return ReaperError::NullPtr if check failed. Read more
Return ReaperError::NullPtr if check failed. Read more
Perform function with only one validity check. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Convert 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 more
Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read more
Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s. Read more
Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s. Read more

Returns the argument unchanged.

Calls U::from(self).

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

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