Commit Graph

679 Commits

Author SHA1 Message Date
Dentomologist d627b78c46 Adjust order and spacing of various #includes
Move some #includes around to match the Contributing guidelines.
2024-07-26 14:28:34 -07:00
Tillmann Karras 1d8b1715ab AudioCommon: unlock mutex explicitly to avoid -Wunused-result warning 2024-06-20 02:25:15 +01:00
JosJuice a3c23353c0 Android: Implement OpenSLESStream::SetRunning 2024-06-04 19:32:04 +02:00
Dentomologist 9c5605a59c AudioCommon: When ALSA is absent on Linux, default to Cubeb backend
Default to Cubeb instead of the NULL backend on Linux when ALSA isn't
valid.
2024-04-16 14:06:28 -07:00
Brad Smith ba2ccf3889 Set default sound backend on OpenBSD to cubeb
Set the default sound backend to cubeb instead of the default
being none.
2024-04-14 18:47:20 -04:00
Tillmann Karras d933e58d9a Cubeb: check correct log level 2024-03-17 01:33:42 +00:00
Tillmann Karras 4d9038c7c3 Cubeb: change log level from NOTICE to INFO
Cubeb logs a message at CUBEB_LOG_NORMAL verbosity every time you start
or stop a stream which can get a bit annoying when using frame advance
at Dolphin's default verbosity.
2024-03-14 00:31:02 +00:00
JosJuice 7197e3abd0 Use structs for config callback IDs
This way you can't mix up regular config callback IDs and CPU thread
config callback IDs. (It would be rather bad if you did!)
2023-08-17 19:19:26 +02:00
Martino Fontana b5be399fd4 cubeb: Change name to "Dolphin Emulator"
To avoid conflicts with KDE's file manager.
2023-07-22 23:12:34 +02:00
Admiral H. Curtiss fa81006b51
Merge pull request #11955 from TellowKrinkle/CMakeDependencies
CMake: Allow ignoring system packages
2023-06-30 19:06:04 +02:00
get ffabb6c57b Replace std::ostringstream usage with fmt::format 2023-06-18 18:37:32 -05:00
TellowKrinkle 5b10a80401 CMake: Use targets for all optionally-external dependencies 2023-06-15 01:41:41 -05:00
Lioncash 0f326c6067 Common: Move FixedSizeQueue into Common namespace
Gets this out of the global namespace.
2023-03-22 01:23:15 -04:00
Joshua de Reeper f27e8216a5 Skylander Portal: Play Trap Team Audio
Asserts and length handling
2023-03-13 13:01:48 +13:00
Scott Mansell 7c4fcc30a3 WorkQueueThread: provide name and function at same time 2023-02-04 15:56:27 +13:00
Admiral H. Curtiss 8edca2039e
Merge pull request #10947 from Zopolis4/opensleuth
Restrict OpenSLES to Android via CMake
2023-01-30 09:02:45 +01:00
Shawn Hoffman c338f9e2a1 windows: replace comdef dependency with winrt 2023-01-23 06:09:01 -08:00
Sam Belliveau bc1cc9eeb4 CoreTiming: Throttle Before Every Event Using Chrono 2023-01-06 17:21:17 -05:00
Sam Belliveau 673f81c18a New FrameTime/VBlank Analyzer + Graph 2022-12-23 19:52:53 -05:00
Admiral H. Curtiss 64bb9ae9a9
Correctly call CoUninitialize() on Cubeb helper class destruction. 2022-11-27 03:58:50 +01:00
Admiral H. Curtiss e085bf14f9
Core: Use extra thread for Cubeb on Windows to not disturb the CoInitialize state of whatever thread happens to call a Cubeb function. 2022-11-26 05:05:57 +01:00
Admiral H. Curtiss ca10e92ab9
Core: Abide by COM MTA requirement for cubeb on Windows. Partially based on https://github.com/dolphin-emu/dolphin/pull/8920#discussion_r459746604
Co-authored-by: Michael M <mchtly@gmail.com>
2022-11-26 05:05:56 +01:00
Admiral H. Curtiss 59b1419a8e
Externals: Update cubeb to mozilla/cubeb@773f16b7ea and make it a submodule.
CMakeLists.txt has been extracted and modified a bit to work with Dolphin's typical build settings.
2022-11-26 05:05:52 +01:00
Admiral H. Curtiss 1c63349984
AudioCommon: Pass Core::System to AudioCommon functions. 2022-11-06 02:13:58 +01:00
Pokechu22 6de55e416b WaveFile: Fix size check
`count` is the number of stereo samples to write (where each stereo sample is two shorts), while `BUFFER_SIZE` is the size of the buffer in shorts.  So `count` needs to be multiplied by `2`, not `BUFFER_SIZE`.  Also, when this check was failed, the previous code just clobbered whatever was past the end of the buffer after logging the warning, which corrupted `basename`, eventually resulting in Dolphin crashing.

