Commit graph

8 commits

Author SHA1 Message Date
Tobias f0e3637c7a
codec: Make lookup table static constexpr (#5572)
Allows compilers to elide needing to push these values on the stack
every time the function is called.

Co-authored-by: Lioncash <mathew1800@gmail.com>
2020-12-07 16:05:45 +01:00
tgsm a400e49338 audio_core: use nested namespaces 2019-02-17 23:41:48 -05:00
Weiyi Wang 7d8f115185 Prefix all size_t with std::
done automatically by executing regex replace `([^:0-9a-zA-Z_])size_t([^0-9a-zA-Z_])` -> `$1std::size_t$2`
2018-09-06 16:03:28 -04:00
MerryMage ab3d53131a audio_core: Remove global state 2018-02-03 15:15:17 +00:00
Subv d7459354f5 Audio: Use std::deque instead of std::vector for the audio buffer type (StereoBuffer16).
The current code inserts and deletes elements from the beginning of the audio buffer, which is very inefficient in an std::vector.

Profiling was done using VisualStudio2017's Performance Analyzer in Super Mario 3D Land.

Before this change: AudioInterp::Linear had 14.14% of the runtime (inclusive) and most of that time was spent in std::vector's insert implementation.
After this change: AudioInterp::Linear has 0.36% of the runtime (inclusive)
2017-09-25 18:31:37 -05:00
Emmanuel Gil Peyrot ebdae19fd2 Remove empty newlines in #include blocks.
This makes clang-format useful on those.

Also add a bunch of forgotten transitive includes, which otherwise
prevented compilation.
2016-09-21 11:15:47 +09:00
Emmanuel Gil Peyrot dc8479928c Sources: Run clang-format on everything. 2016-09-18 09:38:01 +09:00
MerryMage efd1c3f8c3 DSP: Implement audio codecs (PCM8, PCM16, ADPCM) 2016-03-24 03:46:59 +00:00