Struct xsynth_render::XSynthRender
source · pub struct XSynthRender { /* private fields */ }
Expand description
Represents an XSynth MIDI synthesizer that renders a MIDI to a file.
Implementations§
source§impl XSynthRender
impl XSynthRender
sourcepub fn new(config: XSynthRenderConfig, out_path: PathBuf) -> Self
pub fn new(config: XSynthRenderConfig, out_path: PathBuf) -> Self
Initializes a new XSynthRender object with the given configuration and audio output path.
sourcepub fn get_params(&self) -> AudioStreamParams
pub fn get_params(&self) -> AudioStreamParams
Returns the parameters of the output audio.
sourcepub fn send_event(&mut self, event: SynthEvent)
pub fn send_event(&mut self, event: SynthEvent)
Sends a SynthEvent to the XSynthRender object. Please see the SynthEvent documentation for more information.
sourcepub fn render_batch(&mut self, event_time: f64)
pub fn render_batch(&mut self, event_time: f64)
Renders audio samples of the specified time to the audio output file.
The time should be the delta time of the last sent events.
sourcepub fn voice_count(&self) -> u64
pub fn voice_count(&self) -> u64
Returns the active voice count of the MIDI synthesizer.
Auto Trait Implementations§
impl Freeze for XSynthRender
impl !RefUnwindSafe for XSynthRender
impl Send for XSynthRender
impl Sync for XSynthRender
impl Unpin for XSynthRender
impl !UnwindSafe for XSynthRender
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