summaryrefslogtreecommitdiff
path: root/src/codecs/wav.cpp
diff options
context:
space:
mode:
authorTom Kirchner <git@halffull.org>2025-01-06 20:53:02 -0800
committerTom Kirchner <git@halffull.org>2025-01-08 20:46:34 -0800
commitfaa62e0c60d51a9df88002a59825b427323259c0 (patch)
treecd0631b047e8b09fbd61ea85ad1a67aa55929a25 /src/codecs/wav.cpp
parent829d033a448107f1bc610cf735ce9f7222de564b (diff)
downloadtangara-fw-faa62e0c60d51a9df88002a59825b427323259c0.tar.gz
Add bitrate info
Diffstat (limited to 'src/codecs/wav.cpp')
-rw-r--r--src/codecs/wav.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/codecs/wav.cpp b/src/codecs/wav.cpp
index 746f44ca..d80b7e48 100644
--- a/src/codecs/wav.cpp
+++ b/src/codecs/wav.cpp
@@ -216,7 +216,8 @@ auto WavDecoder::OpenStream(std::shared_ptr<IStream> input, uint32_t offset)
output_format_ = {.num_channels = (uint8_t)num_channels_,
.sample_rate_hz = samples_per_second,
- .total_samples = number_of_samples};
+ .total_samples = number_of_samples,
+ .bitrate_kbps = samples_per_second * num_channels_ * bytes_per_sample_ * 8 / 1024};
return output_format_;
}