diff options
Diffstat (limited to 'src/audio_core/hle/common.h')
| -rw-r--r-- | src/audio_core/hle/common.h | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/src/audio_core/hle/common.h b/src/audio_core/hle/common.h deleted file mode 100644 index 7fbc3ad9a..000000000 --- a/src/audio_core/hle/common.h +++ /dev/null | |||
| @@ -1,34 +0,0 @@ | |||
| 1 | // Copyright 2016 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #pragma once | ||
| 6 | |||
| 7 | #include <algorithm> | ||
| 8 | #include <array> | ||
| 9 | #include "common/common_types.h" | ||
| 10 | |||
| 11 | namespace DSP { | ||
| 12 | namespace HLE { | ||
| 13 | |||
| 14 | constexpr int num_sources = 24; | ||
| 15 | constexpr int samples_per_frame = 160; ///< Samples per audio frame at native sample rate | ||
| 16 | |||
| 17 | /// The final output to the speakers is stereo. Preprocessing output in Source is also stereo. | ||
| 18 | using StereoFrame16 = std::array<std::array<s16, 2>, samples_per_frame>; | ||
| 19 | |||
| 20 | /// The DSP is quadraphonic internally. | ||
| 21 | using QuadFrame32 = std::array<std::array<s32, 4>, samples_per_frame>; | ||
| 22 | |||
| 23 | /** | ||
| 24 | * This performs the filter operation defined by FilterT::ProcessSample on the frame in-place. | ||
| 25 | * FilterT::ProcessSample is called sequentially on the samples. | ||
| 26 | */ | ||
| 27 | template <typename FrameT, typename FilterT> | ||
| 28 | void FilterFrame(FrameT& frame, FilterT& filter) { | ||
| 29 | std::transform(frame.begin(), frame.end(), frame.begin(), | ||
| 30 | [&filter](const auto& sample) { return filter.ProcessSample(sample); }); | ||
| 31 | } | ||
| 32 | |||
| 33 | } // namespace HLE | ||
| 34 | } // namespace DSP | ||