diff options
| author | lizzie <lizzie@eden-emu.dev> | 2026-09-12 09:59:33 +0200 |
|---|---|---|
| committer | crueter <crueter@eden-emu.dev> | 2026-09-12 09:59:33 +0200 |
| commit | ff8368c6066faf3962e2f77af7da4954e2ff6a43 (patch) | |
| tree | 34addf136793c9f69495c261dd4e0c64ef444ba8 /CMakeModules/find/FindOpus.cmake | |
| parent | 8a22f1845b8b7ec19fbb518b696513e36d42b317 (diff) | |
[audio] Replace libopus with FFmpeg (#4169)
FFmpeg offers two opus decoders:
- libopus, this one is fed the same data (that affects output) as the previous libopus decoder had as well
- native opus decoder: this only takes Float32 samples, we then need to invoke swrescale to translate between s16 (what switch sends) and float32 (what FFmpeg expects), the process is computationally more expensive, but trades off neatly as the native opus decoder is very optimised
It also relegates the handling to FFmpeg, which simplifies existing code (more concretely, by using the "fill/drain" scheme for packets/frames)
Closes #2897
Signed-off-by: lizzie <lizzie@eden-emu.dev>
Co-authored-by: crueter <crueter@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4169
Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
Reviewed-by: Maufeat <sahyno1996@gmail.com>
Diffstat (limited to 'CMakeModules/find/FindOpus.cmake')
| -rw-r--r-- | CMakeModules/find/FindOpus.cmake | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/CMakeModules/find/FindOpus.cmake b/CMakeModules/find/FindOpus.cmake deleted file mode 100644 index 257642682e..0000000000 --- a/CMakeModules/find/FindOpus.cmake +++ /dev/null @@ -1,22 +0,0 @@ -# SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project -# SPDX-License-Identifier: GPL-3.0-or-later - -# SPDX-FileCopyrightText: 2022 yuzu Emulator Project -# SPDX-License-Identifier: GPL-2.0-or-later - -find_package(PkgConfig QUIET) -pkg_search_module(OPUS QUIET IMPORTED_TARGET opus) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(Opus - REQUIRED_VARS OPUS_LINK_LIBRARIES - VERSION_VAR OPUS_VERSION -) - -if (MSYS2) - FixMsysPath(PkgConfig::OPUS) -endif() - -if (Opus_FOUND AND NOT TARGET Opus::opus) - add_library(Opus::opus ALIAS PkgConfig::OPUS) -endif() |
