aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/service/audio/audio.cpp
Commit message (Collapse)AuthorAgeFilesLines
* nx2: give the Switch 2 audio streams (auddmg:u, audsmx:u) real objectsTakoroka4 days1-0/+3
| | | | | | | | | | | | | | | | | | Switch Sports' menu movie plays its sound through an nn::audio output stream, which the SDK builds on the virtual output devices (auddmg:u) and the sysmix sessions (audsmx:u). Without them it stopped with 2153-1600, then 2153-1604. - auddmg:u 0 returns the virtual device manager: one stereo 48 kHz device (list, default, format check, the 0x228-byte property block, state event). The block's u32 at 0x220 is the device id the SDK hands to CreateStream, which refuses 0. 700/800 attach and detach a stream (OutputStream Start/Stop). - audsmx:u 0 returns the user session: CreateStream (buffer address and size of the game's ring) returning a stream object, Engage/Disengage. The stream object takes the format, gain, prime/purge/clock and the state and data events. - A 5 ms timer moves the ring's read index (buffer + 0x44) toward the game's write index (buffer + 0x1004) at the sample rate while a stream is attached, and signals the data event while the ring has room, so the movie keeps feeding it. The audio is not mixed into Eden's output yet.
* Switch 2: aud:u audio, REv revision tag, job-slot events, open-file limitTakoroka7 days1-0/+3
| | | | | | | | | | | - 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.
* Revert "[hle] constexpr handler dispatch maps, introduce version gating ↵PavelBARABANOV2026-10-151-104/+104
| | | | | | | | | | | | | | | | | (#4480)" (#4532) This reverts commit 218c6705d950635bc18f8458d738a1996fb592b6. - [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/4532 Reviewed-by: lizzie <lizzie@eden-emu.dev> Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Reviewed-by: Maufeat <sahyno1996@gmail.com>
* [hle] constexpr handler dispatch maps, introduce version gating (#4480)lizzie2026-10-131-104/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This PR primarily focuses on upbringing constexpr maps for handlers. Each time an HLE object of a service is construed, it registers it's own handlers, over and over. Regardless of whetever it needs them at the moment or not. Additionally we don't require to keep track of different function pointers amongst each object. This can be done by overriding the given function instead, as opposed to having a separate hash map for every given object. In other words: Remove handlers (and handlers_tipc) map for every instance then read from a static defined per-class. - [x] Migrate all HLE functions to new `frozen::map` constexpr time finder - [ ] Measure if this approach actually makes better codegen Optional: - [x] Properly gate all functions (that have versions commented next to them) - [x] Maybe store `HandlerFnP<>` and `const char*` separately, version gating can go in a different map as well Information such as name can be used on debug builds, but doesn't particularly help on release as one can consult an external reference (or have an annotated IPC map) 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. ------------------- Co-authored-by: Maufeat <sahyno1996@gmail.com> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4480 Reviewed-by: Maufeat <sahyno1996@gmail.com> Reviewed-by: MaranBr <maranbr@eden-emu.dev>
* [hle] Use correct `audren:d` service framework (#4472)lizzie2026-09-231-1/+1
| | | | | | | | | | | | | | | | Trivial change. 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/4472 Reviewed-by: MaranBr <maranbr@eden-emu.dev> Reviewed-by: Maufeat <sahyno1996@gmail.com>
* [hle] Enforce max_sessions, add bpc:ams service (#4394)lizzie2026-09-111-19/+19
| | | | | | | | | | | | | | | | | | 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>
* [hle/service] stub missing homebrew services, fix NPad/caps crashes (#4264)lizzie2026-08-181-0/+176
| | | | | | | | | | | | | | | | | | 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. ------------------- this PR adds various missing services (acc:e, acc:e:u1) to expand homebrew compatibility notably this also fixes NPad related crashes due to nullref Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4264 Reviewed-by: Maufeat <sahyno1996@gmail.com> Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
* core/hle/services/audio] Fix audioctl being started before audout/audin ↵lizzie2026-03-071-9/+9
| | | | | | | | | | | | | | (which are required for ctor) (#3695) `audctl` depends on `audout`, simply start `audout` and `audin` before! Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3695 Reviewed-by: MaranBr <maranbr@eden-emu.dev> Reviewed-by: DraVee <chimera@dravee.dev> Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
* audio: split IHardwarweOpusDecoder, move IHardwareOpusDecoderManagerLiam2024-02-201-2/+3
|
* audio: split IAudioDevice, IAudioRenderer, move IAudioRendererManagerLiam2024-02-201-2/+3
|
* audio: move IFinalOutputRecorderManager{,ForApplet}Liam2024-02-201-4/+6
|
* audio: rewrite IAudioOutManagerLiam2024-02-201-2/+2
|
* audio: rewrite IAudioInManagerLiam2024-02-201-2/+2
|
* service: audio: Rewrite IAudioController to new IPCNarr the Reg2024-02-171-2/+2
|
* service: refactor server architectureLiam2023-02-211-8/+13
| | | | Converts services to have their own processes
* service: remove deleted servicesLiam2023-02-141-14/+0
|
* general: Convert source file copyright comments over to SPDXMorph2022-04-231-3/+2
| | | | | This formats all copyright comments according to SPDX formatting guidelines. Additionally, this resolves the remaining GPLv2 only licensed files by relicensing them to GPLv2.0-or-later.
* service: Eliminate usages of the global system instanceLioncash2020-11-261-13/+13
| | | | | Completely removes all usages of the global system instance within the services code by passing in the using system instance to the services.
* service/audio: Remove global system accessorsLioncash2019-07-191-3/+3
| | | | Trims out the lingering reliance on global state out of the audio code.
* service/audio: Replace includes with forward declarations where applicableLioncash2018-09-111-0/+1
| | | | | A few headers were including other headers when a forward declaration can be used instead, allowing the include to be moved to the cpp file.
* service/audio: Add missing servicesLioncash2018-07-311-0/+16
| | | | | Adds the missing audctl service, as well as the :a and :d services for audin, audout, audrec, and audren.
* Service/Audio: add hwopus service, stub GetWorkBufferSize functionmailwl2018-06-251-0/+2
|
* service: Use nested namespace specifiers where applicableLioncash2018-04-191-4/+2
| | | | Tidies up namespace declarations
* Added stubs for audio services. (#116)st4rk2018-01-211-0/+8
| | | | | | * stubs for audout:u, audin:u, audrec:u, audren:u, codecctl and decoding tables with nullptr for future implementations * fixing the changes requested (remove private, explicit)
* audio: Add files to CMake.bunnei2018-01-141-1/+0
|
* audio: Stub out AudOutU::ListAudioOuts.bunnei2018-01-141-0/+17