Struct xsynth_render::XSynthRenderConfig
source · pub struct XSynthRenderConfig {
pub channel_init_options: ChannelInitOptions,
pub sf_init_options: SoundfontInitOptions,
pub channel_count: u32,
pub drums_channels: Vec<u32>,
pub use_threadpool: bool,
pub use_limiter: bool,
pub sample_rate: u32,
pub audio_channels: u16,
pub audio_format: XSynthRenderAudioFormat,
}
Expand description
Options for initializing a new XSynthRender object.
Fields§
§channel_init_options: ChannelInitOptions
Channel initialization options (same for all channels).
See the ChannelInitOptions
documentation for more information.
sf_init_options: SoundfontInitOptions
Soundfont initialization options (same for all soundfonts).
See the SoundfontInitOptions
documentation for more information.
channel_count: u32
Amount of VoiceChannel objects to be created (Number of MIDI channels)
Default: 16
drums_channels: Vec<u32>
A vector which specifies which of the created channels (indexes) will be used for drums. For example in a conventional 16 MIDI channel setup where channel 10 is used for drums, the vector would be set as [9] (counting from 0).
Default: [9]
use_threadpool: bool
Whether or not to use a threadpool to render individual keys’ voices. Regardless, each MIDI channel uses its own thread. This setting adds more fine-grained threading per key rather than per channel.
Default: true
use_limiter: bool
If set to true, the rendered audio will be limited to 0dB using
the VolumeLimiter
effect from core
to prevent clipping.
Default: true
sample_rate: u32
Audio output sample rate.
Default: 48000
audio_channels: u16
Audio output audio channels.
Default: 2
audio_format: XSynthRenderAudioFormat
Audio output format.
Default: Wav
Trait Implementations§
source§impl Clone for XSynthRenderConfig
impl Clone for XSynthRenderConfig
source§fn clone(&self) -> XSynthRenderConfig
fn clone(&self) -> XSynthRenderConfig
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl Freeze for XSynthRenderConfig
impl RefUnwindSafe for XSynthRenderConfig
impl Send for XSynthRenderConfig
impl Sync for XSynthRenderConfig
impl Unpin for XSynthRenderConfig
impl UnwindSafe for XSynthRenderConfig
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)