diff options
| author | ailurux <ailuruxx@gmail.com> | 2024-09-23 17:53:03 +1000 |
|---|---|---|
| committer | ailurux <ailuruxx@gmail.com> | 2024-09-23 17:53:03 +1000 |
| commit | e91580c75b5e440c2d13caa16b4fd3a16ad273b6 (patch) | |
| tree | c1a5187f5b366859b91529b54d8e328594c09bd7 /src/codecs/include | |
| parent | eba2ffc260f716ebe941c255800c2e42e061abac (diff) | |
| download | tangara-fw-e91580c75b5e440c2d13caa16b4fd3a16ad273b6.tar.gz | |
Implement VBR seeking based off TOC
Diffstat (limited to 'src/codecs/include')
| -rw-r--r-- | src/codecs/include/mad.hpp | 10 |
1 files changed, 9 insertions, 1 deletions
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<uint32_t>; + + struct VbrInfo { + uint32_t length; + std::optional<uint32_t> bytes; + std::optional<std::span<const unsigned char, 100>> toc; + }; + + auto GetVbrInfo(const mad_header& header) -> std::optional<VbrInfo>; + auto GetBytesUsed() -> std::size_t; std::shared_ptr<IStream> input_; |
