MCPcopy Create free account
hub / github.com/PerroEngine/Perro / as_options

Method as_options

perro_source/audio_stack/perro_pawdio/src/internal.rs:278–289  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

276
277 pub(crate) fn as_sound(&self) -> crate::midi::MidiSound {
278 match self {
279 Self::BuiltIn => crate::midi::MidiSound::BuiltIn,
280 Self::SoundFont(id) => crate::midi::MidiSound::SoundFont(*id),
281 }
282 }
283}
284
285impl OwnedMidiNoteOptions {
286 pub(crate) fn from_options(value: MidiNoteOptions) -> Self {
287 Self {
288 velocity: value.velocity,
289 sustain: value.sustain,
290 channel: value.channel,
291 program: value.program,
292 sound: OwnedMidiSound::from_sound(value.sound),

Callers 1

as_requestMethod · 0.45

Calls 1

as_soundMethod · 0.45

Tested by

no test coverage detected