Fix DTK audio not working after loading a savestate
The main problem was that the volume of the mixer wasn't savestated. The volume is typically 0 at the beginning of a game, so loading a savestate at the beginning of a game would lead to silent DTK audio. I also added savestating to StreamADPCM.cpp.
This commit is contained in:
1 parent
5e70af1ce5
commit
b00ef39c1c
7 files changed
+38
-2
No files matched your search
@@ -6,12 +6,13 @@
|
||||
|
||||
#include "Core/HW/StreamADPCM.h"
|
||||
|
||||
#include "Common/ChunkFile.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/MathUtil.h"
|
||||
|
||||
namespace StreamADPCM
|
||||
{
|
||||
// STATE_TO_SAVE (not saved yet!)
|
||||
// STATE_TO_SAVE
|
||||
static s32 histl1;
|
||||
static s32 histl2;
|
||||
static s32 histr1;
|
||||
@@ -56,6 +57,14 @@ void InitFilter()
|
||||
histr2 = 0;
|
||||
}
|
||||
|
||||
void DoState(PointerWrap& p)
|
||||
{
|
||||
p.Do(histl1);
|
||||
p.Do(histl2);
|
||||
p.Do(histr1);
|
||||
p.Do(histr2);
|
||||
}
|
||||
|
||||
void DecodeBlock(s16* pcm, const u8* adpcm)
|
||||
{
|
||||
for (int i = 0; i < SAMPLES_PER_BLOCK; i++)
|
||||
|
||||
Reference in new issue
Block a user