OSDN Git Service

MIDI: イベント関連のクラスのデフォルト値を削除
authorstarg <starg@users.osdn.me>
Sat, 6 Aug 2016 12:24:00 +0000 (21:24 +0900)
committerstarg <starg@users.osdn.me>
Sat, 6 Aug 2016 12:24:00 +0000 (21:24 +0900)
include/midi/event.hpp
test/midiwriter/midiwritertest.cpp

index 53dbb00..a0f100d 100644 (file)
@@ -19,25 +19,25 @@ namespace MIDI
 class NoteOff final
 {
 public:
-    int Channel = 0;
-    NoteNumber Note = {NoteName::C, 5};
-    int Velocity = 0;
+    int Channel;
+    NoteNumber Note;
+    int Velocity;
 };
 
 class NoteOn final
 {
 public:
-    int Channel = 0;
-    NoteNumber Note = {NoteName::C, 5};
-    int Velocity = 0;
+    int Channel;
+    NoteNumber Note;
+    int Velocity;
 };
 
 class PolyphonicAftertouch final
 {
 public:
-    int Channel = 0;
-    NoteNumber Note = {NoteName::C, 5};
-    int Pressure = 0;
+    int Channel;
+    NoteNumber Note;
+    int Pressure;
 };
 
 // http://nickfever.com/music/midi-cc-list
@@ -110,30 +110,30 @@ enum class ControllerNumber : std::uint8_t
 class ControlChange final
 {
 public:
-    int Channel = 0;
-    ControllerNumber Control = ControllerNumber::AllNotesOff;
-    int Value = 0;
+    int Channel;
+    ControllerNumber Control;
+    int Value;
 };
 
 class ProgramChange final
 {
 public:
-    int Channel = 0;
-    int Program = 0;
+    int Channel;
+    int Program;
 };
 
 class Aftertouch final
 {
 public:
-    int Channel = 0;
-    int Pressure = 0;
+    int Channel;
+    int Pressure;
 };
 
 class PitchBend final
 {
 public:
-    int Channel = 0;
-    int Value = 0;
+    int Channel;
+    int Value;
 };
 
 class SysExEvent final
index ab3778d..c22b110 100644 (file)
@@ -21,7 +21,7 @@ BOOST_AUTO_TEST_CASE(Test1)
 
        midi.Tracks.emplace_back();
        midi.Tracks[0].Events.assign({
-               MIDI::MIDIEvent{200, MIDI::NoteOff{}},
+        MIDI::MIDIEvent{200, MIDI::NoteOff{0, {MIDI::NoteName::C, 5}, 0}},
                MIDI::MIDIEvent{400, MIDI::MetaEvent{MIDI::MetaEventKind::EndOfTrack}}
        });