pub trait AudioMixingLane: Send + Sync {
// Required method
fn mix(
&self,
world: &mut World,
output_buffer: &mut [f32],
stream_info: &StreamInfo,
);
}Expand description
A trait defining the behavior of an audio mixing lane.
Required Methods§
Sourcefn mix(
&self,
world: &mut World,
output_buffer: &mut [f32],
stream_info: &StreamInfo,
)
fn mix( &self, world: &mut World, output_buffer: &mut [f32], stream_info: &StreamInfo, )
Mixes audio into the provided output buffer based on the current state of the ECS World.
§Arguments
world: A reference to the ECSWorldcontaining audio sources and their states.output_buffer: The buffer to write mixed audio samples into.stream_info: Information about the audio stream (e.g., sample rate, channels).