summaryrefslogtreecommitdiff
path: root/synth
diff options
context:
space:
mode:
authorFlorian Jung <flo@thinkpad.(none)>2011-01-11 20:29:34 +0100
committerFlorian Jung <flo@thinkpad.(none)>2011-01-11 20:29:34 +0100
commit528902f28af1bb430ba7c7f1bf4ebbc54fb7aaf6 (patch)
treeecf9ea33fe8d4b54ec8224a5a748e1aec490a432 /synth
parent0573c5d52174eb78c9dad41a57415ea4bcef8b25 (diff)
Fixed bug in Channel::cleanup() (some notes were skipped)
Diffstat (limited to 'synth')
-rw-r--r--synth/channel.cpp4
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()