aboutsummaryrefslogtreecommitdiff
path: root/src/audio_core
Commit message (Collapse)AuthorAgeFilesLines
* Merge nx2 into nx2-experimentalkraibse37 hours5-15/+37
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resolved by area: - audio feature_support.h: nx2's native revision handling. - fiber.cpp: ours, which also drops the unused rewind stack. - host_memory.cpp: ours granule bitmap and HintCold, plus nx2's fallocate hole punching per whole dirty granule on Linux. - texture_cache.h: nx2's old-age eviction pass, then our Collect(). - kepler_compute.cpp: shared upscale slots, then Fortune's Weave's, then the Kirby Air Riders scan. - nx2_gsv.h: ours, plus nx2's GetBufferMaxResolution and graphics device ids (1-based). - nvhost_ctrl_gpu.cpp: engine support flag bits 40-44. - lower_to_maxwell.h: ours as the base, with nx2's seven lowering commits applied one at a time. Second texture descriptor buffers are read bindless in TEX, TLD.SCR (level zero) and SUST; FSEL keeps its operand modifiers; TXD takes any channel mask. lower_to_maxwell.h lowers 837 Fortune's Weave and 1183 Mario Kart World shader dumps with the same rejects as nx2 and ours (12 and 0). Assisted-by: Claude Sonnet 5.5 (conflict analysis and drafting)
| * audio_core: accept the Switch 2 audio renderer revisionduck9122 days4-11/+35
| | | | | | | | | | | | | | | | | | | | Switch 2 titles send revision 16 with the 'REv' magic and use the voice crossfade fields. Without them GetWorkBufferSize failed with 0xc0299 and Fire Emblem: Fortune's Weave aborted (2153-1537). Ported from the Eden NS2 tree, keeping Eglantine's lenient revision compare. Assisted-by: Claude Opus 5.5 (debugging, porting and drafting) Signed-off-by: duck912 <350528965+Duck912@users.noreply.github.com>
* | Merge remote-tracking branch 'origin/fix/nx2-audio-rev16' into ↵Takoroka2 days2-1/+5
|\ \ | | | | | | | | | test/linux-all-prs
| * | audio_core: accept audio renderer revision 16Takoroka4 days2-1/+5
| |/ | | | | | | | | | | | | | | Switch 2 SDKs report audio renderer revision 16 ("REv@"; Mario Kart World's reports 15): Nintendo Switch Sports Resort's GetWorkBufferSize failed with InvalidRevision and the title aborted (2153-1537). Accept revision 16 and run it with revision 15's features, and log a rejected revision with its number.
* / audio: don't free an upsampler when cleaning up a circular buffer sinkTakoroka4 days1-8/+3
|/ | | | | | | | | CircularBufferSinkInfo::CleanUp read its state as a DeviceState and freed DeviceState::upsampler_info. Only device sinks own an upsampler; a circular buffer sink's state starts with its buffer positions, so a game that changed or removed its circular buffer sink made the audio service free a pointer built from those positions and crash the emulator. Mario Tennis Fever does this during startup.
* Fix hang on emulation stop when audio renderer outlives its managerkraibse5 days1-1/+4
| | | | | | | | | | | | | | The Switch 2 aud:u client hands out an IAudioRendererManager the guest may close right after opening a renderer. The Manager was owned by value and renderers held a plain reference, so it was destroyed (stopping the system manager thread) while the renderer lived on. System::Stop() then waited forever on terminate_event, hanging shutdown. - Share ownership of the audio Manager with each IAudioRenderer - Bound the terminate_event wait in System::Stop() - Bound the emu thread wait in MainWindow::OnEmulationStopped() Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* Switch 2: back GPU-only regions, pace presents, interleaved split methodsTakoroka7 days2-0/+18
| | | | | | | | | | | | | | | | - gpu 214 creates GPU-only memory the graphics server backs itself (title 4 renders everything into six 300 MB regions at 0x81_0000_0000). Back each with application-pool pages mapped into the alias code region and map that for the GPU. This is what made title 4's frames appear. - vi2 229 waits (bounded) for the presented frame's GPU fence: the reply reports every buffer free, so without this the game laps Eden's GPU thread and rewrites command memory it has not read yet. - Split methods: keep several parked methods keyed by resume address (NVN interleaves command buffers) and drop them when the submission ends. - hid 214 (per-frame vibration send) answered quietly. - Debug aids: EDEN_NX2_WINDOW_TRACE / EDEN_NX2_RT_TRACE (render targets, clears, textures), EDEN_NX2_AUDIO_LEVEL (output peak), EDEN_NX2_PB_DUMP (command list for offline replay), parsed-entry change check.
* Switch 2: aud:u audio, REv revision tag, job-slot events, open-file limitTakoroka7 days1-1/+5
| | | | | | | | | | | - aud:u (nn::audio::CreateUserClientSessionByHipc) command 2 returns Eden's IAudioRendererManager; the renderer accepts Switch 2's 'REv?' update tag by comparing revision numbers. - nx2:gpu sub 211 signals the job slot in request word 17, not word 2; mapping jobs no longer stall once the SDK rotates slots. - eden-cli raises the CRT open-file limit (_setmaxstdio(8192)) like the Qt frontend, so loose RomFS folders don't run out of handles. - Per-mapping GPU logs moved to Debug.
* [*] Remove Fix{Static,Small}VectorADL workaround for GCC 12 (#4386)lizzie2026-10-121-17/+2
| | | | | | | | | | | | | | | 1. We demand at least, minimum, gcc 14 2. Debian stable boost uses a newer version https://packages.debian.org/trixie/libboost-all-dev, so fix isn't longer required - [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions). - [x] I have read and followed the [AI Policy](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/AI.md) - [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability. ------------------- Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4386 Reviewed-by: MaranBr <maranbr@eden-emu.dev> Reviewed-by: crueter <crueter@eden-emu.dev>
* Revert "[audio] Replace libopus with FFmpeg (#4169)" (#4419)lizzie2026-09-1411-418/+604
| | | | | | | | | | | | | | This reverts commit ff8368c6066faf3962e2f77af7da4954e2ff6a43. - [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions). - [x] I have read and followed the [AI Policy](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/AI.md) - [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability. ------------------- Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4419 Reviewed-by: Maufeat <sahyno1996@gmail.com> Reviewed-by: MaranBr <maranbr@eden-emu.dev>
* [audio] persistent device volume control (#4416)xbzk2026-09-144-12/+22
| | | | | | | | | | | | | | | - [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions). - [x] I have read and followed the [AI Policy](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/AI.md) - [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability. ------------------- So, upon investigating AC3 not booting when fw 20+ and overlay applet disabled, i found the leads: "LibAppletOff" and "AudioTvOutput". By further decoding instructions i've found a guest assert comparing device volume with hdmi volume. Since we implemented no proper master volume when no streams are created the assert were failing causing guest to panic (why?????????) Anyway. ac3 now works fw20+ and no overlay applet.. Maybe other games too. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4416 Reviewed-by: lizzie <lizzie@eden-emu.dev> Reviewed-by: MaranBr <maranbr@eden-emu.dev>
* [audio] Replace libopus with FFmpeg (#4169)lizzie2026-09-1211-595/+421
| | | | | | | | | | | | | | | | 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>
* [hle] Enforce max_sessions, add bpc:ams service (#4394)lizzie2026-09-111-8/+11
| | | | | | | | | | | | | | | | | | As per switchbrew, as per atmosphere, and some poking around. bpc:ams stubbed for now. Signed-off-by: lizzie <lizzie@eden-emu.dev> - [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions). - [x] I have read and followed the [AI Policy](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/AI.md) - [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability. ------------------- Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4394 Reviewed-by: Maufeat <sahyno1996@gmail.com> Reviewed-by: MaranBr <maranbr@eden-emu.dev>
* [audio] hint openslES as audio driver on android to fix mute screen ↵xbzk2026-09-111-0/+8
| | | | | | | | | | | | | | | | | | | | | | | recording issue (#4397) - [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions). - [x] I have read and followed the [AI Policy](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/AI.md) - [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability. ------------------- After audio backend migration some android devices screen captures became mute. Liz instructed to enable openSL ES via some SDL hint. Found the proper one in https://wiki.libsdl.org/SDL3/SDL_HINT_AUDIO_DRIVER. Added it restricted to android. UPDATE: Got myself wondering how things work on SDL after using that hint, and checked that one must provide a list of drivers "opensles,aaudio,..." to be attempted. Afraid of some devices failing on openSL ES, and to avoid hand providing entire list, i've added fallback logic so entire SDL's driver list can be tried just in case. Default list in https://github.com/libsdl-org/SDL/blob/release-3.4.14/src/audio/SDL_audio.c. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4397 Reviewed-by: MaranBr <maranbr@eden-emu.dev> Reviewed-by: lizzie <lizzie@eden-emu.dev>
* [opus] proper limit and error code for opus decoder instances (#4384)xbzk2026-09-103-0/+44
| | | | | | | | | | | | | | | | | | | | | | - [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions). - [x] I have read and followed the [AI Policy](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/AI.md) - [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability. ------------------- This is intended to fix Hades II save loading issue. By analyzing panic dump it was found out that the error code was 0x160A. By decoding firmware it was found that error comes from 'nn::codec::InitializeHardwareOpusDecoder'. Further decoding revealed that SDK tries to allocate multiple opus instances, up to the fw limit of 24 instances, and when it receives return error ResultOutOfOpusDecoders (385), a software fallback is gracefully used. Implementing the limitation and the limit reached error code return makes saves load properly, multiple times in a row in both windows and android. I still wonder why the game allocates too many parallel instances, but the current implementation is a real fw compliant solution, and whether the 24+ is real or some leak may be investigated later, or not. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4384 Reviewed-by: lizzie <lizzie@eden-emu.dev> Reviewed-by: MaranBr <maranbr@eden-emu.dev>
* [android] Replace Oboe audio with SDL3 audio (#4338)crueter2026-09-024-338/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | Supersedes #4335. Replaces the Oboe audio backend with SDL3, since we already support it. A few caveats: - SDL defines a JVM OnLoad method already, so we have to instead hijack NativeLibrary for id_cache initialization - This also means some internal fields in Double/Integer/Boolean (namely `value`) can't be accessed, so I switched those to methods for now. - SDL Java sources are pulled in from the CI package. - Since we can't use SDLActivity, `SDL.setupJNI()` handles everything Signed-off-by: crueter <crueter@eden-emu.dev> - [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions). - [x] I have read and followed the [AI Policy](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/AI.md) - [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability. ------------------- Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4338 Reviewed-by: Lizzie and Samuel <lizzie@eden-emu.dev> Reviewed-by: MaranBr <maranbr@eden-emu.dev>
* [core, hle, video_core, memory] Improve multi-process, display layers, ↵Maufeat2026-08-292-6/+11
| | | | | | | | | | | | | | | | | | | | | dynamic shader cache and rework overlay (#4238) - [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions). - [x] I have read and followed the [AI Policy](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/AI.md) - [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability. ------------------- - Dynamic shader cache reloading capability for qlaunch - Multi-process improvements (thanks to @frank1734), instead of just using the main application we now respect caller process (also did it for HID devices while I was at it) - Layer stack masks & shared buffer screenshot for video core, added different masks (screenshot, recording, etc.) this was discovered as an issue due to how in qlaunch the transition was not right between applications. May not be perfect but also fixes screenshots while using qlaunch - Reworked overlay display management (input and visibility) - instead of random numbers as I've previously did, I decided to add an AppletZIndex enum for better readability. Also split capability of input by touch and gamepad. - etc. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4238 Reviewed-by: Samuel <lizzie@eden-emu.dev> Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Reviewed-by: MaranBr <maranbr@eden-emu.dev>
* [audio/sdl3] fix mismatches OS mixer settings for sdl3/cubeb audio backends ↵lizzie2026-08-281-27/+28
| | | | | | | | | | | | | | | | | | | | | | (#4298) Signed-off-by: lizzie <lizzie@eden-emu.dev> - [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions). - [x] I have read and followed the [AI Policy](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/AI.md) - [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability. ------------------- basically makes it so SDL3 and cubeb audio backends now share the same identifier string so OS mixers (ok a bit of a misnormer, its like pulseaudio pipewire and such, but yknow what i mean) -- dont conflate due to the fact that "Eden" != "yuzu Latency Getter". fix taken from pcsx2 https://github.com/PCSX2/pcsx2/pull/12312 Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4298 Reviewed-by: Maufeat <sahyno1996@gmail.com> Reviewed-by: MaranBr <maranbr@eden-emu.dev>
* [cmake] Add ENABLE_WERROR option (#4080)lizzie2026-08-091-1/+1
| | | | | | | | | | Should warnings be errors? that's a philosophical debate which I can only answer with "no, but if you think otherwise here is an option for you" Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4080 Reviewed-by: crueter <crueter@eden-emu.dev> Reviewed-by: MaranBr <maranbr@eden-emu.dev>
* [audio_core] Fix jamboree crash due to OOB access (#4252)lizzie2026-08-052-105/+74
| | | | | | | | | | | | | | | | | | | Signed-off-by: lizzie <lizzie@eden-emu.dev> - [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions). - [x] I have read and followed the [AI Policy](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/AI.md) - [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability. ------------------- PLEASE test diablo 3 or ANY game that's sensitive to audio changes Just TEST that there's NO regressions on the audio front this fixes a rare Jamboree crash with audio DSP Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4252 Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Reviewed-by: Shinmegumi <shinmegumi@eden-emu.dev>
* [fmt] use {#:x} instead of 0x{:#x} (#4170)lizzie2026-07-252-3/+3
| | | | | | | | | | continuation of #309 but applying to even more files than before :) also makes them lowercase because `0xfafafa` is better as `0XFAFAFA` Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4170 Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Reviewed-by: Maufeat <sahyno1996@gmail.com>
* Revert #3970 #4177 (#4187)lizzie2026-07-094-274/+287
| | | | | | | | | 3970 revert fixes crash caused by scheduler 4177 fix mario galaxy and metroid prime 4 not booting Co-authored-by: CamilleLaVey <camillelavey99@gmail.com> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4187 Reviewed-by: MaranBr <maranbr@eden-emu.dev>
* [core/hle/kernel/svc] add missing CanContain check for ↵lizzie2026-07-071-2/+6
| | | | | | | | | | | | | {Un}MapProcessCodeMemory, remove 4KB align func (#4164) does what it says, adds a missing check for that specific SVC also removes that 4kb "helper" function which is just a fancy "IsAligned" Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4164 Reviewed-by: MaranBr <maranbr@eden-emu.dev> Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
* [*, docs] remove UTF8 and make docs ASCII only (#4166)lizzie2026-07-071-1/+1
| | | | | | | | | | except for the AI policy doc which uses output for demonstrative purposes Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4166 Reviewed-by: MaranBr <maranbr@eden-emu.dev> Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
* [video_core, hle] remove redundant parent references in system structs (#3908)lizzie2026-06-2310-90/+88
| | | | | | | | | | reworked a bit to remove references of parent objects and instead pass as arguments to methods to prevent useless reloads Signed-off-by: lizzie <lizzie@eden-emu.dev> Co-authored-by: maufeat <sahyno1996@gmail.com> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3908 Reviewed-by: Maufeat <sahyno1996@gmail.com> Reviewed-by: crueter <crueter@eden-emu.dev>
* [audio_core] fix OOB copy when silencing channel on shutdown (#3969)lizzie2026-05-311-4/+2
| | | | | | | | | | | | when shutting down the emulator will silence any remaining audio from the output buffer however this is for some reason stored in an array instead of being a simple memset additionally, said array can be small enough (`frame_size_bytes > silence.size()`) to cause a funky noise to play at the end Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3969 Reviewed-by: MaranBr <maranbr@eden-emu.dev> Reviewed-by: crueter <crueter@eden-emu.dev>
* [audio_core, hle, video_core] force inline of functions that only contain ↵lizzie2026-05-234-288/+278
| | | | | | | | | | | | | | | | | | | | | thread loops (#3970) traditionally, when doing jthread: ``` jthread() calls function parameter operator()() with args function operator()() calls the code within code within is, say { ThreadMain(); } 3 calls because why not ``` now this just makes it be 2 calls, mainly benefits non-LTO builds Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3970 Reviewed-by: crueter <crueter@eden-emu.dev> Reviewed-by: MaranBr <maranbr@eden-emu.dev>
* [externals] Update to SDL3 (#3952)Kaydax2026-05-184-46/+104
| | | | | | | | | | | | | | | | | | | | Since the launch of the steam controller I think it's only best to push towards updating to SDL3 allowing for a wider range of controller support I went ahead and started on getting it working. Everything here should be functional, I've personally tested it all on Arch Linux. Still untested on windows, so looking for feedback on that Any feedback and help would be appreciated! Main changes: - Bump everything to SDL3 - Handle SDL3 audio and input - Add steam controller support, including HD Rumble - Improved battery reporting via the status icon by using real % rather than state alone Co-authored-by: crueter <crueter@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3952 Reviewed-by: crueter <crueter@eden-emu.dev> Reviewed-by: MaranBr <maranbr@eden-emu.dev> Reviewed-by: Lizzie <lizzie@eden-emu.dev>
* [cmake] fixes for XCode when having languages other than C/C++ (#3772)lizzie2026-03-261-4/+2
| | | | | | | | Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3772 Reviewed-by: crueter <crueter@eden-emu.dev> Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
* [common/logging] Simplify logging logic and fix issues when logging before ↵lizzie2026-03-1212-20/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | system is created (#3688) - our logging code was bigger than spdlog itself, why???? just keep it simple - fix issues when logging before logging system is even started - removes the "initialized logging twice" issue - removes uneeded indirection in file logging - uses direct formatting instead of jumping hoopla-around the fmt::format() ressult - code duplication and dead code removal as usual I did explore dup2() but I think it's not worth the hassle I did try `fwopen()` but it's better if things are just kept as-is. there is a lot of noise because I removed a bunch of redundant files on logging and just put everything in one file now normally this wouldn't be a good idea, however consider: the complexity of logging; it's less than 500 lines... does it really need a whole subsystem?!?!?! ITS JUST LOGGING Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3688 Reviewed-by: crueter <crueter@eden-emu.dev> Reviewed-by: DraVee <chimera@dravee.dev> Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
* [cmake] Start requiring SDL2 (#3632)crueter2026-02-251-20/+11
| | | | | | | | | | | | | Closes #3466 Like said in the issue and the OpenSSL equivalent, disabling SDL2 on desktop is just not something we want to do. It's not worth the added burden of supporting the n+1'th matrix. Signed-off-by: crueter <crueter@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3632 Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Reviewed-by: MaranBr <maranbr@eden-emu.dev>
* [audio] add splitter_size (#3477)Maufeat2026-02-114-14/+11
| | | | | | | | | | | | Thanks to: https://git.ryujinx.app/ryubing/ryujinx/-/merge_requests/257 Credits to Coxxs and his friend. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3477 Reviewed-by: MaranBr <maranbr@eden-emu.dev> Reviewed-by: DraVee <dravee@eden-emu.dev> Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Co-authored-by: Maufeat <sahyno1996@gmail.com> Co-committed-by: Maufeat <sahyno1996@gmail.com>
* [audio] Fix release buffer for audio input (#3336)Maufeat2026-01-182-1/+13
| | | | | | | | | | fixes microphone release buffer and data. Tested with Let's Sing 2025 Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3336 Reviewed-by: MaranBr <maranbr@eden-emu.dev> Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Co-authored-by: Maufeat <sahyno1996@gmail.com> Co-committed-by: Maufeat <sahyno1996@gmail.com>
* [common, core] remove uneeded memory indirection overhead at startup (#3306)lizzie2026-01-164-29/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | for core stuff: just remove unique ptrs that dont need any pointer stability at all (afterall its an allocation within an allocation so yeah) for fibers: Main reasoning behind this is because virtualBuffer<> is stupidly fucking expensive and it also clutters my fstat view ALSO mmap is a syscall, syscalls are bad for performance or whatever ALSO std::vector<> is better suited for handling this kind of "fixed size thing where its like big but not THAT big" (512 KiB isn't going to kill your memory usage for each fiber...) for core.cpp stuff - inlines stuff into std::optional<> as opposed to std::unique_ptr<> (because yknow, we are making the Impl from an unique_ptr, allocating within an allocation is unnecessary) - reorganizes the structures a bit so padding doesnt screw us up (it's not perfect but eh saves a measly 44 bytes) - removes unused/dead code - uses std::vector<> instead of std::deque<> no perf impact expected, maybe some initialisation boost but very minimal impact nonethless lto gets rid of most calls anyways - the heavy issue is with shared_ptr and the cache coherency from the atomics... but i clumped them together because well, they kinda do not suffer from cache coherency - hopefully not a mistake this balloons the size of Impl to about 1.67 MB - which is fine because we throw it in the stack anyways REST OF INTERFACES: most of them ballooned in size as well, but overhead is ok since its an allocation within an alloc, no stack is used (when it comes to storing these i mean) Signed-off-by: lizzie lizzie@eden-emu.dev Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3306 Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Reviewed-by: MaranBr <maranbr@eden-emu.dev> Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
* [audio_core] Better biquad filter logic (#3235)MaranBr2025-12-312-62/+38
| | | | | | | | | This removes all redundant code and improves the logic of the biquad filter. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3235 Reviewed-by: Maufeat <sahyno1996@gmail.com> Co-authored-by: MaranBr <maranbr@outlook.com> Co-committed-by: MaranBr <maranbr@outlook.com>
* [audio_core] Fix broken biquad effect (#3225)MaranBr2025-12-292-24/+22
| | | | | | | | | | | | This fixes the broken biquad effect. Thanks to Forrest Mark X for showing us where the problem was occurring in the code. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3225 Reviewed-by: Maufeat <sahyno1996@gmail.com> Reviewed-by: DraVee <dravee@eden-emu.dev> Co-authored-by: MaranBr <maranbr@outlook.com> Co-committed-by: MaranBr <maranbr@outlook.com>
* [audio_core] Fix audio mute by removing minimum volume limit (#3194)MaranBr2025-12-271-1/+0
| | | | | | | | Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3194 Reviewed-by: Caio Oliveira <caiooliveirafarias0@gmail.com> Reviewed-by: Lizzie <lizzie@eden-emu.dev> Co-authored-by: MaranBr <maranbr@outlook.com> Co-committed-by: MaranBr <maranbr@outlook.com>
* [audio] correct biquad filter v2 parameters (#3142)Maufeat2025-12-134-28/+118
| | | | | | | | | | | We had the same struct for v1 and v2 - this was tested only with MP4, should output correct sounds now and boot it. Co-authored-by: MaranBr <maranbr@outlook.com> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3142 Reviewed-by: MaranBr <maranbr@eden-emu.dev> Reviewed-by: crueter <crueter@eden-emu.dev> Co-authored-by: Maufeat <sahyno1996@gmail.com> Co-committed-by: Maufeat <sahyno1996@gmail.com>
* [qt_common, core, audio] remove duplicate string literal definitions, inline ↵lizzie2025-11-173-52/+31
| | | | | | | | | | | | | | SystemManager::threadfunc, increase latency of audio shutdown (#3030) Very small code cleanup, also remove `[[unlikely]]` because it doesn't matter + increase latency of audio render when shutting down Signed-off-by: lizzie lizzie@eden-emu.dev Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3030 Reviewed-by: Caio Oliveira <caiooliveirafarias0@gmail.com> Reviewed-by: crueter <crueter@eden-emu.dev> Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
* [audio_core] Fix audio reverb effect acording to specs (#2976)MaranBr2025-11-082-46/+81
| | | | | | | | | | This fixes the audio reverb issue acording to specs. Known for affecting The Legend of Zelda: Echoes of Wisdom. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2976 Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Reviewed-by: Caio Oliveira <caiooliveirafarias0@gmail.com> Co-authored-by: MaranBr <maranbr@outlook.com> Co-committed-by: MaranBr <maranbr@outlook.com>
* [audio_core] Increase RingBuffer and SinkBuffer size a bit more (#2964)MaranBr2025-11-071-2/+2
| | | | | | | | | | | This helps weaker CPUs maintain consistent audio playback while keeping latency low. Complement to #2944. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2964 Reviewed-by: Maufeat <sahyno1996@gmail.com> Co-authored-by: MaranBr <maranbr@outlook.com> Co-committed-by: MaranBr <maranbr@outlook.com>
* [audio_core] Slightly increase audio latency (#2944)MaranBr2025-11-041-4/+4
| | | | | | | | | This slightly increases audio latency to prevent audio skipping in some games, such as Super Mario Odyssey when playing videos. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2944 Reviewed-by: Lizzie <lizzie@eden-emu.dev> Co-authored-by: MaranBr <maranbr@outlook.com> Co-committed-by: MaranBr <maranbr@outlook.com>
* [audio_core] Decrease wait_for a little bit (#2937)Caio Oliveira2025-11-021-1/+1
| | | | | | | | | | | This fixes an audio problem on Steam Deck. Signed-off-by: Caio Oliveira <caiooliveirafarias0@gmail.com> Co-authored-by: MaranBr <maranbr@outlook.com> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2937 Reviewed-by: MaranBr <maranbr@eden-emu.dev> Co-authored-by: Caio Oliveira <caiooliveirafarias0@gmail.com> Co-committed-by: Caio Oliveira <caiooliveirafarias0@gmail.com>
* [audio_core] Remove unused files and make audio rendering more safe (#2903)MaranBr2025-10-312-63/+52
| | | | | | | | | | This removes unused files left over in the project and makes audio rendering more safe to avoid any kind of desynchronization or muting. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2903 Reviewed-by: Lizzie <lizzie@eden-emu.dev> Reviewed-by: Maufeat <sahyno1996@gmail.com> Co-authored-by: MaranBr <maranbr@outlook.com> Co-committed-by: MaranBr <maranbr@outlook.com>
* [Audio] Tighten sink queue back pressure (#2840)Ribbit2025-10-282-5/+11
| | | | | | | | | Co-authored-by: Ribbit <ribbit@placeholder.com> Co-authored-by: MaranBr <maranbr@outlook.com> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2840 Reviewed-by: MaranBr <maranbr@eden-emu.dev> Co-authored-by: Ribbit <ribbit@eden-emu.dev> Co-committed-by: Ribbit <ribbit@eden-emu.dev>
* nuke: Goodbye PCH, you will not be missed (#2821)Caio Oliveira2025-10-272-11/+0
| | | | | | | | Signed-off-by: Caio Oliveira <caiooliveirafarias0@gmail.com> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2821 Reviewed-by: crueter <crueter@eden-emu.dev> Co-authored-by: Caio Oliveira <caiooliveirafarias0@gmail.com> Co-committed-by: Caio Oliveira <caiooliveirafarias0@gmail.com>
* [audio] Fix BOTW by increasing ring-size (#2822)lizzie2025-10-242-115/+60
| | | | | | | | | Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2822 Reviewed-by: MaranBr <maranbr@eden-emu.dev> Reviewed-by: Maufeat <sahyno1996@gmail.com> Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
* [common] replace Common::BitCast with libc++ provided one (#2774)lizzie2025-10-221-13/+14
| | | | | | | | | Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2774 Reviewed-by: MaranBr <maranbr@eden-emu.dev> Reviewed-by: crueter <crueter@eden-emu.dev> Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
* [compat] Debian stable gcc12/clang14 compilation fixes (#2763)lizzie2025-10-182-4/+40
| | | | | | | | | | | | | Mainly because - while we can just give out an AppImage and call it a day - building natively should be an option for all major distros. And "base" stable debian doesn't provide a new enough g++/clang++ so... we need to make some "fixups". Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2763 Reviewed-by: crueter <crueter@eden-emu.dev> Reviewed-by: MaranBr <maranbr@eden-emu.dev> Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
* [audio] replace ReaderWriterQueue with the generic SPSC queue (#2745)lizzie2025-10-163-7/+13
| | | | | | | | | | | A bit overkill for something that is only used once in the source code - should rather pertain to the generic SPSC queue just to avoid redundant code. If anything should be vendored. Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2745 Reviewed-by: crueter <crueter@eden-emu.dev> Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>