--- linuxsampler/trunk/src/engines/gig/Engine.cpp 2005/07/15 16:43:56 690 +++ linuxsampler/trunk/src/engines/gig/Engine.cpp 2005/07/20 21:43:23 705 @@ -492,6 +492,8 @@ * this audio fragment cycle */ void Engine::RenderActiveVoices(EngineChannel* pEngineChannel, uint Samples) { + if (pEngineChannel->GetMute()) return; // skip if sampler channel is muted + RTList::Iterator iuiKey = pEngineChannel->pActiveKeys->first(); RTList::Iterator end = pEngineChannel->pActiveKeys->end(); while (iuiKey != end) { // iterate through all active keys @@ -620,6 +622,7 @@ * @param itNoteOnEvent - key, velocity and time stamp of the event */ void Engine::ProcessNoteOn(EngineChannel* pEngineChannel, Pool::Iterator& itNoteOnEvent) { + if (pEngineChannel->GetMute()) return; // skip if sampler channel is muted const int key = itNoteOnEvent->Param.Note.Key; @@ -679,8 +682,9 @@ * @param itNoteOffEvent - key, velocity and time stamp of the event */ void Engine::ProcessNoteOff(EngineChannel* pEngineChannel, Pool::Iterator& itNoteOffEvent) { - midi_key_info_t* pKey = &pEngineChannel->pMIDIKeyInfo[itNoteOffEvent->Param.Note.Key]; + if (pEngineChannel->GetMute()) return; // skip if sampler channel is muted + midi_key_info_t* pKey = &pEngineChannel->pMIDIKeyInfo[itNoteOffEvent->Param.Note.Key]; pKey->KeyPressed = false; // the MIDI key was now released // release voices on this key if needed @@ -1181,6 +1185,8 @@ dmsg(4,("PEDAL DOWN\n")); pEngineChannel->SustainPedal = true; + if (pEngineChannel->GetMute()) return; // skip if sampler channel is muted + // cancel release process of voices if necessary RTList::Iterator iuiKey = pEngineChannel->pActiveKeys->first(); for (; iuiKey; ++iuiKey) { @@ -1199,6 +1205,8 @@ dmsg(4,("PEDAL UP\n")); pEngineChannel->SustainPedal = false; + if (pEngineChannel->GetMute()) return; // skip if sampler channel is muted + // release voices if their respective key is not pressed RTList::Iterator iuiKey = pEngineChannel->pActiveKeys->first(); for (; iuiKey; ++iuiKey) { @@ -1423,7 +1431,7 @@ } String Engine::Version() { - String s = "$Revision: 1.49 $"; + String s = "$Revision: 1.50 $"; return s.substr(11, s.size() - 13); // cut dollar signs, spaces and CVS macro keyword }