mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 00:34:59 +01:00
Remove unused ifdef gunk.
This commit is contained in:
parent
76f6ff178e
commit
6a033a093b
1 changed files with 25 additions and 48 deletions
|
|
@ -624,39 +624,33 @@ Sequence<Time>::end_write (StuckNoteOption option, Time when)
|
||||||
|
|
||||||
DEBUG_TRACE (DEBUG::Sequence, string_compose ("%1 : end_write (%2 notes) delete stuck option %3 @ %4\n", this, _notes.size(), option, when));
|
DEBUG_TRACE (DEBUG::Sequence, string_compose ("%1 : end_write (%2 notes) delete stuck option %3 @ %4\n", this, _notes.size(), option, when));
|
||||||
|
|
||||||
#ifdef PERCUSSIVE_IGNORE_NOTE_OFFS
|
for (typename Notes::iterator n = _notes.begin(); n != _notes.end() ;) {
|
||||||
if (!_percussive) {
|
typename Notes::iterator next = n;
|
||||||
#endif
|
++next;
|
||||||
for (typename Notes::iterator n = _notes.begin(); n != _notes.end() ;) {
|
|
||||||
typename Notes::iterator next = n;
|
|
||||||
++next;
|
|
||||||
|
|
||||||
if (!(*n)->length()) {
|
if (!(*n)->length()) {
|
||||||
switch (option) {
|
switch (option) {
|
||||||
case Relax:
|
case Relax:
|
||||||
break;
|
break;
|
||||||
case DeleteStuckNotes:
|
case DeleteStuckNotes:
|
||||||
cerr << "WARNING: Stuck note lost: " << (*n)->note() << endl;
|
cerr << "WARNING: Stuck note lost: " << (*n)->note() << endl;
|
||||||
_notes.erase(n);
|
_notes.erase(n);
|
||||||
break;
|
break;
|
||||||
case ResolveStuckNotes:
|
case ResolveStuckNotes:
|
||||||
if (when <= (*n)->time()) {
|
if (when <= (*n)->time()) {
|
||||||
cerr << "WARNING: Stuck note resolution - end time @ "
|
cerr << "WARNING: Stuck note resolution - end time @ "
|
||||||
<< when << " is before note on: " << (**n) << endl;
|
<< when << " is before note on: " << (**n) << endl;
|
||||||
_notes.erase (*n);
|
_notes.erase (*n);
|
||||||
} else {
|
} else {
|
||||||
(*n)->set_length (when - (*n)->time());
|
(*n)->set_length (when - (*n)->time());
|
||||||
cerr << "WARNING: resolved note-on with no note-off to generate " << (**n) << endl;
|
cerr << "WARNING: resolved note-on with no note-off to generate " << (**n) << endl;
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
n = next;
|
|
||||||
}
|
}
|
||||||
#ifdef PERCUSSIVE_IGNORE_NOTE_OFFS
|
|
||||||
|
n = next;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
for (int i = 0; i < 16; ++i) {
|
for (int i = 0; i < 16; ++i) {
|
||||||
_write_notes[i].clear();
|
_write_notes[i].clear();
|
||||||
|
|
@ -971,19 +965,9 @@ Sequence<Time>::append_note_on_unlocked (NotePtr note, event_id_t evid)
|
||||||
|
|
||||||
add_note_unlocked (note);
|
add_note_unlocked (note);
|
||||||
|
|
||||||
#ifdef PERCUSSIVE_IGNORE_NOTE_OFFS
|
DEBUG_TRACE (DEBUG::Sequence, string_compose ("Appending active note on %1 channel %2\n",
|
||||||
if (!_percussive) {
|
(unsigned)(uint8_t)note->note(), note->channel()));
|
||||||
#endif
|
_write_notes[note->channel()].insert (note);
|
||||||
|
|
||||||
DEBUG_TRACE (DEBUG::Sequence, string_compose ("Sustained: Appending active note on %1 channel %2\n",
|
|
||||||
(unsigned)(uint8_t)note->note(), note->channel()));
|
|
||||||
_write_notes[note->channel()].insert (note);
|
|
||||||
|
|
||||||
#ifdef PERCUSSIVE_IGNORE_NOTE_OFFS
|
|
||||||
} else {
|
|
||||||
DEBUG_TRACE(DEBUG::Sequence, "Percussive: NOT appending active note on\n");
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1007,13 +991,6 @@ Sequence<Time>::append_note_off_unlocked (NotePtr note)
|
||||||
|
|
||||||
_edited = true;
|
_edited = true;
|
||||||
|
|
||||||
#ifdef PERCUSSIVE_IGNORE_NOTE_OFFS
|
|
||||||
if (_percussive) {
|
|
||||||
DEBUG_TRACE(DEBUG::Sequence, "Sequence Ignoring note off (percussive mode)\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
bool resolved = false;
|
bool resolved = false;
|
||||||
|
|
||||||
/* _write_notes is sorted earliest-latest, so this will find the first matching note (FIFO) that
|
/* _write_notes is sorted earliest-latest, so this will find the first matching note (FIFO) that
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue