summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Olivier Galibert <galibert@pobox.com>2018-03-12 19:18:19 +0100
committer Olivier Galibert <galibert@pobox.com>2018-03-12 19:18:19 +0100
commit08b3e31c5aa7cb9844b9b9c7081672b7705af22d (patch)
treefeee71f6823908794560521cb9c8ea52f60f6112
parentf338bfa09291475660ff6f2b6ae5c8814ccb2d0c (diff)
A little fast on the trigger there... (nw)
-rw-r--r--src/devices/sound/nes_apu.cpp6
-rw-r--r--src/devices/sound/nes_apu.h2
2 files changed, 3 insertions, 5 deletions
diff --git a/src/devices/sound/nes_apu.cpp b/src/devices/sound/nes_apu.cpp
index 69c0d9e8138..e3715dcfad6 100644
--- a/src/devices/sound/nes_apu.cpp
+++ b/src/devices/sound/nes_apu.cpp
@@ -342,7 +342,7 @@ s8 nesapu_device::apu_triangle(apu_t::triangle_t *chan)
if (freq < 4) /* inaudible */
return 0;
- chan->phaseacc -= (float) m_apu_incsize; /* # of cycles per sample */
+ chan->phaseacc --;
while (chan->phaseacc < 0)
{
chan->phaseacc += freq;
@@ -400,7 +400,7 @@ s8 nesapu_device::apu_noise(apu_t::noise_t *chan)
return 0;
freq = noise_freq[chan->regs[2] & 0x0F];
- chan->phaseacc -= (float) m_apu_incsize; /* # of cycles per sample */
+ chan->phaseacc --;
while (chan->phaseacc < 0)
{
chan->phaseacc += freq;
@@ -453,7 +453,7 @@ s8 nesapu_device::apu_dpcm(apu_t::dpcm_t *chan)
if (chan->enabled)
{
freq = dpcm_clocks[chan->regs[0] & 0x0F];
- chan->phaseacc -= (float) m_apu_incsize; /* # of cycles per sample */
+ chan->phaseacc --;
while (chan->phaseacc < 0)
{
diff --git a/src/devices/sound/nes_apu.h b/src/devices/sound/nes_apu.h
index 67eb0ac4ff1..0a244540abe 100644
--- a/src/devices/sound/nes_apu.h
+++ b/src/devices/sound/nes_apu.h
@@ -74,10 +74,8 @@ private:
// internal state
apu_t m_APU; /* Actual APUs */
- float m_apu_incsize; /* Adjustment increment */
u32 m_samps_per_sync; /* Number of samples per vsync */
u32 m_buffer_size; /* Actual buffer size in bytes */
- u32 m_real_rate; /* Actual playback rate */
u8 m_noise_lut[apu_t::NOISE_LONG]; /* Noise sample lookup table */
u32 m_vbl_times[0x20]; /* VBL durations in samples */
u32 m_sync_times1[SYNCS_MAX1]; /* Samples per sync table */