This affected Datel's Wii-compatible Action Replay, which uses a block size of 2298, or 18384 stereo samples, which is 36768 shorts, which is bigger than the buffer size of 32768. (However, the previous commit means that only one block is transfered at a time, eliminating this issue; fixing the bounds check is just a general safety thing instead of an actual bugfix now.)
2022-10-22 11:44:38 -07:00
Pokechu22 72de74d4fc Mixer: Add assertions regarding num_samples versus buffer length 2022-09-08 12:10:10 -07:00
Pokechu22 abb59a781a Mixer: Use smaller array for PushWiimoteSpeakerSamples 2022-09-08 12:10:02 -07:00
Admiral H. Curtiss c310e504cb
AudioCommon: Move sound stream variables to Core::System. 2022-08-31 21:44:21 +02:00
Zopolis4 e2aefe13a6
Restrict OpenSLES to Android via CMake 2022-08-08 09:18:36 +10:00
Shawn Hoffman f92541fbd9 StripSpaces: only strip spaces
StripWhitespace maintains old behavior
2022-07-25 18:40:12 -07:00
Shawn Hoffman 0a15d2fcec cubeb: fix logged source file paths 2022-07-18 09:52:54 -07:00
CasualPokePlayer 4234b25682 Do not directly store input sample rate, rather just store a divisor for that sample rate, with it using a fixed dividend of 54000000 * 2.
This should reduce (but not completely eliminate) gradual audio desyncs in dumps. This also allows for accurate sample rates for the GameCube.
Completely eliminating gradual audio desyncs will require resampling to an integer sample rate, as nothing seems to support a non-integer sample rate.
2022-07-03 15:07:06 -07:00
CasualPokePlayer ad892176d0 have audio dumps apply volume (fixes cases of audio dumps being "too loud" and in game audio controls having no effect) 2022-06-10 21:27:10 -07:00
Admiral H. Curtiss 580c721c82
cmake: Don't use PCH with Qt6. 2022-05-22 01:19:44 +02:00
Admiral H. Curtiss 36cfcb530f
IOFile: Make origin parameter to Seek() an enum class. 2022-01-29 06:49:21 +01:00
Pokechu22 ca9bf3174f Use HRWrap in remaining locations
Note that D3DCommon can't use DX11HRWrap or DX12HRWrap since it's shared between them.
2022-01-09 12:44:55 -08:00
Admiral H. Curtiss eb5bb2993e
Core/AudioCommon: Add config caching to Mixer. 2022-01-06 16:43:43 +01:00
Admiral H. Curtiss 2aa44b10ba
Config: Port TimingVariance setting to new config system. 2022-01-06 16:13:56 +01:00
Admiral H. Curtiss fb47035f97
Config: Port emulation speed setting to new config system. 2022-01-06 16:13:54 +01:00
Pokechu22 2025763420 Treewide: Adjust order of includes 2021-12-10 14:49:57 -08:00
Mai M 6c72e6814d
Merge pull request #10169 from leoetlino/fmt-localtime
Use fmt::localtime instead of thread-unsafe std::localtime
2021-11-07 00:08:14 -04:00
Pokechu22 04d8cdfe88 Convert LOG_TYPE and LOG_LEVELS to enum class 2021-10-24 11:48:36 -07:00
Léo Lam 8195d0bda1
Merge pull request #10144 from malleoz/dsp-onion
Port Main.DSP to MainSettings
2021-10-16 11:32:38 +02:00
sowens99 8ea6bef98f Port Main.DSP to MainSettings
While trying to work on adding audiodump support for CLI, I was alerted that it was important to first try moving the DSP configs to the new config before continuing, as that makes it substantially easier to write clean code to add such a feature.

This commit aims to allow for Dolphin to only rely on the new config for DSP-related settings.
2021-10-15 23:24:46 -04:00
Léo Lam fd7df2ccae
Use fmt::localtime instead of thread-unsafe std::localtime
fmt::localtime is also less awkward to use compared to std::localtime.
2021-10-15 22:49:13 +02:00
Léo Lam 6bf10e0276
Merge pull request #10149 from malleoz/audiodump-add-timecode
Add Game ID, timecode to dspdump and dtkdump filenames
2021-10-15 19:42:30 +02:00
Pokechu22 78bfd25964 Fix all uninitialized variable warnings (C26495) 2021-10-13 12:32:16 -07:00
sowens99 1d5d896eaa Add timecode to dspdump and dtkdump
Match the same formatting present in framedump filenames.
2021-10-03 18:20:01 -04:00
Tillmann Karras eda2035874 AudioCommon: rename isValid() to IsValid() 2021-08-08 03:05:03 +01:00
Tillmann Karras b6d8c111bc AudioCommon: make SoundLoop() non-virtual and private 2021-08-08 00:15:05 +01:00