diff options
| author | jacqueline <me@jacqueline.id.au> | 2023-08-10 21:34:48 +1000 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2023-08-10 21:35:16 +1000 |
| commit | c37ccb985125f5efdf7600989331085f60d8a973 (patch) | |
| tree | 4c0cbce4d9111e82a180e73b7021e23eb6a4b0db /src/codecs/mad.cpp | |
| parent | 958160aa545e3d91b2a4f1a367817e73d298e8a9 (diff) | |
| download | tangara-fw-c37ccb985125f5efdf7600989331085f60d8a973.tar.gz | |
Reintroduce track timer, now relying more on codecs
Diffstat (limited to 'src/codecs/mad.cpp')
| -rw-r--r-- | src/codecs/mad.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/codecs/mad.cpp b/src/codecs/mad.cpp index ce3a9cac..dfa568d4 100644 --- a/src/codecs/mad.cpp +++ b/src/codecs/mad.cpp @@ -92,7 +92,7 @@ auto MadMp3Decoder::OpenStream(std::shared_ptr<IStream> input) auto vbr_length = GetVbrLength(header); if (vbr_length) { - output.duration_seconds = vbr_length; + output.total_samples = vbr_length; } return output; } @@ -234,7 +234,7 @@ auto MadMp3Decoder::GetVbrLength(const mad_header& header) return {}; } - return (double)(frames_count * samples_per_frame) / header.samplerate; + return (double)(frames_count * samples_per_frame); } } // namespace codecs |
