feat(audio): add 32-voice PCM mixing and native music sequencing
Add self-contained SoundBanks and MusicBanks with per-sample PCM16 and IMA ADPCM storage, materialized to resident PCM16. Integrate instrument envelopes, automation, shared DSP and host lifecycle controls while preserving staged real-time execution.
This commit is contained in:
@@ -69,13 +69,6 @@ pub(super) fn write_palettes(
|
||||
palettes[at / 16][at % 16] = Color::rgba(rgba[0], rgba[1], rgba[2], rgba[3]);
|
||||
}
|
||||
}
|
||||
pub(super) fn sound_rate(entry: &AssetEntry) -> Result<u32, String> {
|
||||
Ok(entry.metadata_as_sound_bank()?.sample_rate)
|
||||
}
|
||||
// Callers split on even chunk boundaries. Only the final odd byte is ignored.
|
||||
pub(super) fn append_pcm(data: &mut Vec<i16>, bytes: &[u8]) {
|
||||
data.extend(bytes.as_chunks::<2>().0.iter().map(|p| i16::from_le_bytes(*p)));
|
||||
}
|
||||
pub(super) fn payload_size(entry: &AssetEntry, actual: usize) -> Result<(), String> {
|
||||
if actual as u64 != entry.size {
|
||||
return Err("Invalid asset payload size".into());
|
||||
|
||||
Reference in New Issue
Block a user