Commit Graph

62 Commits

Author SHA1 Message Date
Henrik Rydgård 5685331198 Unrelated sanity checks in audio 2025-09-12 12:17:27 -06:00
Henrik Rydgård 0fa7349f5a Integrate Dolphin's granule based audio resampler.
Removed parts of it that were not relevant.

Working, it seems. Not sure about the buffer size thing.

Not defaulting it for now

See #20146 and https://github.com/dolphin-emu/dolphin/pull/13352

..
2025-08-22 21:21:19 +02:00
Henrik Rydgård 0502d79c99 Remove the return value from NativeMix, correct mixing with other channel numbers than 2 2025-06-18 23:48:00 +02:00
Henrik Rydgård f595e83a44 Add computed buffer latency in ms to StereoResampler stats 2025-06-18 11:39:14 +02:00
Henrik Rydgård 702c84e019 Code style fix in StereoResampler 2025-06-18 11:00:03 +02:00
Henrik Rydgård cf90b24431 Add UI volume setting (affecting navigation sounds and preview audio). Convert alt speed volume into a 100-step percentage. 2025-02-11 17:42:09 -06:00
Henrik Rydgård 9b923b72c1 Refactor audio output, preparing for better volume control 2025-02-11 16:43:29 -06:00
Henrik Rydgård 25bedc44b8 Switch from shift to multiplier for volume in StereoResampler 2025-02-11 15:55:39 -06:00
Henrik Rydgård e93c80db4e Cleaning up our SIMD header includes, using the new header 2024-12-19 16:08:48 +01:00
Henrik Rydgård c91169e702 Restore removed <algorithm> includes.
Turns out these were needed after all. For some reason, on Windows and
Mac, <algorithm> gets auto-included by something else so I don't notice
when it's missing, and MSVC's include dependency tracker doesn't see it
either.
2024-12-19 09:53:07 +01:00
Henrik Rydgård 3e198c53b2 More include cleanup 2024-12-18 13:57:26 +01:00
Henrik Rydgård 4d6905672e Bunch more linting 2024-10-10 11:57:10 +02:00
Henrik Rydgård c3f291e9fe Fix for possible overflow in the resampler (can prevent some audio clicks)
Comment fixes
2024-09-04 12:56:15 +02:00
Henrik Rydgård e01ca5b057 Logging API change (refactor) (#19324)
* Rename LogType to Log

* Explicitly use the Log:: enum when logging. Allows for autocomplete when editing.

* Mac/ARM64 buildfix

* Do the same with the hle result log macros

* Rename the log names to mixed case while at it.

* iOS buildfix

* Qt buildfix attempt, ARM32 buildfix
2024-07-14 14:42:59 +02:00
Henrik Rydgård 349b73acec Move the resampler usage to a common file, AudioCommon. (#17176)
* Move the resampler usage to a common file, AudioCommon.

Ports that don't want to use the resampler can now simply exclude that
file and provide their own implementation. Next up, libretro will be
converted to do it that way.

* Android.mk typo

* libretro makefile fix

* libretro buildfix

* libretro: try a different approach for the temporary solution

* duh

* double duh
2023-03-24 17:19:57 +01:00
Henrik Rydgård e95662cebf Separate out the core interface around the resampler, in order to move it out from __sceAudio. 2023-03-24 14:48:53 +01:00
Unknown W. Brackets 2479d52202 Global: Reduce includes of common headers.
In many places, string, map, or Common.h were included but not needed.
2022-01-30 16:35:33 -08:00
Unknown W. Brackets b1e31d89e1 Audio: Correct protection against time skew. 2021-10-10 15:05:51 -07:00
Unknown W. Brackets 01b99eff98 Audio: Cleanup buffer wrap code.
This is a bit more straight-forward.
2021-10-09 08:17:55 -07:00
Henrik Rydgård a7859cfd2a Fix some comments and a string 2021-08-18 09:28:17 +02:00
Henrik Rydgård 928bc88b01 Rename Unthrottle to Fast-forward globally 2021-08-18 09:28:13 +02:00
Unknown W. Brackets ff9b9f7321 Sas: Add option to control reverb volume.
This also allows you to turn it off.
2021-08-09 20:47:24 -07:00
Unknown W. Brackets 13ec384dbe Build: Explicitly include ppsspp_config.h.
This adds it to all files that use it.  Not all our builds include the
file.
2021-03-02 21:04:03 -08:00
Unknown W. Brackets e2d000cd34 Audio: Avoid left shift when resampling. 2021-01-31 10:42:31 -08:00
Henrik Rydgård 886a8b1ac6 Remove Timer.cpp/h. Move various collections into Common/Data/Collections. 2020-10-05 21:05:23 +02:00
Henrik Rydgård f01ba6dc84 Move NativeApp.h to Common/System, split into NativeApp.h and System.h
Buildfix
2020-10-04 11:42:16 +02:00
Henrik Rydgård 054acf768c Don't cache time in a variable.
A little weirdness in the code that has stuck around for a long, long
time. It's really not necessary and mostly just confusing.
2020-09-24 23:52:43 +02:00
Henrik Rydgård ccc0331279 Move timeutil to Common. (Experiment to see how much work it is to move these). 2020-08-15 20:53:08 +02:00
Henrik Rydgård b43698a13d Remove most instances of base/logging.h from Common, Core, GPU, more 2020-08-15 19:08:44 +02:00
Unknown W. Brackets b8342fb8ec SaveState: Rename ChunkFile files to Serialize.
Makes more sense and less weird than ChunkFileDoMap, etc.
2020-08-10 08:04:05 +00:00
Henrik Rydgård 2ba65c831a Fix minor bug in StereoResampler debug display 2020-05-26 23:10:28 +02:00
Henrik Rydgård 90fd2d9e33 Remove the Audio Resampling setting (now always on). Having it off is not useful because it'll never sync up perfectly over time. 2020-05-17 19:00:48 +02:00
Henrik Rydgård 0692b6dca6 Revert the loop check in StereoResampler, new one could accidentally keep looping when underrun severely (like if emulation stopped). 2020-05-17 18:16:26 +02:00
Henrik Rydgård 67334e4ae7 StereoResampler: Make sure the target buffer size is large enough, taking SYSPROP_AUDIO_FRAMES_PER_BUFFER into account. 2020-05-17 11:46:12 +02:00
Henrik Rydgård f81dfa0171 Rename things to make more sense. 2020-05-17 11:05:53 +02:00
Henrik Rydgård c46424afd6 StereoResampler: Use C++ atomics 2020-05-17 10:21:02 +02:00
Henrik Rydgård 8b5b7d2496 Add some vaguely interesting stats 2020-05-17 10:21:02 +02:00
Henrik Rydgård fce09f1865 Simplify how to get the debug stats from StereoResampler 2020-05-16 19:47:13 +02:00
李通洲 55bb58e13e NativeApp: add System_GetPropertyFloat all the places 2020-02-04 09:20:34 +08:00
Unknown W. Brackets 20ad7f2914 Audio: Track SRC frequency.
sceAudioSetFrequency is kernel mode only, and it sounds like it changes
the audio controller clock (didn't test.)  SRC only affects the SRC
channel.

Currently, this doesn't actually use the sample rate yet, but at least
it's tracked appropriately.
2019-06-30 23:09:46 -07:00
Unknown W. Brackets e4e0cdd0f7 Audio: Add volume for alternate speed.
Fixes #11605.
2019-06-23 13:34:08 -07:00
Henrik Rydgård 2f26297062 Clean up some more ifdefs 2019-05-10 23:25:57 +02:00
driver1998 5072584781 Fix neon headers for MSVC ARM64
MSVC uses arm64_neon.h for ARM64, arm_neon.h is ARM32 only.
2019-05-04 22:45:15 +08:00
Unknown W. Brackets b4496f1975 Core: Move config enums to separate file.
These are a bit strewn about and there are constants that aren't
consistently used, which just adds confusion.
2018-06-23 10:59:18 -07:00
Henrik Rydgård f76e5e70a7 Enable FlushInstructionCache on UWP, it's been allowed finally.
Minor warning fixes, UWP buildfix

Retarget UWP project to latest SDK.
2018-03-20 20:30:33 +01:00
Henrik Rydgård 6a1fa728d8 Remove Globals.h 2017-08-31 17:15:22 +02:00
Henrik Rydgård b3b459507a Neon-optimize the audio s32->s16 packing function 2017-08-15 16:16:25 +02:00
Henrik Rydgard d64f367e1d Assorted warning fixes 2017-03-05 10:52:45 +01:00
Henrik Rydgard dee686b9d4 Add a setting to make the audio buffer sizes bluetooth-friendly on Android.
Replaces #8846
2016-12-01 21:36:44 +01:00
Henrik Rydgard a465104e28 Minor code cleanup in StereoResampler (remove inner class) 2016-09-10 12:17:19 +02:00