pub struct Performer { /* private fields */ }Expand description
A Cmajor performer.
Implementations§
Source§impl Performer
impl Performer
Sourcepub fn set_block_size(&mut self, num_frames: u32)
pub fn set_block_size(&mut self, num_frames: u32)
Sets the block size of the performer.
Sourcepub fn endpoint_info<T>(&self, Endpoint: Endpoint<T>) -> Option<&EndpointInfo>where
T: EndpointType,
pub fn endpoint_info<T>(&self, Endpoint: Endpoint<T>) -> Option<&EndpointInfo>where
T: EndpointType,
Returns information about a given endpoint.
Sourcepub fn set<T>(
&mut self,
endpoint: Endpoint<InputValue<T>>,
value: T,
) -> T::Outputwhere
T: SetInputValue,
pub fn set<T>(
&mut self,
endpoint: Endpoint<InputValue<T>>,
value: T,
) -> T::Outputwhere
T: SetInputValue,
Set the value of an endpoint.
Sourcepub fn get<T>(&mut self, endpoint: Endpoint<OutputValue<T>>) -> T::Output<'_>where
T: GetOutputValue,
pub fn get<T>(&mut self, endpoint: Endpoint<OutputValue<T>>) -> T::Output<'_>where
T: GetOutputValue,
Get the value of an endpoint.
Sourcepub fn post<'a>(
&mut self,
endpoint: Endpoint<InputEvent>,
event: impl Into<ValueRef<'a>>,
) -> Result<(), EndpointError>
pub fn post<'a>( &mut self, endpoint: Endpoint<InputEvent>, event: impl Into<ValueRef<'a>>, ) -> Result<(), EndpointError>
Post an event to an endpoint.
Sourcepub fn fetch(
&mut self,
endpoint: Endpoint<OutputEvent>,
callback: impl FnMut(usize, ValueRef<'_>),
) -> Result<(), EndpointError>
pub fn fetch( &mut self, endpoint: Endpoint<OutputEvent>, callback: impl FnMut(usize, ValueRef<'_>), ) -> Result<(), EndpointError>
Fetch the events received from an endpoint.
Sourcepub fn read<T>(&self, endpoint: Endpoint<OutputStream<T>>, buffer: &mut [T])where
T: StreamType,
pub fn read<T>(&self, endpoint: Endpoint<OutputStream<T>>, buffer: &mut [T])where
T: StreamType,
Read frames from an input stream.
Sourcepub fn write<T>(&self, endpoint: Endpoint<InputStream<T>>, buffer: &[T])where
T: StreamType,
pub fn write<T>(&self, endpoint: Endpoint<InputStream<T>>, buffer: &[T])where
T: StreamType,
Write frames to an output stream.
Sourcepub fn get_max_block_size(&self) -> u32
pub fn get_max_block_size(&self) -> u32
Returns the maximum number of frames that can be processed in a single call to advance.
Sourcepub fn get_latency(&self) -> f64
pub fn get_latency(&self) -> f64
Returns the performers internal latency in frames.
Sourcepub fn get_string(&self, StringHandle: StringHandle) -> Option<&str>
pub fn get_string(&self, StringHandle: StringHandle) -> Option<&str>
Returns the string associated with a handle.
Auto Trait Implementations§
impl Freeze for Performer
impl RefUnwindSafe for Performer
impl Send for Performer
impl !Sync for Performer
impl Unpin for Performer
impl UnwindSafe for Performer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more