diff options
| author | jacqueline <me@jacqueline.id.au> | 2024-01-18 14:49:07 +1100 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2024-01-18 14:49:07 +1100 |
| commit | 200a43fad309813c3ebbc3da35dbb97367bde7ac (patch) | |
| tree | 48fe31bcc1f792119a90226b1b419582ab2b29ec /src/audio | |
| parent | 52f5e95acbb071e2614926b84616e335131439d6 (diff) | |
| download | tangara-fw-200a43fad309813c3ebbc3da35dbb97367bde7ac.tar.gz | |
fix issues with some song info not appearing
Diffstat (limited to 'src/audio')
| -rw-r--r-- | src/audio/audio_decoder.cpp | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/audio/audio_decoder.cpp b/src/audio/audio_decoder.cpp index fd011c51..5b057240 100644 --- a/src/audio/audio_decoder.cpp +++ b/src/audio/audio_decoder.cpp @@ -139,17 +139,13 @@ auto Decoder::BeginDecoding(std::shared_ptr<TaggedStream> stream) -> bool { } stream->SetPreambleFinished(); - if (open_res->total_samples) { - timer_.reset(new Timer(std::shared_ptr<Track>{new Track{ - .tags = stream->tags(), - .db_info = {}, - .bitrate_kbps = 0, - .encoding = stream->type(), - }}, - open_res.value())); - } else { - timer_.reset(); - } + timer_.reset(new Timer(std::shared_ptr<Track>{new Track{ + .tags = stream->tags(), + .db_info = {}, + .bitrate_kbps = open_res->sample_rate_hz, + .encoding = stream->type(), + }}, + open_res.value())); current_sink_format_ = IAudioOutput::Format{ .sample_rate = open_res->sample_rate_hz, |
