From e91580c75b5e440c2d13caa16b4fd3a16ad273b6 Mon Sep 17 00:00:00 2001 From: ailurux Date: Mon, 23 Sep 2024 17:53:03 +1000 Subject: Implement VBR seeking based off TOC --- src/codecs/include/mad.hpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/codecs/include') diff --git a/src/codecs/include/mad.hpp b/src/codecs/include/mad.hpp index d1d0aac5..f45b5331 100644 --- a/src/codecs/include/mad.hpp +++ b/src/codecs/include/mad.hpp @@ -37,7 +37,15 @@ class MadMp3Decoder : public ICodec { private: auto SkipID3Tags(IStream& stream) -> void; - auto GetVbrLength(const mad_header& header) -> std::optional; + + struct VbrInfo { + uint32_t length; + std::optional bytes; + std::optional> toc; + }; + + auto GetVbrInfo(const mad_header& header) -> std::optional; + auto GetBytesUsed() -> std::size_t; std::shared_ptr input_; -- cgit v1.2.3