diff --git a/extern/vgsound_emu-modified/vgsound_emu/src/vrcvi/vrcvi.cpp b/extern/vgsound_emu-modified/vgsound_emu/src/vrcvi/vrcvi.cpp index 8ff62fead..0b6796a70 100644 --- a/extern/vgsound_emu-modified/vgsound_emu/src/vrcvi/vrcvi.cpp +++ b/extern/vgsound_emu-modified/vgsound_emu/src/vrcvi/vrcvi.cpp @@ -14,10 +14,8 @@ void vrcvi_core::tick() if (!m_control.halt()) // Halt flag { // tick per each clock - for (auto &elem : m_pulse) - { - m_out += elem.get_output(); // add 4 bit pulse output - } + m_out += m_pulse[0].get_output(); // add 4 bit pulse output + m_out += m_pulse[1].get_output(); m_out += m_sawtooth.get_output(); // add 5 bit sawtooth output } if (m_timer.tick()) @@ -28,11 +26,8 @@ void vrcvi_core::tick() void vrcvi_core::reset() { - for (auto &elem : m_pulse) - { - elem.reset(); - } - + m_pulse[0].reset(); + m_pulse[1].reset(); m_sawtooth.reset(); m_timer.reset(); m_control.reset(); diff --git a/extern/vgsound_emu-modified/vgsound_emu/src/vrcvi/vrcvi.hpp b/extern/vgsound_emu-modified/vgsound_emu/src/vrcvi/vrcvi.hpp index d6694aaef..e097d94dd 100644 --- a/extern/vgsound_emu-modified/vgsound_emu/src/vrcvi/vrcvi.hpp +++ b/extern/vgsound_emu-modified/vgsound_emu/src/vrcvi/vrcvi.hpp @@ -398,7 +398,7 @@ class vrcvi_core : public vgsound_emu_core private: vrcvi_intf &m_intf; - std::array m_pulse; // 2 pulse channels + pulse_t m_pulse[2]; // 2 pulse channels sawtooth_t m_sawtooth; // sawtooth channel timer_t m_timer; // internal timer global_control_t m_control; // control