diff --git a/gtk2_ardour/note_player.cc b/gtk2_ardour/note_player.cc index cb148f5f0b..d0396e588d 100644 --- a/gtk2_ardour/note_player.cc +++ b/gtk2_ardour/note_player.cc @@ -34,22 +34,15 @@ NotePlayer::NotePlayer (std::shared_ptr mt) NotePlayer::~NotePlayer () { - clear (); } void NotePlayer::add (std::shared_ptr note) { + /* Must not be called once play() has been called */ notes.push_back (note); } -void -NotePlayer::clear () -{ - off (); - notes.clear (); -} - void NotePlayer::on () { @@ -63,8 +56,7 @@ NotePlayer::play () { on (); - /* note: if there is more than 1 note, we will silence them all at the same time - */ + /* note: if there is more than 1 note, we will silence them all at the same time */ const uint32_t note_length_ms = 100; diff --git a/gtk2_ardour/note_player.h b/gtk2_ardour/note_player.h index 94c60b3ab4..e3cad02a33 100644 --- a/gtk2_ardour/note_player.h +++ b/gtk2_ardour/note_player.h @@ -27,6 +27,10 @@ #include "evoral/Note.h" +namespace Temporal { + class Beats; +} + namespace ARDOUR { class MidiTrack; } @@ -40,13 +44,11 @@ public: void add (std::shared_ptr); void play (); - void on (); - void off (); - void clear (); - - static bool _off (NotePlayer*); private: + void on (); + void off (); + static bool _off (NotePlayer*); typedef std::vector< std::shared_ptr > Notes; std::shared_ptr track;