Skip to content

Commit

Permalink
Merge pull request Dn-Programming-Core-Management#294 from Dn-Program…
Browse files Browse the repository at this point in the history
…ming-Core-Management/fix-n163-init

Fix wrong waveform and random crackles in N163 audio
  • Loading branch information
nyanpasu64 authored Sep 26, 2024
2 parents 2c99773 + 1caa313 commit 375950f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions Source/APU/N163.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ void CN163::Reset()
m_N163.Reset();
m_N163.SetMixing(m_bUseLinearMixing);

m_iTime = 0;
m_SynthN163.clear();
m_BlipN163.clear();
}
Expand Down
13 changes: 13 additions & 0 deletions Source/APU/mesen/Namco163Audio.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {};
}
Expand Down

0 comments on commit 375950f

Please sign in to comment.