Commit Graph

437 Commits

Author SHA1 Message Date
Collecting
9bccbc5a1e fix(rev): Mistakenly placed 12 instead of 15
Signed-off-by: Collecting <collecting@noreply.localhost>
2026-01-14 04:03:51 +00:00
Collecting
c36557be77 audio/am: Improve audio effect versioning
Signed-off-by: Collecting <collecting@noreply.localhost>
2026-01-14 03:35:34 +00:00
Collecting
94c37e52e8 audio/am: Improve audio effect versioning
Signed-off-by: Collecting <collecting@noreply.localhost>
2026-01-14 02:45:30 +00:00
Collecting
b7d8bf3751 audio/am: Improve audio effect versioning
Signed-off-by: Collecting <collecting@noreply.localhost>
2026-01-14 02:44:28 +00:00
Collecting
b10dcde92b audio/am: Improve audio effect versioning
Signed-off-by: Collecting <collecting@noreply.localhost>
2026-01-14 02:42:44 +00:00
Collecting
3f1eff1d34 audio/am: Improve audio effect versioning
Signed-off-by: Collecting <collecting@noreply.localhost>
2026-01-14 02:41:12 +00:00
Zephyron
f1dce2578e audio_core: Add Audio Renderer REV12 and REV13 support
Implements support for Audio Renderer revisions 12 and 13, adding:
- REV12: Splitter biquad filter support with fixed-point coefficients
- REV13: Explicit splitter previous volume reset and compressor statistics

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2026-01-03 15:14:44 +10:00
Zephyron
5fbfc6693b audio_core: Fix reverb effect causing extreme noise on Windows
Fixed multiple bugs in reverb processing:
- Early gains for stereo channels not being assigned (missing *=)
- Incorrect TapOut pointer arithmetic (extra +1 offset)
- Uninitialized input pointer causing crashes
- Missing state initialization check
- SetDelay not called during parameter updates

Co-authored-by: MaranBr <maranbr@outlook.com>
Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-12-17 16:41:59 +10:00
Zephyron
b5a82bcfdc fix(audio): biquad filter effect parameter version 2 handling
Fix ParameterVersion2 structure layout to match actual format:
- Add padding and use f32 for coefficients (was incorrectly using s16)
- Update state field offset from 0x17 to 0x25

Update command generation to:
- Read from correct structure based on version
- Convert float coefficients to fixed-point Q2.14 when using version 2

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-12-06 15:31:24 +10:00
Zephyron
c8b3f0c98c Fix: Explicit float casts for Android NDK compilation
Add static_cast<f32>() to integer-to-float conversions in audio_core
to satisfy Android NDK's -Werror=implicit-int-float-conversion flag.

Fixes compilation errors in fft.cpp, loudness_calculator.cpp, and
limiter.cpp on Android builds.

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-10-11 18:51:08 +10:00
Zephyron
56dba09e0c feat: REV15 audio renderer + HID fix (v0.8.0)
Complete SDK15 audio implementation with native float biquads.
Fixes TotK 1.4.2 and BotW 1.8.2 boot loops.

- Add REV15 float biquad filter support
- Implement VoiceInParameterV2 (0x188 bytes)
- Add SplitterDestinationV2b with biquad filters
- Fix HID sampling number (double state value)
- Add AudioSnoopManager and AudioSystemManager
- Implement FinalOutputRecorder system
- Add FFT and loudness calculator (ITU-R BS.1770)
- Add full Limiter effect

Resolves boot loops and controller detection in SDK20 games.

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-10-11 14:10:08 +10:00
Zephyron
2fa3501ff4 feat(audio): Add REV13 audio renderer support
- Implement compressor statistics collection and tracking
- Add explicit splitter volume reset functionality
- Implement REV13 audio device notification commands
- Update feature support system to revision 13
- Maintain backward compatibility with older revisions

Resolves REV13 audio renderer feature requirements with proper
Nintendo Switch development practices and SwitchBrew compatibility.

REF: a2c0035013
Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-09-27 10:13:32 +10:00
Zephyron
5871f4b418 revert: af223e445f && 5ed7df1e68
- Needs To Be A Branch

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-09-26 16:55:32 +10:00
Zephyron
7acd55a005 Merge branch 'collecting-main-patch-05267' into 'main'
Audio Stability Fixes

