mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-27 06:53:01 +00:00
Fix PSG output a bit
This commit is contained in:
parent
68612bc777
commit
5b086e103e
1 changed files with 2 additions and 2 deletions
|
@ -347,7 +347,7 @@ namespace nds_sound_emu
|
||||||
case 3: // PSG or Noise
|
case 3: // PSG or Noise
|
||||||
m_sample = 0;
|
m_sample = 0;
|
||||||
if (m_psg) // psg
|
if (m_psg) // psg
|
||||||
m_sample = (duty() == 7) ? -0x8000 : ((m_cur_bitaddr < s32(u32(7) - duty())) ? -0x8000 : 0x7fff);
|
m_sample = (duty() == 7) ? -0x7fff : ((m_cur_bitaddr < s32(u32(7) - duty())) ? -0x7fff : 0x7fff);
|
||||||
else if (m_noise) // noise
|
else if (m_noise) // noise
|
||||||
m_sample = m_lfsr_out;
|
m_sample = m_lfsr_out;
|
||||||
break;
|
break;
|
||||||
|
@ -398,7 +398,7 @@ namespace nds_sound_emu
|
||||||
if (bitfield(m_lfsr, 0))
|
if (bitfield(m_lfsr, 0))
|
||||||
{
|
{
|
||||||
m_lfsr = (m_lfsr >> 1) ^ 0x6000;
|
m_lfsr = (m_lfsr >> 1) ^ 0x6000;
|
||||||
m_lfsr_out = -0x8000;
|
m_lfsr_out = -0x7fff;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue