mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
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:
@ -11,12 +11,16 @@
|
||||
#include "AudioCommon/WaveFile.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
|
||||
class PointerWrap;
|
||||
|
||||
class Mixer final
|
||||
{
|
||||
public:
|
||||
explicit Mixer(unsigned int BackendSampleRate);
|
||||
~Mixer();
|
||||
|
||||
void DoState(PointerWrap& p);
|
||||
|
||||
// Called from audio threads
|
||||
unsigned int Mix(short* samples, unsigned int numSamples);
|
||||
unsigned int MixSurround(float* samples, unsigned int num_samples);
|
||||
@ -53,6 +57,7 @@ private:
|
||||
MixerFifo(Mixer* mixer, unsigned sample_rate) : m_mixer(mixer), m_input_sample_rate(sample_rate)
|
||||
{
|
||||
}
|
||||
void DoState(PointerWrap& p);
|
||||
void PushSamples(const short* samples, unsigned int num_samples);
|
||||
unsigned int Mix(short* samples, unsigned int numSamples, bool consider_framelimit = true);
|
||||
void SetInputSampleRate(unsigned int rate);
|
||||
|
Reference in New Issue
Block a user