See merge request citron/emulator!51
2025-09-26 15:51:13 +10:00
Zephyron
704c886d3d Merge branch 'collecting-main-patch-77704' into 'main'
Audio Stability Issues

See merge request citron/emulator!50
2025-09-26 15:51:10 +10:00
collecting
97cd9112a1 Audio Stability Fixes 2025-09-26 04:40:01 +00:00
collecting
38a189c0af Audio Stability Issues 2025-09-26 04:30:47 +00:00
collecting
1c48d8fb7d Audio Stability Fixes 2025-09-26 04:27:01 +00:00
Zephyron
5ed7df1e68 audio_core: Implement further Audio REV 15 support for SDK 19.0.0+ compatibility
This commit adds further Audio REV 15 support to enable compatibility with games
compiled against Nintendo Switch SDK 19.0.0 and later versions.

Fixes: Audio compatibility issues with SDK 19.0.0+ games
Resolves: Missing Audio REV 15 feature support
Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-09-25 16:52:04 +10:00
Zephyron
af223e445f feat: Enhance audio renderer with new features and simplify Android UI indicators
Audio Core:
- Add support for splitter previous volume reset (REV 13+)
- Implement new audio processing time limits (REV 14-15)
- Add voice channel resource limits and effect processing v3
- Support float biquad filters for improved audio quality
- Enhance error handling to prevent audio system crashes

Android UI:
- Simplify FPS, RAM, and thermal indicator views
- Remove complex backgrounds and icons for cleaner display
- Reduce view sizes and improve text-based rendering
- Maintain color-coded status indicators for performance metrics

Core System:
- Improve file system save data space handling
- Enhance kernel synchronization error handling
- Add new error modules and result codes
- Fix potential infinite loops in handle operations

These changes improve audio processing capabilities while providing a cleaner,
more performant Android UI experience.

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-09-23 21:26:59 +10:00
Zephyron
45daff11c9 feat(audio): Fix OpenAL auto detection
This commit addresses serveral bugs within the audio service where OpenAL would fail to register the output device to the mapped engine.

- Increase null safety checks for all audio backends (cubeb, sdl2, openal)
- Added failsafe for Device selection

These ensure the audio_renderer can validate calls from the OpenAL engine, Credits to Hayate Yoshida for helping Identify the issue.

Credit: Hayate Yoshida <hayate_yoshida@citron-emu.org>
Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-08-02 20:36:40 +10:00
Boss.sfc
fc480dcb69 fix: CachyOS LTO Compilation
Fix LTO linking issues on CachyOS with GCC 15.x

- Add LTO support to all core library targets (input_common, frontend_common,
  network, shader_recompiler, web_service) that were missing LTO configuration
- Create citron_configure_lto() helper function for consistent LTO handling
- Implement CachyOS-specific detection via /etc/os-release and kernel version
- Apply conservative LTO flags (-flto=auto -ffat-lto-objects) only for
  CachyOS + GCC 15+ to resolve linking errors with newer toolchains
- Other distributions continue using aggressive LTO settings for maximum performance
- Disable LTO on executable targets to prevent main function optimization issues

This resolves "undefined symbol" errors when building with -DCITRON_ENABLE_LTO=ON
on CachyOS while maintaining optimal LTO performance on other distributions.

Fixes linking errors including:
- Core::Frontend::EmuWindow symbols
- Core::System methods
- Settings::values
- Common logging functions

Tested on CachyOS with GCC 15.1.1 + LLD 20.1.8

Signed-off-by: Boss.sfc <boss.sfc@citron-emu.org>
2025-07-22 21:37:37 +07:00
Zephyron
9e49ff3897 Revert "audio_core: Improve audio renderer compatibility and error handling"
This reverts commit c8aeab799d.
2025-06-23 19:15:09 +10:00
Zephyron
39ed0afa1f Revert "Implement IApplicationFunctions function 210 (RequestToAcquireUserUsedMemory)"
This reverts commit 1471d150d0.
2025-06-23 19:14:23 +10:00
Zephyron
1471d150d0 Implement IApplicationFunctions function 210 (RequestToAcquireUserUsedMemory) 2025-06-20 15:52:14 +10:00
Zephyron
c8aeab799d audio_core: Improve audio renderer compatibility and error handling
- Change mix size mismatch from error to warning with recovery
- Adjust input pointer when consumed size doesn't match header size
  to prevent desync and allow processing to continue
