aboutsummaryrefslogtreecommitdiff
path: root/src/audio_core/sink/sink_stream.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Switch 2: back GPU-only regions, pace presents, interleaved split methodsTakoroka7 days1-0/+15
| | | | | | | | | | | | | | | | - 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.
* [*, 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>
* [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] Fix release buffer for audio input (#3336)Maufeat2026-01-181-1/+11
| | | | | | | | | | 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>
* [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_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-311-62/+51
| | | | | | | | | | 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-281-4/+10
| | | | | | | | | 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>
* [audio] Fix BOTW by increasing ring-size (#2822)lizzie2025-10-241-114/+59
| | | | | | | | | 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>
* [audio] replace ReaderWriterQueue with the generic SPSC queue (#2745)lizzie2025-10-161-4/+5
| | | | | | | | | | | 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>
* [common] use libc++ provided jthread instead of in-house one (which ↵lizzie2025-10-011-2/+1
| | | | | | | | | | | | | | deadlocks on FBSD 14) (#351) Needs test on our CI targets to see I didn't miss anything. Worried about android. Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/351 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>
* [cmake] enable clang-cl and WoA builds (#348)lizzie2025-09-091-4/+4
| | | | | | | | | | | | | | 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>
* [icc] fix intel c++ compiler errors (#146)lizzie2025-07-301-1/+3
| | | | | | Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/146 Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
* scope_exit: Make constexprFearlessTobi2024-02-191-2/+2
| | | | | Allows the use of the macro in constexpr-contexts. Also avoids some potential problems when nesting braces inside it.
* audio: skip coefficient normalization for downmixLiam2023-12-161-4/+2
|
* Have GetActiveChannelCount return the system channels instead of host device ↵Kelebek12023-12-161-17/+26
| | | | channels
* audio_core: ignore renderer wait when stream is pausedLiam2023-11-121-2/+10
|
* audio: fix shutdown deadlock in audio rendererLiam2023-10-131-0/+4
|
* sink_stream: Resolve heap buffer corruption due to out of bounds writeMorph2023-06-301-14/+20
| | | | Also, remove the use of ScratchBuffer when upmixing, as other channels may not be initialized with zeroed out data.
* Remove memory allocations in some hot pathsKelebek12023-06-221-7/+8
|
* core_timing: Use CNTPCT as the guest CPU tickMorph2023-06-071-1/+0
| | | | | 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.
* android: audio_core: sink_stream: Remove unnecessary check.bunnei2023-06-051-3/+0
|
* Merge pull request #10508 from yuzu-emu/limebunnei2023-06-051-0/+3
|\ | | | | Project Lime - yuzu Android Port
| * android: audio_core: Avoid shutdown hang.bunnei2023-06-031-0/+3
| |
* | audio_renderer: resolve adsp thread deadlock shutdownLiam2023-06-041-2/+3
|/
* Audren wait as suggested by ByLawsKelebek12023-05-271-0/+3
|
* Smooth out the DSP callback by adding a 5ms wait time limitKelebek12023-05-181-2/+2
|
* Use GetGlobalTimeNs as opposed to clock ticksBilly Laws2023-04-081-3/+2
|
* Add some explicit latency to sample count reportingBilly Laws2023-04-031-1/+2
| | | | Some games have very tight scheduling requirements for their audio which can't really be matched on the host, adding a constant to the reported value helps to provide some leeway.
* audio_core: No longer stall when sink queue is fullBilly Laws2023-03-271-43/+0
| | | | Now the audout and audren update rates are tied to the sink status stalling is no longer necessary.
* Run clang-formatBilly Laws2023-03-271-5/+5
|
* audio: Wait for samples on the emulated DSP side to avoid desyncsBilly Laws2023-03-271-0/+15
| | | | 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-0/+21
| | | | 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.
* Merge pull request #9796 from liamwhite/currentliamwhite2023-02-151-2/+2
|\ | | | | general: rename CurrentProcess to ApplicationProcess
| * general: rename CurrentProcess to ApplicationProcessLiam2023-02-131-2/+2
| |
* | remove static from pointer sized or smaller types for aesthetics, change ↵arades792023-02-141-6/+6
| | | | | | | | | | | | constexpr static to static constexpr for consistency Signed-off-by: arades79 <scravers@protonmail.com>
* | add static lifetime to constexpr values to force compile time evaluation ↵arades792023-02-141-6/+6
|/ | | | | | where possible Signed-off-by: arades79 <scravers@protonmail.com>
* Merge pull request #9289 from liamwhite/fruit-companyliamwhite2022-12-031-4/+4
|\ | | | | general: fix compile for Apple Clang
| * general: fix compile for Apple ClangLiam2022-11-221-4/+4
| |
* | audio_core: sink_stream: Hold the suspend lock when process is stalled.bunnei2022-11-291-5/+6
|/ | | | - Prevents us from clashing with other callers trying to un/stall.
* Do not try to pause core timing from the audio thread when using single-coreKelebek12022-09-221-2/+7
|
* Merge pull request #8878 from Kelebek1/remove_pausebunnei2022-09-151-0/+16
|\ | | | | Remove pause callbacks from coretiming
| * Remove pause callbacks from coretimingKelebek12022-09-131-0/+16
| |
* | Remove a pragma once from a cpp fileKelebek12022-09-121-2/+0
|/
* Don't stall with nvdecKelebek12022-09-041-1/+7
|
* Rework audio output, connecting AudioOut into coretiming to fix desync ↵Kelebek12022-09-021-0/+259
during heavy loads.