aboutsummaryrefslogtreecommitdiff
path: root/src/audio_core/renderer
Commit message (Collapse)AuthorAgeFilesLines
* Merge nx2 into nx2-experimentalkraibse40 hours3-4/+14
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 days3-4/+14
| | | | | | | | | | | | | | | | | | | | 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>
* | 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: 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.
* [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-251-1/+1
| | | | | | | | | | 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>
* [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>
* [video_core, hle] remove redundant parent references in system structs (#3908)lizzie2026-06-231-3/+3
| | | | | | | | | | 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>
* [common/logging] Simplify logging logic and fix issues when logging before ↵lizzie2026-03-124-5/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* [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_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] 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-172-40/+24
| | | | | | | | | | | | | | 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-081-44/+79
| | | | | | | | | | 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>
* [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>
* [audio_core/hid] Audio REV12+15 support + HID fixes (#2719)unknown2025-10-1213-27/+529
| | | | | | | | | | | | | | | | This fixes newer updates / games. Implements partial audio rev15, rev13, rev12 and HID issues on SDK20+ games. Credits to LotP (Ryubing) and Zephyron (Citron) for their research and implementation. Co-authored-by: Zephyron <zephyron@citron-emu.org> Co-authored-by: Shinmegumi <shinmegumi@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2719 Reviewed-by: MaranBr <maranbr@eden-emu.dev> Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Co-authored-by: unknown <sahyno1996@gmail.com> Co-committed-by: unknown <sahyno1996@gmail.com>
* [audio_core] Fix audio reverb effect (#2646)MaranBr2025-10-022-14/+0
| | | | | | | | This fixes the audio reverb effect that was causing loud noise in some games and on some platforms. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2646 Co-authored-by: MaranBr <maranbr@outlook.com> Co-committed-by: MaranBr <maranbr@outlook.com>
* [audio_core] Fix audio issue in The Legend of Zelda - Echoes of Wisdom (#2594)MaranBr2025-10-011-0/+15
| | | | | | | | | This fixes the audio issue in The Legend of Zelda - Echoes of Wisdom on Windows. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2594 Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Co-authored-by: MaranBr <maranbr@outlook.com> Co-committed-by: MaranBr <maranbr@outlook.com>
* [common] remove ranges polyfill (#2546)lizzie2025-09-244-4/+7
| | | | | | | | | Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2546 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>
* [meta] fix license headers (#2547)lizzie2025-09-2119-0/+57
| | | | | | | Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2547 Reviewed-by: MaranBr <maranbr@eden-emu.dev> Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
* [cmake] enable clang-cl and WoA builds (#348)lizzie2025-09-0919-45/+45
| | | | | | | | | | | | | | Compilation and CMake fixes for both Windows on ARM and clang-cl, meaning Windows can now be built on both MSVC and clang on both amd64 and aarch64. Compiling on clang is *dramatically* faster so this should be useful for CI. Co-authored-by: crueter <crueter@eden-emu.dev> Co-authored-by: crueter <crueter@crueter.xyz> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/348 Reviewed-by: CamilleLaVey <camillelavey99@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>
* [meta] remove MicroProfile (#185)crueter2025-08-061-7/+3
| | | | | | Signed-off-by: crueter <crueter@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/185 Reviewed-by: Lizzie <lizzie@eden-emu.dev>
* Revert "Add more audio logging to pinpoint issues better"edendev2025-04-301-11/+3
| | | | This reverts commit b75251742c1ab3776f8a0e1a813a39a40effd69f.
* Add more audio logging to pinpoint issues betteredendev2025-04-301-3/+11
|
* audio: formatLiam2024-02-202-5/+6
|
* audio: rewrite IAudioDeviceLiam2024-02-202-12/+8
|
* audio: rewrite IAudioRendererManagerLiam2024-02-208-39/+45
|
* Use the input process handle to get the correct application's memoryKelebek12024-01-284-8/+20
|
* Core: Clang format and other small issues.Fernando Sahmkow2024-01-181-1/+1
|
* SMMU: Initial adaptation to video_core.Fernando Sahmkow2024-01-181-0/+1
|
* Fix more typosViktor Szépe2024-01-154-9/+9
|
* ci: fix new codespell errorsLiam2023-10-021-1/+1
|
* Do not consider voice commands in time estimation, fix adpcm estimateKelebek12023-09-182-6/+8
|
* Merge pull request #11465 from Kelebek1/skip_remaining_resetliamwhite2023-09-101-11/+5
|\ | | | | [Audio] Do not reset the remaining command count each time
| * Do not reset the command buffer command count each timeKelebek12023-09-071-11/+5
| |
* | Fix data source version 1 command loopingKelebek12023-09-084-52/+72
|/
* Rework ADSP into a wrapper for appsKelebek12023-09-04154-1561/+637
|
* Fix node id index in DropVoicesKelebek12023-08-281-1/+1
|
* Use spans over guest memory where possible instead of copying data.Kelebek12023-07-022-74/+29
|
* Remove memory allocations in some hot pathsKelebek12023-06-2212-48/+47
|
* core_timing: Use CNTPCT as the guest CPU tickMorph2023-06-074-14/+8
| | | | | Previously, we were mixing the raw CPU frequency and CNTFRQ. The raw CPU frequency (1020 MHz) should've never been used as CNTPCT (whose frequency is CNTFRQ) is the only counter available.
* audio_renderer: resolve adsp thread deadlock shutdownLiam2023-06-042-6/+6
|
* Smooth out the DSP callback by adding a 5ms wait time limitKelebek12023-05-183-14/+10
|
* Wait for the terminate event before destroying a system instanceKelebek12023-05-011-4/+1
|
* Merge pull request #9969 from bylaws/masterbunnei2023-04-014-25/+4
|\ | | | | Audio synchronisation improvements
| * Run clang-formatBilly Laws2023-03-271-1/+1
| |
| * audio: Wait for samples on the emulated DSP side to avoid desyncsBilly Laws2023-03-274-24/+4
| | | | | | | | Waiting on the host side is inaccurate and leads to desyncs in the event of the sink missing a deadline that require stalls to fix. By waiting for the sink to have space before even starting rendering such desyncs can be avoided.
| * audio: Interpolate system manager sample count using host sink sample infoBilly Laws2023-03-261-1/+0
| | | | | | | | This avoids the need to stall if the host sink sporadically misses the deadline, in such a case the previous implementation would report them samples as being played on-time, causing the guest to send more samples and leading to a gradual buildup.