Mixer
minispeaker.processor.mixer
master_mixer
python
def master_mixer(tracks: Dict[str,
Track], stopped: Event, paused: Callable[[],
bool],
muted: Callable[[], bool], volume: Callable[[], float],
dtype: DTypeLike) -> PlaybackCallbackGeneratorTypeAudio processor that merges multiple audio stream with master controls.
Arguments:
tracksDict[str, Track] - Multiple audio streams represented as a dictionary ofTracks.stoppedEvent - Whenmaster_mixershould end.pausedCallable[[], bool] - Whenpausedis evaluated toTrue, no audio streams will continue.mutedCallable[[], bool] - Whenmutedis evaluated toTrue, all audio streams will continue but will play no sound.volumeCallable[[], float] - Master volume.dtypeDTypeLike - SampleFormat equivalent of the underlying audio streams.
Returns:
PlaybackCallbackGeneratorType- A miniaudio compatible generator.
Yields:
Iterator[PlaybackCallbackGeneratorType]- Miniaudio compatible audio data.