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>
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>
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>
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>
- 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>
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.
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.
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.