diff options
Diffstat (limited to 'src/audio_core/codec.h')
| -rw-r--r-- | src/audio_core/codec.h | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/src/audio_core/codec.h b/src/audio_core/codec.h deleted file mode 100644 index 5a058b368..000000000 --- a/src/audio_core/codec.h +++ /dev/null | |||
| @@ -1,43 +0,0 @@ | |||
| 1 | // SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | #pragma once | ||
| 5 | |||
| 6 | #include <array> | ||
| 7 | #include <vector> | ||
| 8 | |||
| 9 | #include "common/common_types.h" | ||
| 10 | |||
| 11 | namespace AudioCore::Codec { | ||
| 12 | |||
| 13 | enum class PcmFormat : u32 { | ||
| 14 | Invalid = 0, | ||
| 15 | Int8 = 1, | ||
| 16 | Int16 = 2, | ||
| 17 | Int24 = 3, | ||
| 18 | Int32 = 4, | ||
| 19 | PcmFloat = 5, | ||
| 20 | Adpcm = 6, | ||
| 21 | }; | ||
| 22 | |||
| 23 | /// See: Codec::DecodeADPCM | ||
| 24 | struct ADPCMState { | ||
| 25 | // Two historical samples from previous processed buffer, | ||
| 26 | // required for ADPCM decoding | ||
| 27 | s16 yn1; ///< y[n-1] | ||
| 28 | s16 yn2; ///< y[n-2] | ||
| 29 | }; | ||
| 30 | |||
| 31 | using ADPCM_Coeff = std::array<s16, 16>; | ||
| 32 | |||
| 33 | /** | ||
| 34 | * @param data Pointer to buffer that contains ADPCM data to decode | ||
| 35 | * @param size Size of buffer in bytes | ||
| 36 | * @param coeff ADPCM coefficients | ||
| 37 | * @param state ADPCM state, this is updated with new state | ||
| 38 | * @return Decoded stereo signed PCM16 data, sample_count in length | ||
| 39 | */ | ||
| 40 | std::vector<s16> DecodeADPCM(const u8* data, std::size_t size, const ADPCM_Coeff& coeff, | ||
| 41 | ADPCMState& state); | ||
| 42 | |||
| 43 | }; // namespace AudioCore::Codec | ||