diff options
author | deva <deva> | 2008-07-21 12:11:02 +0000 |
---|---|---|
committer | deva <deva> | 2008-07-21 12:11:02 +0000 |
commit | 981cd50a83e67f5471ee1e1ad0c0575506f14da0 (patch) | |
tree | c206e93a6def02fec109190cc1c0b15c26f639c8 /src/event.cc | |
parent | 9f07c02a19ee79906ad3f3ab8c9eed725def8b96 (diff) |
Wee multivoices and multiple wavs... all triggered by the midi test framework.
Diffstat (limited to 'src/event.cc')
-rw-r--r-- | src/event.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/event.cc b/src/event.cc index 804d42f..c589807 100644 --- a/src/event.cc +++ b/src/event.cc @@ -26,11 +26,12 @@ */ #include "event.h" -Event::Event(Sample *sample, size_t onset) +Event::Event(jack_port_t *port, Sample *sample, size_t time, size_t duration) { + this->port = port; this->sample = sample; - this->onset = onset; - duration = 0; + this->time = time; + this->duration = duration; } Event::~Event() @@ -39,5 +40,6 @@ Event::~Event() bool Event::operator<(const Event& event) const { - return onset + duration < event.onset + event.duration; + if(time == event.time) return this < &event; + return time < event.time; } |