diff options
author | Florian Jung <flo@thinkpad.(none)> | 2011-01-11 20:29:34 +0100 |
---|---|---|
committer | Florian Jung <flo@thinkpad.(none)> | 2011-01-11 20:29:34 +0100 |
commit | 528902f28af1bb430ba7c7f1bf4ebbc54fb7aaf6 (patch) | |
tree | ecf9ea33fe8d4b54ec8224a5a748e1aec490a432 | |
parent | 0573c5d52174eb78c9dad41a57415ea4bcef8b25 (diff) |
Fixed bug in Channel::cleanup() (some notes were skipped)
-rw-r--r-- | synth/channel.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/synth/channel.cpp b/synth/channel.cpp index 61ea6de..8ff615e 100644 --- a/synth/channel.cpp +++ b/synth/channel.cpp @@ -39,12 +39,14 @@ Channel::~Channel() void Channel::cleanup() { list<NoteSkel*>::iterator it; - for (it=notes.begin(); it!=notes.end(); it++) + for (it=notes.begin(); it!=notes.end();) if ((*it)->still_active()==false) { (*it)->destroy(); it=notes.erase(it); } + else + it++; } fixed_t Channel::get_sample() |