MCPcopy Create free account
hub / github.com/BillyDM/Firewheel / patch

Method patch

crates/firewheel-nodes/src/sampler.rs:610–617  ·  view source on GitHub ↗
(data: &ParamData, _path: &[u32])

Source from the content-addressed store, hash-verified

608
609 fn patch(data: &ParamData, _path: &[u32]) -> Result<Self::Patch, PatchError> {
610 match data {
611 ParamData::None => Ok(PlayFrom::Resume),
612 ParamData::F64(s) => Ok(PlayFrom::Seconds(*s)),
613 ParamData::U64(f) => Ok(PlayFrom::Frames(*f)),
614 _ => Err(PatchError::InvalidData),
615 }
616 }
617
618 fn apply(&mut self, value: Self::Patch) {
619 *self = value;
620 }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected