aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Audio/Renderer/Dsp
AgeCommit message (Collapse)Author
2023-04-27Move solution and projects to srcTSR Berry
2023-03-04Minor code formatting (#4498)gdkchan
2023-02-21Use SIMD acceleration for audio upsampler (#4410)Logan Stromberg
* Use SIMD acceleration for audio upsampler filter kernel for a moderate speedup * Address formatting. Implement AVX2 fast path for high quality resampling in ResamplerHelper * now really, are we really getting the benefit of inlining 50+ line methods? * adding unit tests for resampler + upsampler. The upsampler ones fail for some reason * Fixing upsampler test. Apparently this algo only works at specific ratios --------- Co-authored-by: Logan Stromberg <lostromb@microsoft.com>
2023-01-20Audio: Implement PCM24 output (#4321)merry
2023-01-15Audren: Implement polyphase upsampler (#4256)merry
* Audren: Implement polyphase upsampler * prefer shifting to modulo * prefer MathF * fix nits * rm ResampleForUpsampler * oop * Array20 * nits
2022-12-28haydn: Add support for PCMFloat, PCM32 and PCM8 conversions (#4100)Mary-nyan
* haydn: Add support for PCMFloat, PCM32 and PCM8 conversions This adds support in the compatibility layer for other sample format than PCM16. This should help extends compatibility with soundio on devices that doesn't expose PCM16. I ommited PCM24 conversion for now as it's not simplest of all. * Address TSRBerry's comment * Address comments * Fix conversion issue and clean up saturation usage * Revert saturation changes * Address gdkchan's comment
2022-12-06amadeus: Add missing compressor effect from REV11 (#4010)Mary-nyan
* amadeus: Add missing compressor effect from REV11 This was in my reversing notes but seems I completely forgot to implement it Also took the opportunity to simplify the Limiter effect a bit. * Remove some outdated comment * Address gdkchan's comments
2022-12-02amadeus: Fix wrong SendCommands logic (#3969)Mary-nyan
* amadeus: Fix wrong SendCommands logic Might help with audio desync, might cause audio stutters, will see! * Address gdkchan's comment
2022-11-28amadeus: Fixes and initial 15.0.0 support (#3908)Mary-nyan
* amadeus: Allow OOB read of GC-ADPCM coefficients Fixes "Ninja Gaiden Sigma 2" and possibly "NINJA GAIDEN 3: Razor's Edge" * amadeus: Fix wrong variable usage in delay effect We should transform the delay line values, not the input. * amadeus: Update GroupedBiquadFilterCommand documentation * amadeus: Simplify PoolMapper alignment checks * amadeus: Update Surround delay effect matrix to REV11 * amadeus: Add drop parameter support and use 32 bits integers for estimate time Also implement accurate ExecuteAudioRendererRendering stub. * Address gdkchan's comments * Address gdkchan's other comments * Address gdkchan's comment
2022-08-18Removed unused usings. (#3593)Nicholas Rodine
* Removed unused usings. * Added back using, now that it's used. * Removed extra whitespace.
2022-08-11Rename ToSpan to AsSpan (#3556)gdkchan
2022-07-25misc: Reformat Ryujinx.Audio with dotnet-format (#3485)Mary-nyan
This is the first commit of a series of reformat around the codebase as discussed internally some weeks ago. This project being one that isn't touched that much, it shouldn't cause conflict with any opened PRs.
2022-07-08misc: Relicense Ryujinx.Audio under the terms of the MIT license (#3449)Mary
* Ryujinx.Audio: Remove BOM from files * misc: Relicense Ryujinx.Audio under the terms of the MIT license With the approvals of all the Ryujinx.Audio contributors, this commit changes Ryujinx.Audio license from LGPLv3 to MIT.
2022-04-08amadeus: Improve and fix delay effect processing (#3205)Mary
* amadeus: Improve and fix delay effect processing This rework the delay effect processing by representing calculation with the appropriate matrix and by unrolling some loop in the code. This allows better optimization by the JIT while making it more readeable. Also fix a bug in the Surround code path found while looking back at my notes. * Remove useless GetHashCode * Address gdkchan's comments
2022-04-06amadeus: Update to REV11 (#3230)Mary
This should implement all ABI changes from REV11 on 14.0.0 As Nintendo changed the channel disposition for "legacy" effects (Delay, Reverb and Reverb 3D) to match the standard channel mapping, I took the liberty to just remap to the old disposition for now. The proper changes will be handled at a later date with a complete rewriting of those 3 effects to be more readable (see https://github.com/Ryujinx/Ryujinx/pull/3205 for the first iteration of it).
2022-02-22Collapse AsSpan().Slice(..) calls into AsSpan(..) (#3145)Berkan Diler
* Collapse AsSpan().Slice(..) calls into AsSpan(..) Less code and a bit faster * Collapse an Array.Clear(array, 0, array.Length) call to Array.Clear(array)
2022-02-17Use a basic cubic interpolation for the audren upsampler (#3129)riperiperi
Before, it was selecting nearest neighbour, which sounded terrible. This is likely temporary til the upsampling algorithm used by the switch is reversed. Fixes bad audio in Skyward Sword HD.
2022-02-16amadeus: Fix PCMFloat datasource command v1 (#3127)Mary
Really simple copy pasta error here. Shouldn't affect anything as float support was added at the same REV as datasource command v2.
2022-02-16amadeus: Fix limiter correctness (#3126)Mary
This fixes missing audio on Nintendo Switch Sports Online Play Test.
2022-01-23amadeus: Fix possible device sink input out of bound (#3032)Mary
This fix an out of bound when indexing inputs for games that uses unsupported values (8 here) Close #2724.
2021-12-23UI - Add Volume Controls + Mute Toggle (F2) (#2871)sharmander
* Add the ability to toggle mute in the status bar. * Add the ability to toggle mute in the status bar. * Formatting fixes * Add hotkey (F2) to mute * Add default hotkey to config.json * Add ability to change volume via slider. * Fix Headless * Fix SDL2 Problem : Credits to d3xMachina * Remove unnecessary work * Address gdk comments * Toggling with Hotkey now properly restores volume to original level. * Toggling with Hotkey now properly restores volume to original level. * Update UI to show Volume % instead of Muted/Unmuted * Clean up the volume ui a bit. * Undo unintentionally committed code. * Implement AudRen Support * Restore intiial volume level in function definition. * Finalize UI * Finalize UI * Use clamp for bounds check * Use Math.Clamp for volume in soundio * Address comments by gdkchan * Address remaining comments * Fix missing semicolon * Address remaining gdkchan comment * Fix comment * Change /* to // * Allow volume slider to change volume immediately. Also force label text to cast to int to prevent decimals from showing in status bar * Remove blank line * Undo setting of volume level when "Cancel" is pressed. * Fix allignment for settings window code
2021-09-19amadeus: Update to REV10 (#2654)Mary
* amadeus: Update to REV10 This implements all the changes made with REV10 on 13.0.0. * Address Ack's comment * Address gdkchan's comment
2021-09-11Implement a "Pause Emulation" option & hotkey (#2428)mpnico
* Add a "Pause Emulation" option and hotkey Closes Ryujinx#1604 * Refactoring how pause is handled * Applied suggested changes from review * Applied suggested fixes * Pass correct suspend type to threads for suspend/resume * Fix NRE after stoping emulation * Removing SimulateWakeUpMessage call after resuming emulation * Skip suspending non game process * Pause the tickCounter in the ExecutionContext * Refactoring tickCounter pause/resume as suggested * Fix Config migration to add pause hotkey * Fixed pausing only application threads * Fix exiting emulator while paused * Avoid pause/resume while already paused/resumed * Cleanup unused code * Avoid restarting audio if stopping emulation while in pause. * Added suggested changes * Fix ConfigurationState
2021-07-18Amadeus: DSP code generation improvements (#2460)Mary
This improve RyuJIT codegen drastically on the DSP side. This may reduce CPU usage of the DSP thread quite a lot.
2021-05-25amadeus: Update to REV9 (#2309)Mary
* amadeus: Update to REV9 This implements all the changes made with REV9 on 12.0.0. * Address Ac_k's comments
2021-04-18Amadeus: Fix low pass base gain related issues on delay effect in mono (#2224)Mary
This adds missing parenthesis around low pass z computation. This fixes FEZ audio gain issues inside rooms. (Ryujinx/Ryujinx-Games-List#3526)
2021-04-18Amadeus: Allow out of bound read on empty delay lines (#2223)Mary
This allows to handle an OOB with delay lines when DelayTimeMax = 0. On real hardware, it will end up reading garbage at the given user work buffer address. As we do not use those buffers and allocate them ourself for simplicy, this could possibly cause a crash. Proposed solution here is to only increase the size of _workBuffer by one like what is done in DelayLineReverb3d already. This fixes FEZ. (Ryujinx/Ryujinx-Games-List#3526)
2021-03-02Amadeus: Add ARM SIMD fast path (#2069)Mary
Add fast paths in the audio renderer for AArch64 in all current fast paths.
2021-02-26Haydn: Part 1 (#2007)Mary
* Haydn: Part 1 Based on my reverse of audio 11.0.0. As always, core implementation under LGPLv3 for the same reasons as for Amadeus. This place the bases of a more flexible audio system while making audout & audin accurate. This have the following improvements: - Complete reimplementation of audout and audin. - Audin currently only have a dummy backend. - Dramatically reduce CPU usage by up to 50% in common cases (SoundIO and OpenAL). - Audio Renderer now can output to 5.1 devices when supported. - Audio Renderer init its backend on demand instead of keeping two up all the time. - All backends implementation are now in their own project. - Ryujinx.Audio.Renderer was renamed Ryujinx.Audio and was refactored because of this. As a note, games having issues with OpenAL haven't improved and will not because of OpenAL design (stopping when buffers finish playing causing possible audio "pops" when buffers are very small). * Update for latest hexkyz's edits on Switchbrew * audren: Rollback channel configuration changes * Address gdkchan's comments * Fix typo in OpenAL backend driver * Address last comments * Fix a nit * Address gdkchan's comments