summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/midi_model.h
diff options
context:
space:
mode:
authorHans Baier <hansfbaier@googlemail.com>2008-04-23 02:15:57 +0000
committerHans Baier <hansfbaier@googlemail.com>2008-04-23 02:15:57 +0000
commit53f3b407bb4080722cc8a7e1c42b99eca8e90bcd (patch)
tree952f17f5786dc0dc28bdde906fa8b4bf16a2d85a /libs/ardour/ardour/midi_model.h
parentb81fd9415ee07e90254c3bf23bfbf395adfa7995 (diff)
* refactored MidiControlIterator to improve readability of code
* commented out crashing section (control iterator stuff in MidiModel::const_iterator::operator++) * added midi_panic() on no_roll in midi tracks so that all notes stop when pressing stop * mark midi model edited on all changes so that recorded tracks get saved git-svn-id: svn://localhost/ardour2/branches/3.0@3281 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/midi_model.h')
-rw-r--r--libs/ardour/ardour/midi_model.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/libs/ardour/ardour/midi_model.h b/libs/ardour/ardour/midi_model.h
index af506e1f08..1382e3b8df 100644
--- a/libs/ardour/ardour/midi_model.h
+++ b/libs/ardour/ardour/midi_model.h
@@ -39,8 +39,18 @@ class Session;
class MidiSource;
// x , y
-typedef std::pair<boost::shared_ptr<const AutomationList>, std::pair<double,double> >
- MidiControlIterator;
+class MidiControlIterator {
+public:
+ boost::shared_ptr<const AutomationList> automation_list;
+ double x;
+ double y;
+
+ MidiControlIterator(
+ boost::shared_ptr<const AutomationList> the_automation_list,
+ double my_x,
+ double my_y) : automation_list(the_automation_list), x(my_x), y(my_y)
+ {}
+};
/** This is a slightly higher level (than MidiBuffer) model of MIDI note data.
@@ -57,7 +67,6 @@ class MidiModel : public boost::noncopyable, public Automatable {
public:
MidiModel(MidiSource *s, size_t size=0);
- // This is crap.
void write_lock();
void write_unlock();
void read_lock() const;