From b65713624f57d4b8918a0f27dab5eccb401f5e5a Mon Sep 17 00:00:00 2001 From: Tom Kirchner Date: Sat, 11 Jan 2025 22:18:11 -0800 Subject: Skip gap samples in MP3 decoding --- src/codecs/include/mad.hpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/codecs/include') diff --git a/src/codecs/include/mad.hpp b/src/codecs/include/mad.hpp index fba3ef11..60a0b81c 100644 --- a/src/codecs/include/mad.hpp +++ b/src/codecs/include/mad.hpp @@ -56,7 +56,14 @@ class MadMp3Decoder : public ICodec { std::unique_ptr frame_; std::unique_ptr synth_; - int current_sample_; + // Count of samples processed in the current frame (channels combined) + int current_frame_sample_; + // Count of samples processed in the current stream (channels separate, i.e. usually x2) + int current_stream_sample_; + // How many samples in the current stream (channels separate) with encoder delay/padding removed + int total_samples_; + // Encoder delay, i.e. how many samples to skip at the start of the stream + int skip_samples_; bool is_eof_; bool is_eos_; }; -- cgit v1.2.3