pub struct ExportOptions { /* private fields */ }Expand description
Options that control offline audio export.
Implementations§
Source§impl ExportOptions
impl ExportOptions
Sourcepub fn with_sample_rate(self, sample_rate: u32) -> PulseResult<Self>
pub fn with_sample_rate(self, sample_rate: u32) -> PulseResult<Self>
Sets an explicit output sample rate for WAV/FLAC exports.
Sourcepub fn with_peak_normalization(self, target_db: f32) -> PulseResult<Self>
pub fn with_peak_normalization(self, target_db: f32) -> PulseResult<Self>
Enables peak normalization for WAV/FLAC exports.
Sourcepub fn with_rms_normalization(
self,
target_db: f32,
peak_ceiling_db: f32,
) -> PulseResult<Self>
pub fn with_rms_normalization( self, target_db: f32, peak_ceiling_db: f32, ) -> PulseResult<Self>
Enables RMS normalization for WAV/FLAC exports.
Sourcepub fn with_normalization(self, normalize: NormalizeOptions) -> Self
pub fn with_normalization(self, normalize: NormalizeOptions) -> Self
Sets an already parsed normalization option.
Sourcepub fn with_flac_bits_per_sample(
self,
bits_per_sample: u32,
) -> PulseResult<Self>
pub fn with_flac_bits_per_sample( self, bits_per_sample: u32, ) -> PulseResult<Self>
Sets the FLAC bit depth used by the normalized/manual FLAC encoder path.
tunes handles the ordinary FLAC export path. When final loudness
normalization or an explicit FLAC bit depth is requested, mlua-pulse
renders the mixer into a stereo buffer and writes FLAC directly. This
option selects that direct encoder bit depth.
Sourcepub fn with_midi_velocity_gain(self, gain: f32) -> PulseResult<Self>
pub fn with_midi_velocity_gain(self, gain: f32) -> PulseResult<Self>
Scales melodic MIDI note velocities during MIDI export.
Sourcepub fn with_midi_min_velocity(self, min_velocity: f32) -> PulseResult<Self>
pub fn with_midi_min_velocity(self, min_velocity: f32) -> PulseResult<Self>
Sets a minimum non-zero MIDI note velocity during MIDI export.
Sourcepub fn sample_rate(self) -> Option<u32>
pub fn sample_rate(self) -> Option<u32>
Returns the requested output sample rate, if any.
Sourcepub fn normalize(self) -> Option<NormalizeOptions>
pub fn normalize(self) -> Option<NormalizeOptions>
Returns audio normalization options, if enabled.
Sourcepub fn flac_bits_per_sample(self) -> u32
pub fn flac_bits_per_sample(self) -> u32
Returns the requested normalized FLAC bit depth, or the default.
Sourcepub fn has_explicit_flac_bits_per_sample(self) -> bool
pub fn has_explicit_flac_bits_per_sample(self) -> bool
Returns whether the FLAC bit depth was explicitly selected.
Sourcepub fn midi_velocity_gain(self) -> f32
pub fn midi_velocity_gain(self) -> f32
Returns the MIDI velocity gain.
Sourcepub fn midi_min_velocity(self) -> Option<f32>
pub fn midi_min_velocity(self) -> Option<f32>
Returns the minimum non-zero MIDI velocity, if enabled.
Trait Implementations§
Source§impl Clone for ExportOptions
impl Clone for ExportOptions
Source§fn clone(&self) -> ExportOptions
fn clone(&self) -> ExportOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ExportOptions
Source§impl Debug for ExportOptions
impl Debug for ExportOptions
Source§impl Default for ExportOptions
impl Default for ExportOptions
Source§fn default() -> ExportOptions
fn default() -> ExportOptions
Source§impl PartialEq for ExportOptions
impl PartialEq for ExportOptions
Source§fn eq(&self, other: &ExportOptions) -> bool
fn eq(&self, other: &ExportOptions) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ExportOptions
Auto Trait Implementations§
impl Freeze for ExportOptions
impl RefUnwindSafe for ExportOptions
impl Send for ExportOptions
impl Sync for ExportOptions
impl Unpin for ExportOptions
impl UnsafeUnpin for ExportOptions
impl UnwindSafe for ExportOptions
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
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>
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>
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