Skip to main content

Module audio

Module audio 

Source
Expand description

AudioFlow — projects the ECS audio domain into a per-tick AudioView consumed by SpatialMixingLane.

Replaces the previous design where the lane queried World directly (and mutated AudioSource.state.cursor in place from the audio callback thread). Per CLAD, lanes consume Views from the LaneBus and write outputs into the OutputDeck — they do not query the World.

The matching audio_playback_writeback DataSystem (crate::ecs::systems::audio_playback_writeback, Maintenance phase) drains the writeback slot the lane wrote into and applies the new playback states back to the AudioSource components.

Structs§

AudioFlow
Audio domain Flow — read-only projection of the audio domain.
AudioPlaybackUpdate
Update emitted by SpatialMixingLane for a single source — applied back to its AudioSource component by the audio_playback_writeback DataSystem.
AudioPlaybackWriteback
Slot type written into OutputDeck by SpatialMixingLane. Drained in Maintenance by the audio_playback_writeback DataSystem.
AudioSourceSnapshot
Per-source snapshot fed to SpatialMixingLane::mix.
AudioView
View published by AudioFlow into the LaneBus. Carries the listener pose and a snapshot of every active AudioSource.