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 */