pub struct ChannelGroup { /* private fields */ }
Expand description
Represents a MIDI synthesizer within XSynth.
Manages multiple VoiceChannel objects at once. For info about MIDI CC
support, please see the documentation of the VoiceChannel
struct.
Implementations§
Source§impl ChannelGroup
impl ChannelGroup
Sourcepub fn new(config: ChannelGroupConfig) -> Self
pub fn new(config: ChannelGroupConfig) -> Self
Creates a new ChannelGroup with the given configuration.
See the ChannelGroupConfig
documentation for the available options.
Sourcepub fn send_event(&mut self, event: SynthEvent)
pub fn send_event(&mut self, event: SynthEvent)
Sends a SynthEvent to the ChannelGroup.
See the SynthEvent
documentation for more information.
Sourcepub fn voice_count(&self) -> u64
pub fn voice_count(&self) -> u64
Returns the active voice count of the synthesizer.
Trait Implementations§
Source§impl AudioPipe for ChannelGroup
impl AudioPipe for ChannelGroup
Source§fn stream_params(&self) -> &AudioStreamParams
fn stream_params(&self) -> &AudioStreamParams
The audio stream parameters of the audio pipe.
Source§fn read_samples_unchecked(&mut self, to: &mut [f32])
fn read_samples_unchecked(&mut self, to: &mut [f32])
Reads samples from the pipe without checking the channel count of the output.
Source§fn read_samples(&mut self, to: &mut [f32])
fn read_samples(&mut self, to: &mut [f32])
Reads samples from the pipe. Read more
Auto Trait Implementations§
impl Freeze for ChannelGroup
impl !RefUnwindSafe for ChannelGroup
impl Send for ChannelGroup
impl Sync for ChannelGroup
impl Unpin for ChannelGroup
impl !UnwindSafe for ChannelGroup
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more