//! Multi-track song format with synthesized notes and audio file clips.
//!
//! Loads `.track` text files, schedules notes and audio clips on per-track
//! mixers, and plays them through a `SoundSystem`. Designed to be edited by
//! humans or AI and used as runtime audio in games.
//!
//! # Example
//! ```no_run
//! use game_audio::{SoundSystem, track::SongPlayer};
//!
//! let system = SoundSystem::new();
//! let mut player = SongPlayer::new();
//! player.play_path(&system, "song.track").unwrap();
//! ```
//!
//! Parsing, song data, synthesis ([`Note`]) and [`resolve_imports_with`] are
//! available on all targets; [`SongPlayer`], the filesystem [`resolve_imports`]
//! and export require a native target.

#[cfg(not(target_arch = "wasm32"))]
mod export;
mod format;
#[cfg(not(target_arch = "wasm32"))]
mod graph;
#[cfg(not(target_arch = "wasm32"))]
mod player;
mod serialize;
mod song;
mod synth;

#[cfg(all(not(target_arch = "wasm32"), feature = "export"))]
pub use export::{ExportError, export_mp3, export_wav};
pub use format::{ParseError, parse, parse_with_sounds, resolve_imports_with};
pub use song::{
    AudioClip, Compare, Condition, ConditionSource, Curve, Effect, Envelope, Harmonic, Import,
    Jump, Layer, Modulation, MotifInstance, MotifNote, Note, NoteOverride, Refresh, Slide, Song,
    Sound, TimeSignature, Trim, Tuning, UnknownSection, Waveform, is_audio_filename,
    pitch_to_frequency, pitch_to_frequency_in,
};
pub use synth::Voice;
#[cfg(not(target_arch = "wasm32"))]
pub use {
    export::render_song_stereo,
    format::resolve_imports,
    graph::SongGraph,
    player::{PlayerError, SongPlayer},
};
