mirror of
https://github.com/storytold/soundcraft.git
synced 2026-10-31 22:16:47 -06:00
Workspace for SoundCraft, a clean-room pure-Rust Pro Tools-class DAW: timebases and tempo maps, WAV/AIFF/FLAC/symphonia audio IO with peaks, SMF and MIDI ops, 26 original DSP plugins, the session model, the mix engine, ~180 registered commands with undo, a cpal player, and the agent rules (AGENTS.md, ATTRIBUTION.md). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
22 lines
640 B
Rust
22 lines
640 B
Rust
//! Typed ids. All ids come from one session-wide counter so they never collide across kinds.
|
|
|
|
macro_rules! id_type {
|
|
($name:ident) => {
|
|
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord, Default, serde::Serialize, serde::Deserialize)]
|
|
#[serde(transparent)]
|
|
pub struct $name(pub u64);
|
|
impl std::fmt::Display for $name {
|
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
|
write!(f, "{}", self.0)
|
|
}
|
|
}
|
|
};
|
|
}
|
|
|
|
id_type!(TrackId);
|
|
id_type!(ClipId);
|
|
id_type!(SourceId);
|
|
id_type!(BusId);
|
|
id_type!(GroupId);
|
|
id_type!(MarkerId);
|