mirror of
https://github.com/libretro/Mesen.git
synced 2025-01-09 10:20:30 +00:00
Savestates: Fixed audio issues when loading savestate saved in one region while the UI is configured to use another region (e.g ntsc vs pal)
This commit is contained in:
parent
509d85b2a3
commit
44ca91adb1
@ -41,9 +41,14 @@ SoundMixer::~SoundMixer()
|
||||
|
||||
void SoundMixer::StreamState(bool saving)
|
||||
{
|
||||
Stream(_clockRate, _sampleRate);
|
||||
Stream(_clockRate, _sampleRate, _model);
|
||||
|
||||
if(!saving) {
|
||||
if(_model == NesModel::Auto) {
|
||||
//Older savestates - assume NTSC
|
||||
_model = NesModel::NTSC;
|
||||
}
|
||||
|
||||
Reset();
|
||||
UpdateRates(true);
|
||||
}
|
||||
@ -174,8 +179,10 @@ void SoundMixer::PlayAudioBuffer(uint32_t time)
|
||||
|
||||
void SoundMixer::SetNesModel(NesModel model)
|
||||
{
|
||||
_model = model;
|
||||
UpdateRates(true);
|
||||
if(_model != model) {
|
||||
_model = model;
|
||||
UpdateRates(true);
|
||||
}
|
||||
}
|
||||
|
||||
void SoundMixer::UpdateRates(bool forceUpdate)
|
||||
|
Loading…
Reference in New Issue
Block a user