mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 00:59:44 -06:00
Merge pull request #6173 from JosJuice/dtk-savestate
Fix DTK audio not working after loading a savestate
This commit is contained in:
@ -127,6 +127,8 @@ void DoState(PointerWrap& p)
|
||||
p.Do(g_AISSampleRate);
|
||||
p.Do(g_AIDSampleRate);
|
||||
p.Do(g_CPUCyclesPerSample);
|
||||
|
||||
g_sound_stream->GetMixer()->DoState(p);
|
||||
}
|
||||
|
||||
static void GenerateAudioInterrupt();
|
||||
|
@ -285,6 +285,8 @@ void DoState(PointerWrap& p)
|
||||
p.Do(s_disc_path_to_insert);
|
||||
|
||||
DVDThread::DoState(p);
|
||||
|
||||
StreamADPCM::DoState(p);
|
||||
}
|
||||
|
||||
static size_t ProcessDTKSamples(std::vector<s16>* temp_pcm, const std::vector<u8>& audio_data)
|
||||
|
@ -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++)
|
||||
|
@ -8,6 +8,8 @@
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
|
||||
class PointerWrap;
|
||||
|
||||
namespace StreamADPCM
|
||||
{
|
||||
enum
|
||||
@ -17,5 +19,6 @@ enum
|
||||
};
|
||||
|
||||
void InitFilter();
|
||||
void DoState(PointerWrap& p);
|
||||
void DecodeBlock(s16* pcm, const u8* adpcm);
|
||||
}
|
||||
|
@ -74,7 +74,7 @@ static Common::Event g_compressAndDumpStateSyncEvent;
|
||||
static std::thread g_save_thread;
|
||||
|
||||
// Don't forget to increase this after doing changes on the savestate system
|
||||
static const u32 STATE_VERSION = 91; // Last changed in PR 6094
|
||||
static const u32 STATE_VERSION = 92; // Last changed in PR 6173
|
||||
|
||||
// Maps savestate versions to Dolphin versions.
|
||||
// Versions after 42 don't need to be added to this list,
|
||||
|
Reference in New Issue
Block a user