StreamADPCM: Convert into a namespace
No need to have a class with only static member functions
This commit is contained in:
1 parent
e955a3a191
commit
737de5e115
3 files changed
+22
-16
No files matched your search
@@ -7,6 +7,9 @@
|
||||
#include "Common/MathUtil.h"
|
||||
#include "Core/HW/StreamADPCM.h"
|
||||
|
||||
namespace StreamADPCM
|
||||
{
|
||||
|
||||
// STATE_TO_SAVE (not saved yet!)
|
||||
static s32 histl1;
|
||||
static s32 histl2;
|
||||
@@ -44,7 +47,7 @@ static s16 ADPDecodeSample(s32 bits, s32 q, s32& hist1, s32& hist2)
|
||||
return (s16)cur;
|
||||
}
|
||||
|
||||
void NGCADPCM::InitFilter()
|
||||
void InitFilter()
|
||||
{
|
||||
histl1 = 0;
|
||||
histl2 = 0;
|
||||
@@ -52,7 +55,7 @@ void NGCADPCM::InitFilter()
|
||||
histr2 = 0;
|
||||
}
|
||||
|
||||
void NGCADPCM::DecodeBlock(s16 *pcm, const u8 *adpcm)
|
||||
void DecodeBlock(s16* pcm, const u8* adpcm)
|
||||
{
|
||||
for (int i = 0; i < SAMPLES_PER_BLOCK; i++)
|
||||
{
|
||||
@@ -60,3 +63,5 @@ void NGCADPCM::DecodeBlock(s16 *pcm, const u8 *adpcm)
|
||||
pcm[i * 2 + 1] = ADPDecodeSample(adpcm[i + (ONE_BLOCK_SIZE - SAMPLES_PER_BLOCK)] >> 4, adpcm[1], histr1, histr2);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user