mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-11 23:18:57 +01:00
1b3dae918a
Migrates the state to be instance-based as opposed to being a flat namespace. This keeps behavior localized to its own instantiable unit (and forces uses of the class to also be localized, lest they cart around an instance all over the place).
35 lines
528 B
C++
35 lines
528 B
C++
// Copyright 2008 Dolphin Emulator Project
|
|
// Licensed under GPLv2+
|
|
// Refer to the license.txt file included.
|
|
|
|
// 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;
|
|
};
|
|
}
|