diff options
| author | jacqueline <me@jacqueline.id.au> | 2023-10-16 16:15:48 +1100 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2023-10-16 16:15:48 +1100 |
| commit | bb91724b941e6366711515a544b09385fbb6fc3d (patch) | |
| tree | 3e22163db7fda806ba1903a9a5eaff8987f0b640 /src/codecs/include | |
| parent | 7523772886ca37cf05d0ad5b24f6d520e314242e (diff) | |
| download | tangara-fw-bb91724b941e6366711515a544b09385fbb6fc3d.tar.gz | |
Codec memory tweaks
- Ensure mad and ogg structs are allocated internally
- Free old codec before making a new one
Diffstat (limited to 'src/codecs/include')
| -rw-r--r-- | src/codecs/include/mad.hpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/codecs/include/mad.hpp b/src/codecs/include/mad.hpp index ef4e91f8..994e989c 100644 --- a/src/codecs/include/mad.hpp +++ b/src/codecs/include/mad.hpp @@ -38,16 +38,16 @@ class MadMp3Decoder : public ICodec { MadMp3Decoder& operator=(const MadMp3Decoder&) = delete; private: - auto SkipID3Tags(IStream &stream) -> void; + auto SkipID3Tags(IStream& stream) -> void; auto GetVbrLength(const mad_header& header) -> std::optional<uint32_t>; auto GetBytesUsed() -> std::size_t; std::shared_ptr<IStream> input_; SourceBuffer buffer_; - mad_stream stream_; - mad_frame frame_; - mad_synth synth_; + mad_stream* stream_; + mad_frame* frame_; + mad_synth* synth_; int current_sample_; bool is_eof_; |