- Expand VoiceInfo::InParameter struct by 24 bytes (0x170 -> 0x188)
  to support newer audio renderer versions
- Update static_assert to reflect new structure size

This improves compatibility with games that use newer audio renderer versions or have slight structural differences.

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-06-16 17:24:58 +10:00
Zephyron
abf5f6730b audio_core: Add OpenAL audio backend support
- Add complete OpenAL sink implementation with robust error handling
- Support for device enumeration using ALC extensions
- Implement dummy streams for graceful degradation when OpenAL fails
- Add proper audio threading and buffer management
- Include comprehensive logging and diagnostic information
- Add stream limits and retry mechanisms for stability

Additional changes:
- Add ENABLE_OPENAL CMake option and OpenAL dependency management
- Include openal-soft in vcpkg dependencies
- Add OpenAL to audio engine settings enum

The OpenAL backend provides an alternative audio solution alongside
existing Cubeb and SDL2 backends, with enhanced device compatibility
and improved error recovery mechanisms.

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-06-01 15:26:55 +10:00
Zephyron
1196001e08 audio_core: Update CurrentRevision from 11 to 15
Updates the audio core revision number to match newer firmware requirements, allowing the emulator to properly handle audio features from more recent Switch software.

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-05-07 18:52:16 +10:00
Zephyron
b2d9cf4a01 chore: update project branding to CITRON
Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-05-06 16:11:33 +10:00
Zephyron
5e16e20427 chore: update project branding to Citron
Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-05-06 16:08:59 +10:00
Zephyron
bfb82e577c chore: update project branding to citron
Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-05-06 16:06:48 +10:00
Liam
964e19ab56 oboe_sink: handle temporary stream creation failure 2024-02-23 10:30:52 -05:00
Liam
2c00599a53 audio: fix released buffer bounds check 2024-02-22 20:20:31 -05:00
Liam
2e4a6b7f92 audio: format 2024-02-20 22:51:39 -05:00
Liam
c575a85233 audio: rewrite IAudioDevice 2024-02-20 22:15:38 -05:00
Liam
ea4703cb31 audio: rewrite IHardwareOpusDecoderManager 2024-02-20 22:15:38 -05:00
Liam
6012c9fe3a audio: rewrite IAudioRendererManager 2024-02-20 22:15:37 -05:00
Liam
a05bd3c47e audio: rewrite IAudioOut 2024-02-20 22:15:37 -05:00
Liam
2a2c92f181 audio: rewrite IAudioInManager 2024-02-20 22:15:37 -05:00
FearlessTobi
310c1f50be scope_exit: Make constexpr
Allows the use of the macro in constexpr-contexts.
Also avoids some potential problems when nesting braces inside it.
2024-02-19 16:00:46 +01:00
liamwhite
90cb852908 Merge pull request #12814 from Kelebek1/time_new_ipc
Move time services to new IPC and add debug printing
2024-01-29 09:08:46 -05:00
Kelebek1
19a2f12692 Use the input process handle to get the correct application's memory 2024-01-28 18:51:43 +00:00
Kelebek1
da410506a4 Move time services to new IPC.
Add some fixes/improvements to usage with the new IPC
2024-01-27 03:30:09 +00:00
Fernando Sahmkow
590d9b7e1d Core: Clang format and other small issues. 2024-01-18 21:12:30 -05:00
Fernando Sahmkow
0a2536a0df SMMU: Initial adaptation to video_core. 2024-01-18 21:12:30 -05:00
Viktor Szépe
90ab89a0b0 Merge remote-tracking branch 'origin/master' into typos3 2024-01-16 00:09:00 +00:00
Viktor Szépe
2044ae6b3a Fix more typos 2024-01-15 23:26:53 +00:00
Liam
d940974789 audio: fetch process object from handle table 2024-01-12 10:03:16 -05:00
Liam
f34d3d7e84 core_timing: remove user data value 2023-12-23 15:36:44 -05:00
Fernando S
d61df0f400 Merge pull request #12387 from liamwhite/oboe
android: add oboe audio sink
2023-12-19 16:15:07 +01:00