Commit Graph

5 Commits

Author SHA1 Message Date
Zaggy1024
269f232e52 LibMedia: Correct the formula for converting u8 samples to float 2025-12-15 18:03:03 -06:00
Zaggy1024
fa3cda8e4a LibMedia: Set the AVCodecContext's sample rate and channel layout
This is required in order for our audio block output function to create
a sample specification for WAV files.
2025-12-15 18:03:03 -06:00
Zaggy1024
19ccec2c10 LibMedia: Create a channel map for audio blocks from decoders
Audio blocks now contain a sample specification with the sample rate
and channel map for the audio data they contain. This will facilitate
conversion from one sample specification to another in order to allow
playback on devices with more or less speakers than the audio data
contains.
2025-12-13 08:58:26 +01:00
Zaggy1024
0e9c746b48 LibMedia: Allow signalling of EOF to decoders
This is used by FFmpeg's H.264 decoder to determine when to output any
buffered frames after data runs out.
2025-11-05 18:40:02 +01:00
Zaggy1024
0ff330c906 LibMedia: Play audio through PlaybackManager using Providers/Sinks
This commit implements the functionality to play back audio through
PlaybackManager.

To decode the audio data, AudioDataProviders are created for each track
in the provided media data. These providers will fill their audio block
queue, then sit idle until their corresponding tracks are enabled.

In order to output the audio, one AudioMixingSink is created which
manages a PlaybackStream which requests audio blocks from multiple
AudioDataProviders and mixes them into one buffer with sample-perfect
precision.
2025-10-27 17:28:49 -07:00