pub enum PulseError {
Show 45 variants
InvalidNoteName {
value: String,
},
InvalidMode {
value: String,
},
InvalidChordKind {
value: String,
},
InvalidTempo {
bpm: f32,
},
InvalidDuration {
duration: f32,
},
DurationCountMismatch {
notes: usize,
durations: usize,
},
InvalidChordVoiceCount {
count: usize,
},
InvalidSequenceOption {
option: String,
value: String,
},
InvalidInstrument {
value: String,
},
InvalidDrumType {
value: String,
},
InvalidRhythmPattern {
value: String,
},
InvalidMidiNote {
note: i64,
},
InvalidFrequency {
frequency: f32,
},
InvalidDrumGridSteps {
steps: usize,
},
InvalidStepDuration {
duration: f32,
},
InvalidDrumOption {
option: String,
value: String,
},
InvalidRepeatTimes {
repeat_times: usize,
},
MidiImportFailed {
message: String,
},
MidiExportFailed {
message: String,
},
InvalidExportPath {
path: PathBuf,
},
UnsupportedExportFormat {
format: String,
},
InvalidExportSampleRate {
sample_rate: u32,
},
InvalidExportNormalizeOption {
option: String,
value: String,
},
InvalidExportFlacBitsPerSample {
bits_per_sample: u32,
},
InvalidExportMidiOption {
option: String,
value: String,
},
ExportFailed {
message: String,
},
GpuFeatureNotEnabled,
PlaybackFailed {
message: String,
},
InvalidPlaybackRate {
rate: f32,
},
InvalidPlaybackVolume {
volume: f32,
},
InvalidPlaybackPan {
pan: f32,
},
InvalidGenerator {
name: String,
},
MissingGeneratorOption {
name: String,
},
InvalidGeneratorOption {
name: String,
value: String,
},
UnsupportedGeneratorOutput {
output: String,
},
InvalidEffect {
name: String,
},
InvalidEffectPreset {
effect: String,
preset: String,
},
InvalidEffectOption {
effect: String,
option: String,
value: String,
},
InvalidEffectScope {
effect: String,
scope: String,
},
InvalidSynth {
name: String,
},
InvalidSynthPreset {
synth: String,
preset: String,
},
InvalidSynthOption {
synth: String,
option: String,
value: String,
},
SampleLoadFailed {
message: String,
},
InvalidSampleOption {
option: String,
value: String,
},
InvalidMidiClipOption {
option: String,
value: String,
},
}Expand description
Domain errors surfaced by mlua-pulse before they are mapped to Lua errors.
Variants§
InvalidNoteName
A note name could not be parsed into an equal-tempered frequency.
InvalidMode
A scale or mode name is not in the supported theory catalog.
InvalidChordKind
A chord kind name is not in the supported theory catalog.
InvalidTempo
A song tempo is zero, negative, or not finite.
InvalidDuration
A note or sequence duration is zero, negative, or not finite.
DurationCountMismatch
A sequence has a different number of events and durations.
InvalidChordVoiceCount
A chord event contains no voices or too many voices for export.
InvalidSequenceOption
A sequence option such as volume, pan, velocity, or start offset is invalid.
InvalidInstrument
A Lua-facing instrument alias could not be resolved.
InvalidDrumType
A Lua-facing drum alias could not be resolved.
InvalidRhythmPattern
A named rhythm pattern is not registered.
InvalidMidiNote
A MIDI note number is outside the 0..=127 range.
InvalidFrequency
A frequency is zero, negative, or not finite.
InvalidDrumGridSteps
A drum grid was created with zero steps.
InvalidStepDuration
A drum grid step duration is zero, negative, or not finite.
InvalidDrumOption
A drum-grid mix or timing option is invalid.
InvalidRepeatTimes
A phrase repeat count is zero.
MidiImportFailed
tunes failed to import a MIDI file.
MidiExportFailed
tunes failed to export a MIDI file.
InvalidExportPath
An export path could not be represented as UTF-8 for tunes APIs.
UnsupportedExportFormat
The output extension is not one of the supported export formats.
InvalidExportSampleRate
A WAV/FLAC sample rate is zero.
InvalidExportNormalizeOption
A final loudness-normalization option is outside the supported range.
InvalidExportFlacBitsPerSample
A requested FLAC bit depth is unsupported by the direct encoder path.
InvalidExportMidiOption
A MIDI export loudness option is invalid.
ExportFailed
A WAV/FLAC export failed after validation.
GpuFeatureNotEnabled
GPU export was requested without enabling the crate’s gpu feature.
PlaybackFailed
The real-time playback engine reported an error.
InvalidPlaybackRate
A playback rate is zero, negative, or not finite.
InvalidPlaybackVolume
A playback volume is outside 0..=1.
InvalidPlaybackPan
A playback pan value is outside -1..=1.
InvalidGenerator
An algorithm generator name is not registered.
MissingGeneratorOption
A required generator option was not supplied.
InvalidGeneratorOption
A generator option has the wrong type or range.
UnsupportedGeneratorOutput
A generated value shape cannot be converted to Lua.
InvalidEffect
An effect name is not registered.
InvalidEffectPreset
An effect preset is not supported for the selected effect.
InvalidEffectOption
An effect option has the wrong type, range, or name.
Fields
InvalidEffectScope
An effect was placed on a scope where tunes cannot apply it.
InvalidSynth
A synthesis algorithm name is not registered.
InvalidSynthPreset
A synth preset is not supported for the selected algorithm.
InvalidSynthOption
A synth option has the wrong type, range, or name.
Fields
SampleLoadFailed
A sample file could not be loaded or transformed.
InvalidSampleOption
A sample clip option has the wrong range or shape.
InvalidMidiClipOption
A MIDI clip option has the wrong range or shape.
Trait Implementations§
Source§impl Debug for PulseError
impl Debug for PulseError
Source§impl Display for PulseError
impl Display for PulseError
Source§impl Error for PulseError
impl Error for PulseError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<PulseError> for Error
impl From<PulseError> for Error
Source§fn from(value: PulseError) -> Self
fn from(value: PulseError) -> Self
Auto Trait Implementations§
impl Freeze for PulseError
impl RefUnwindSafe for PulseError
impl Send for PulseError
impl Sync for PulseError
impl Unpin for PulseError
impl UnsafeUnpin for PulseError
impl UnwindSafe for PulseError
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
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
Source§impl<E> ExternalError for E
impl<E> ExternalError for E
fn into_lua_err(self) -> Error
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