diff options
| author | jacqueline <me@jacqueline.id.au> | 2023-08-10 22:24:47 +1000 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2023-08-10 22:24:47 +1000 |
| commit | 06283e07140f39a9f3db636c8a4ff8fcbc56a290 (patch) | |
| tree | fcf0ec2555ffa0db3060100d16b653d3a39e36e7 /src/codecs/opus.cpp | |
| parent | c37ccb985125f5efdf7600989331085f60d8a973 (diff) | |
| download | tangara-fw-06283e07140f39a9f3db636c8a4ff8fcbc56a290.tar.gz | |
Fix issues with timing stereo streams
Diffstat (limited to 'src/codecs/opus.cpp')
| -rw-r--r-- | src/codecs/opus.cpp | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/codecs/opus.cpp b/src/codecs/opus.cpp index f5ff471a..e6e3a1af 100644 --- a/src/codecs/opus.cpp +++ b/src/codecs/opus.cpp @@ -125,15 +125,7 @@ auto XiphOpusDecoder::OpenStream(std::shared_ptr<IStream> input) auto l = op_pcm_total(opus_, -1); std::optional<uint32_t> length; if (l > 0) { - // Output is always downmixed to two channels, but the pcm count does not - // reflect this. - int channels = op_channel_count(opus_, -1); - if (channels == 1) { - l *= 2; - } else if (channels > 2) { - l /= channels * 2; - } - length = l; + length = l * 2; } return OutputFormat{ |
