dolphin/Source/Core/Core/HW/StreamADPCM.h
Pierre Bourdon e149ad4f0a
treewide: convert GPLv2+ license info to SPDX tags
SPDX standardizes how source code conveys its copyright and licensing
information. See https://spdx.github.io/spdx-spec/1-rationale/ . SPDX
tags are adopted in many large projects, including things like the Linux
kernel.
2021-07-05 04:35:56 +02:00

34 lines
531 B
C++

// Copyright 2008 Dolphin Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
// Adapted from in_cube by hcs & destop
#pragma once
#include "Common/CommonTypes.h"
class PointerWrap;
namespace StreamADPCM
{
enum
{
ONE_BLOCK_SIZE = 32,
SAMPLES_PER_BLOCK = 28
};
class ADPCMDecoder
{
public:
void ResetFilter();
void DoState(PointerWrap& p);
void DecodeBlock(s16* pcm, const u8* adpcm);
private:
s32 m_histl1 = 0;
s32 m_histl2 = 0;
s32 m_histr1 = 0;
s32 m_histr2 = 0;
};
} // namespace StreamADPCM