From 0243a737e7e91f0d0331fd1532fa135bf95285ce Mon Sep 17 00:00:00 2001 From: lizzie Date: Mon, 7 Sep 2026 08:28:23 +0000 Subject: [PATCH] 2026-09-07 08:28:23 Signed-off-by: lizzie --- src/audio_core/adsp/apps/opus/opus_decoder.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/audio_core/adsp/apps/opus/opus_decoder.cpp b/src/audio_core/adsp/apps/opus/opus_decoder.cpp index 7892fac2e6..ebc61b2ae2 100644 --- a/src/audio_core/adsp/apps/opus/opus_decoder.cpp +++ b/src/audio_core/adsp/apps/opus/opus_decoder.cpp @@ -58,7 +58,10 @@ public: /// idempotency of initialize is guaranteed Result InitializeDecoder(u32 sample_rate, u32 total_stream_count, u32 channel_count, u32 stereo_stream_count, u8 const* mappings) { - AVCodec const* codec = nullptr;// = avcodec_find_decoder_by_name("libopus"); + // prefer libopus, ffmpeg docs say to use libopus **if** available + // However, native opus can also work with swrescale: + // it uses planarfloat, we can resample to s16 + AVCodec const* codec = avcodec_find_decoder_by_name("libopus"); if (!codec) { LOG_WARNING(Audio_DSP, "unable to find libopus decoder -- using builtin opus decoder"); codec = avcodec_find_decoder(AV_CODEC_ID_OPUS);