diff options
Diffstat (limited to 'src/audio_core/delay_line.h')
| -rw-r--r-- | src/audio_core/delay_line.h | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/src/audio_core/delay_line.h b/src/audio_core/delay_line.h deleted file mode 100644 index 05fda536f..000000000 --- a/src/audio_core/delay_line.h +++ /dev/null | |||
| @@ -1,49 +0,0 @@ | |||
| 1 | // SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | #pragma once | ||
| 5 | |||
| 6 | #include "common/common_types.h" | ||
| 7 | |||
| 8 | namespace AudioCore { | ||
| 9 | |||
| 10 | class DelayLineBase { | ||
| 11 | public: | ||
| 12 | DelayLineBase(); | ||
| 13 | ~DelayLineBase(); | ||
| 14 | |||
| 15 | void Initialize(s32 max_delay_, float* src_buffer); | ||
| 16 | void SetDelay(s32 new_delay); | ||
| 17 | s32 GetDelay() const; | ||
| 18 | s32 GetMaxDelay() const; | ||
| 19 | f32 TapOut(s32 last_sample); | ||
| 20 | f32 Tick(f32 sample); | ||
| 21 | float* GetInput(); | ||
| 22 | const float* GetInput() const; | ||
| 23 | f32 GetOutputSample() const; | ||
| 24 | void Clear(); | ||
| 25 | void Reset(); | ||
| 26 | |||
| 27 | protected: | ||
| 28 | float* buffer{nullptr}; | ||
| 29 | float* buffer_end{nullptr}; | ||
| 30 | s32 max_delay{}; | ||
| 31 | float* input{nullptr}; | ||
| 32 | float* output{nullptr}; | ||
| 33 | s32 delay{}; | ||
| 34 | }; | ||
| 35 | |||
| 36 | class DelayLineAllPass final : public DelayLineBase { | ||
| 37 | public: | ||
| 38 | DelayLineAllPass(); | ||
| 39 | ~DelayLineAllPass(); | ||
| 40 | |||
| 41 | void Initialize(u32 delay, float coeffcient_, f32* src_buffer); | ||
| 42 | void SetCoefficient(float coeffcient_); | ||
| 43 | f32 Tick(f32 sample); | ||
| 44 | void Reset(); | ||
| 45 | |||
| 46 | private: | ||
| 47 | float coefficient{}; | ||
| 48 | }; | ||
| 49 | } // namespace AudioCore | ||