initial audio export

This commit is contained in:
Skyler Lehmkuhl
2025-12-03 17:54:15 -05:00
parent 2a7c26df57
commit 727d782190
21 changed files with 2657 additions and 78 deletions
+18
View File
@@ -13,6 +13,24 @@ pub struct WaveformPeak {
pub max: f32,
}
/// Uniquely identifies a waveform chunk
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct WaveformChunkKey {
pub pool_index: usize,
pub detail_level: u8, // 0-4
pub chunk_index: u32, // Sequential chunk number
}
/// A chunk of waveform data at a specific detail level
#[derive(Debug, Clone)]
pub struct WaveformChunk {
pub audio_pool_index: usize,
pub detail_level: u8, // 0-4 (overview to max detail)
pub chunk_index: u32, // Sequential chunk number
pub time_range: (f64, f64), // Start and end time in seconds
pub peaks: Vec<WaveformPeak>, // Variable length based on level
}
pub struct AudioFile {
pub data: Vec<f32>,
pub channels: u32,
+1 -1
View File
@@ -3,7 +3,7 @@ pub mod midi_file;
pub mod midi_input;
pub mod wav_writer;
pub use audio_file::{AudioFile, WaveformPeak};
pub use audio_file::{AudioFile, WaveformChunk, WaveformChunkKey, WaveformPeak};
pub use midi_file::load_midi_file;
pub use midi_input::MidiInputManager;
pub use wav_writer::WavWriter;