From 5d1fc7609a62426a038fe2d7a7edcb9789026e72 Mon Sep 17 00:00:00 2001 From: Ignacio Sanchez Gines <863613+drhelius@users.noreply.github.com> Date: Fri, 12 Jan 2024 14:56:06 +0100 Subject: [PATCH] Add AY8910 buffer to save state --- src/Audio.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Audio.cpp b/src/Audio.cpp index 1cd82a4..163ba3b 100644 --- a/src/Audio.cpp +++ b/src/Audio.cpp @@ -111,6 +111,7 @@ void Audio::SaveState(std::ostream& stream) { stream.write(reinterpret_cast (&m_ElapsedCycles), sizeof(m_ElapsedCycles)); stream.write(reinterpret_cast (m_pSampleBuffer), sizeof(blip_sample_t) * GC_AUDIO_BUFFER_SIZE); + stream.write(reinterpret_cast (m_pSGMBuffer), sizeof(s16) * GC_AUDIO_BUFFER_SIZE); m_pAY8910->SaveState(stream); } @@ -118,6 +119,7 @@ void Audio::LoadState(std::istream& stream) { stream.read(reinterpret_cast (&m_ElapsedCycles), sizeof(m_ElapsedCycles)); stream.read(reinterpret_cast (m_pSampleBuffer), sizeof(blip_sample_t) * GC_AUDIO_BUFFER_SIZE); + stream.read(reinterpret_cast (m_pSGMBuffer), sizeof(s16) * GC_AUDIO_BUFFER_SIZE); m_pAY8910->LoadState(stream); m_pApu->reset();