summaryrefslogtreecommitdiff
path: root/src/audio_core/hle/common.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/audio_core/hle/common.h')
-rw-r--r--src/audio_core/hle/common.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/audio_core/hle/common.h b/src/audio_core/hle/common.h
index 596b67eaf..8e7e5c3cd 100644
--- a/src/audio_core/hle/common.h
+++ b/src/audio_core/hle/common.h
@@ -13,23 +13,22 @@ namespace DSP {
13namespace HLE { 13namespace HLE {
14 14
15constexpr int num_sources = 24; 15constexpr int num_sources = 24;
16constexpr int samples_per_frame = 160; ///< Samples per audio frame at native sample rate 16constexpr int samples_per_frame = 160; ///< Samples per audio frame at native sample rate
17 17
18/// The final output to the speakers is stereo. Preprocessing output in Source is also stereo. 18/// The final output to the speakers is stereo. Preprocessing output in Source is also stereo.
19using StereoFrame16 = std::array<std::array<s16, 2>, samples_per_frame>; 19using StereoFrame16 = std::array<std::array<s16, 2>, samples_per_frame>;
20 20
21/// The DSP is quadraphonic internally. 21/// The DSP is quadraphonic internally.
22using QuadFrame32 = std::array<std::array<s32, 4>, samples_per_frame>; 22using QuadFrame32 = std::array<std::array<s32, 4>, samples_per_frame>;
23 23
24/** 24/**
25 * This performs the filter operation defined by FilterT::ProcessSample on the frame in-place. 25 * This performs the filter operation defined by FilterT::ProcessSample on the frame in-place.
26 * FilterT::ProcessSample is called sequentially on the samples. 26 * FilterT::ProcessSample is called sequentially on the samples.
27 */ 27 */
28template<typename FrameT, typename FilterT> 28template <typename FrameT, typename FilterT>
29void FilterFrame(FrameT& frame, FilterT& filter) { 29void FilterFrame(FrameT& frame, FilterT& filter) {
30 std::transform(frame.begin(), frame.end(), frame.begin(), [&filter](const auto& sample) { 30 std::transform(frame.begin(), frame.end(), frame.begin(),
31 return filter.ProcessSample(sample); 31 [&filter](const auto& sample) { return filter.ProcessSample(sample); });
32 });
33} 32}
34 33
35} // namespace HLE 34} // namespace HLE