#[repr(transparent)]
pub struct BorrowedPcmSource(_);
Expand description

Borrowed (reference-only) PCM source.

Implementations

Creates a medium-level representation from the given low-level reference.

Creates a mutable medium-level representation from the given low-level reference.

Returns the pointer to this source.

Duplicates this source.

Returns if this source is available.

If called with false, closes files etc.

Grants temporary access to the type of this source.

This type should not be empty but if a third-party source provider doesn’t get it right, this can still happen. An empty string is also used as fallback if the third-party source returns a null pointer.

Returns the type of this source.

Safety

Returned string’s lifetime is unbounded.

Grants temporary access to the file of this source.

None is a valid result. In that case it’s not purely a file. Takes care of converting an empty path to None.

Returns the file of this source.

None is a valid result. In that case it’s not purely a file. Takes care of converting an empty path to None.

Safety

Returned string’s lifetime is unbounded.

Returns true if supported. Only call when offline.

Returns the parent source, if any.

Returns number of channels.

Returns preferred sample rate. If None then it is assumed to be silent (or MIDI).

Returns the length of this source.

Errors

Returns an error if this source doesn’t return a valid duration.

Returns length in beats if supported.

Returns bits/sample, if available. Only used for metadata purposes, since everything returns as doubles anyway.

Returns None if not supported.

Unstable!!!

Safety

REAPER can crash if you pass an invalid pointer.

Unstable!!!

Safety

API still unstable.

Unstable!!!

Safety

API still unstable.

Unstable!!!

Safety

API still unstable.

Unstable!!!

Safety

API still unstable.

Builds peaks for files.

Returns true if building is opened, otherwise it may mean building isn’t necessary.

Returns true if building should continue.

Call when done.

Safety

REAPER can crash if you pass invalid pointers.

Unstable!!!

If this source represents pooled MIDI data, this will return information about it.

Errors

Returns an error if not supported.

Writes the content of this source to the given file.

Only currently supported by MIDI but in theory any source could support this.

Errors

Returns an error if not supported.

Unpools the MIDI in this source.

Errors

Returns an error if not supported.

Sets the preview tempo for this source.

This will make the source ignore the project tempo.

Setting None will reset IGNTEMPO in REAPER versions >= v6.56+dev0425 or so.

Errors

Returns an error if not supported.

Opens the editor for this source.

Errors

Returns an error if not supported.

Safety

REAPER can crash if you pass an invalid window.

Trait Implementations

Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Immutably borrows from an owned value. Read more
Formats the value using the given formatter. Read more
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. 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
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. 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.