From 5f76f0ecbffc99dffe04e5ea90d674330a7ba37e Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 10 Sep 2019 20:03:24 -0400 Subject: [PATCH] Sequencer: Use std::array for m_ctrlVals This is the only array in the header that isn't using std::array. --- include/amuse/Sequencer.hpp | 16 ++++++++-------- lib/Sequencer.cpp | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/amuse/Sequencer.hpp b/include/amuse/Sequencer.hpp index a035080..4940e3d 100644 --- a/include/amuse/Sequencer.hpp +++ b/include/amuse/Sequencer.hpp @@ -57,14 +57,14 @@ class Sequencer : public Entity { std::unordered_map> m_chanVoxs; std::unordered_set> m_keyoffVoxs; ObjToken m_lastVoice; - int8_t m_ctrlVals[128] = {}; /**< MIDI controller values */ - float m_curPitchWheel = 0.f; /**< MIDI pitch-wheel */ - int8_t m_pitchWheelRange = -1; /**< Pitch wheel range settable by RPN 0 */ - int8_t m_curProgram = 0; /**< MIDI program number */ - float m_curVol = 1.f; /**< Current volume of channel */ - float m_curPan = 0.f; /**< Current panning of channel */ - uint16_t m_rpn = 0; /**< Current RPN (only pitch-range 0x0000 supported) */ - double m_ticksPerSec = 1000.0; /**< Current ticks per second (tempo) for channel */ + std::array m_ctrlVals{}; /**< MIDI controller values */ + float m_curPitchWheel = 0.f; /**< MIDI pitch-wheel */ + int8_t m_pitchWheelRange = -1; /**< Pitch wheel range settable by RPN 0 */ + int8_t m_curProgram = 0; /**< MIDI program number */ + float m_curVol = 1.f; /**< Current volume of channel */ + float m_curPan = 0.f; /**< Current panning of channel */ + uint16_t m_rpn = 0; /**< Current RPN (only pitch-range 0x0000 supported) */ + double m_ticksPerSec = 1000.0; /**< Current ticks per second (tempo) for channel */ void _bringOutYourDead(); size_t getVoiceCount() const; diff --git a/lib/Sequencer.cpp b/lib/Sequencer.cpp index a51bf5a..094e640 100644 --- a/lib/Sequencer.cpp +++ b/lib/Sequencer.cpp @@ -208,7 +208,7 @@ ObjToken Sequencer::ChannelState::keyOn(uint8_t note, uint8_t velocity) { if (*ret) { (*ret)->m_sequencer = m_parent; m_chanVoxs[note] = *ret; - (*ret)->installCtrlValues(m_ctrlVals); + (*ret)->installCtrlValues(m_ctrlVals.data()); ObjectId oid; bool res;