aout: add multiple audio tracks playback support
Add multiple audio tracks playback support
Google Summer of Code 2023
Mentee: Ayush Dey
Mentor: Thomas Guillem
Description
Add support for playing multiple audio tracks simultaneously from a media on systems using PulseAudio as the sound server.
Issue: #27738
gsoc-audio-test-2
Work breakdown
- Modify the audio output (aout) module API to support multiple streams by splitting device and stream handling.
- Implement the aout API within the PulseAudio module.
- Adapt the core to conditionally handle device and stream splitting (i.e., stream handling for adapted aout modules and device handling for legacy aout modules).
- Enhance the Player API to provide users with greater control over multiple audio streams.
- Incorporate these modifications into the Qt/VLC-ports to create an optimal GUI for controlling multiple streams.
Current features
- Multiple audio track selection is disabled by default but can be enabled from the GUI, similar to subtitles.
- An infinite number of audio streams can be initiated from a single aout object.
- A single Play/Pause/Mute/Volume button controls all the tracks playing in parallel.
- The core will generate multiple streams from a single aout object for adapted modules and multiple aout objects for legacy modules.
Future work
- Adaptation of the remaining common aout modules (Wasapi, Auhal, AAudio, Pipewire, etc.).
- Individual Play/Pause/Mute/Volume buttons for each track.
Acknowledgement
I would like to thank the team at VideoLAN for their support and especially my mentor Thomas Guillem, who has guided me actively throughout the development of this feature.