summaryrefslogtreecommitdiff
path: root/Applications/Piano/Track.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Applications/Piano/Track.cpp')
-rw-r--r--Applications/Piano/Track.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/Applications/Piano/Track.cpp b/Applications/Piano/Track.cpp
index 22cbbe03f8..754a43407a 100644
--- a/Applications/Piano/Track.cpp
+++ b/Applications/Piano/Track.cpp
@@ -287,7 +287,7 @@ void Track::set_roll_note(int note, u32 on_sample, u32 off_sample)
sync_roll(note);
return;
}
- if (it->on_sample == new_roll_note.on_sample && it->off_sample == new_roll_note.off_sample) {
+ if (it->on_sample <= new_roll_note.on_sample && it->off_sample >= new_roll_note.on_sample) {
if (m_time >= it->on_sample && m_time <= it->off_sample)
set_note(note, Off);
m_roll_notes[note].remove(it);
@@ -301,12 +301,6 @@ void Track::set_roll_note(int note, u32 on_sample, u32 off_sample)
it = m_roll_notes[note].begin();
continue;
}
- if (it->on_sample < new_roll_note.on_sample && it->off_sample >= new_roll_note.on_sample) {
- if (m_time >= new_roll_note.off_sample && m_time <= it->off_sample)
- set_note(note, Off);
- it->off_sample = new_roll_note.on_sample - 1;
- ASSERT(it->length() >= 2);
- }
++it;
}