From d838080e783e74825980045a99aff1aa1d993bac Mon Sep 17 00:00:00 2001 From: nyanpasu64 Date: Sun, 15 Sep 2024 14:43:55 -0700 Subject: [PATCH] Properly initialize Namco163Audio Fixes first note with Zxx playing with wrong waveform. --- Source/APU/mesen/Namco163Audio.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Source/APU/mesen/Namco163Audio.h b/Source/APU/mesen/Namco163Audio.h index 984432544..5f531f54e 100644 --- a/Source/APU/mesen/Namco163Audio.h +++ b/Source/APU/mesen/Namco163Audio.h @@ -166,6 +166,19 @@ class Namco163Audio _updateCounter += clocks; } + Namco163Audio() + : _channelOutput{} + , _internalRam{} + { + _ramPosition = 0; + _autoIncrement = false; + _updateCounter = 0; + _currentChannel = 7; + _lastOutput = 0; + _disableSound = false; + _mixLinear = false; + } + void Reset() { *this = {}; }