mod audio;
mod dispatcher;
mod link;
pub mod realtime;
pub mod sequencer;
mod timing;

pub use timing::{substeps_in_window, StepTiming, SyncTime};

pub use audio::{preload_sample_heads, AnalysisHandle, ScopeBuffer, SpectrumBuffer};

// Re-exported for the plugin crate (not used by the terminal binary).
#[allow(unused_imports)]
pub use audio::spawn_analysis_thread;

#[cfg(feature = "cli")]
pub use audio::{build_stream, AudioStreamConfig};
#[cfg(feature = "cli")]
#[allow(unused_imports)]
pub use audio::AudioStreamInfo;

pub use link::LinkState;
pub use sequencer::{
    spawn_sequencer, AudioCommand, MidiCommand, PatternChange, PatternSnapshot, SeqCommand,
    SequencerConfig, SequencerHandle, SequencerSnapshot, StepSnapshot,
};

// Re-exported for the plugin crate (not used by the terminal binary).
#[allow(unused_imports)]
pub use sequencer::{
    parse_midi_command, SequencerState, SharedSequencerState, TickInput, TickOutput,
    TimestampedCommand,
};
