summaryrefslogtreecommitdiff
path: root/Source/Core/AudioCommon/WaveFile.cpp
AgeCommit message (Collapse)Author
2026-01-25Remove unused importsMartino Fontana
Yellow squiggly lines begone! Done automatically on .cpp files through `run-clang-tidy`, with manual corrections to the mistakes. If an import is directly used, but is technically unnecessary since it's recursively imported by something else, it is *not* removed. The tool doesn't touch .h files, so I did some of them by hand while fixing errors due to old recursive imports. Not everything is removed, but the cleanup should be substantial enough. Because this done on Linux, code that isn't used on it is mostly untouched. (Hopefully no open PR is depending on these imports...)
2025-06-01WaveFile: Add m_ prefix to member variablesDentomologist
2024-07-26Adjust order and spacing of various #includesDentomologist
Move some #includes around to match the Contributing guidelines.
2023-06-18Replace std::ostringstream usage with fmt::formatget
2022-10-22WaveFile: Fix size checkPokechu22
`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-07-03Do not directly store input sample rate, rather just store a divisor for ↵CasualPokePlayer
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-06-10have audio dumps apply volume (fixes cases of audio dumps being "too loud" ↵CasualPokePlayer
and in game audio controls having no effect)
2022-01-29IOFile: Make origin parameter to Seek() an enum class.Admiral H. Curtiss
2021-10-15Port Main.DSP to MainSettingssowens99
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-07-05treewide: convert GPLv2+ license info to SPDX tagsPierre Bourdon
SPDX standardizes how source code conveys its copyright and licensing information. See https://spdx.github.io/spdx-spec/1-rationale/ . SPDX tags are adopted in many large projects, including things like the Linux kernel.
2021-01-27rename Common/File to Common/IOFileShawn Hoffman
2020-11-27AudioCommon: Convert alerts over to fmt-based variantsLioncash
Continues the migration over to fmt Converts two panic alerts into error logs, since they aren't really things a user can do anything about.
2019-12-29Use std::istringstream or std::ostringstream instead of std::stringstream ↵David Korth
where possible. This removes std::iostream from the inheritance chain, which reduces overhead slightly.
2017-06-15Move IOFile to a separate fileJosJuice
Reduces the number of files that need to be recompiled when making changes to FileUtil.h.
2017-03-03Common: Move byte swapping utilities into their own headerLioncash
This moves all the byte swapping utilities into a header named Swap.h. A dedicated header is much more preferable here due to the size of the code itself. In general usage throughout the codebase, CommonFuncs.h was generally only included for these functions anyway. These being in their own header avoids dumping the lesser used utilities into scope. As well as providing a localized area for more utilities related to byte swapping in the future (should they be needed). This also makes it nicer to identify which files depend on the byte swapping utilities in particular. Since this is a completely new header, moving the code uncovered a few indirect includes, as well as making some other inclusions unnecessary.
2017-01-08Add Silent Audio Dumping INI OptionChris Burgener
2016-12-17Display warning when dumping audio if file existsChris Burgener
2016-11-27Remove unnecessary ConfigManager includesLéo Lam
Making changes to ConfigManager.h has always been a pain, because it means rebuilding half of Dolphin, since a lot of files depend on and include this header. However, it turns out some includes are unnecessary. This commit removes ConfigManager includes from files which don't contain SConfig or GPUDeterminismMode or GPU_DETERMINISM (which means the ConfigManager include is not used). (I've also had to get rid of some indirect includes.)
2016-10-07Fix missing includesLéo Lam
Aren't indirect includes great?
2016-07-01Remove AddStereoSample functionChris Burgener
2016-06-24Split Audio Dumps on Sample Rate ChangesChris Burgener
2016-06-24Reformat all the things. Have fun with merge conflicts.Pierre Bourdon
2015-12-02WaveFile: Get rid of an explicit deleteLioncash
2015-09-26Common: Remove other Common prefixed headers from Common.hLioncash
2015-05-25Set copyright year to when a file was createdTillmann Karras
2015-05-25Update license headers to GPLv2+Tillmann Karras
2015-02-25Formatting/Whitespace CleanupStevoisiak
Various fixes to formatting and whitespace
2014-10-15Flipped Wave File ChannelsFog
This change was done because with the previous method of dumping audio, the mixer would handle switching the RL being emitted by the DSP to LR, and thus would provide the proper channel orientation. Because we're now dumping directly from PushSamples() and PushStreamingSamples(), it was writing the right channel to the left channel of the wave file and vice versa.
2014-09-08Include CommonTypes.h instead of Common.h.Rohit Nirmal
2014-03-14Kill off some usages of c_str.Lioncash
Also changes some function params, but this is ok. Some simplifications were also able to be made (ie. killing off strcmps with ==, etc).
2014-03-09clang-modernize -use-nullptrTillmann Karras
and s/\bNULL\b/nullptr/g for *.cpp/h/mm files not compiled on my machine
2014-02-18Convert all includes to relative paths.Lioncash
2013-12-31Remove unnecessary Src/ foldersJasper St. Pierre