--- linuxsampler/trunk/src/engines/gig/Engine.cpp 2005/06/15 20:48:18 658 +++ linuxsampler/trunk/src/engines/gig/Engine.cpp 2005/06/16 21:35:30 659 @@ -119,6 +119,7 @@ pMainFilterParameters = NULL; ResetInternal(); + ResetScaleTuning(); } /** @@ -171,6 +172,7 @@ void Engine::Reset() { DisableAndLock(); ResetInternal(); + ResetScaleTuning(); Enable(); } @@ -190,9 +192,6 @@ iuiLastStolenKeyGlobally = RTList::Iterator(); pLastStolenChannel = NULL; - // reset to normal chromatic scale (means equal temper) - memset(&ScaleTuning[0], 0x00, 12); - // reset all voices for (RTList::Iterator iterVoice = pVoicePool->allocAppend(); iterVoice == pVoicePool->last(); iterVoice = pVoicePool->allocAppend()) { iterVoice->Reset(); @@ -207,6 +206,13 @@ } /** + * Reset to normal, chromatic scale (means equal tempered). + */ + void Engine::ResetScaleTuning() { + memset(&ScaleTuning[0], 0x00, 12); + } + + /** * Connect this engine instance with the given audio output device. * This method will be called when an Engine instance is created. * All of the engine's data structures which are dependant to the used @@ -839,7 +845,7 @@ RTList::Iterator iuiSelectedKey = (this->iuiLastStolenKey) ? ++this->iuiLastStolenKey : pEngineChannel->pActiveKeys->first(); while (iuiSelectedKey) { midi_key_info_t* pSelectedKey = &pEngineChannel->pMIDIKeyInfo[*iuiSelectedKey]; - itSelectedVoice = pSelectedKey->pActiveVoices->first(); + itSelectedVoice = pSelectedKey->pActiveVoices->first(); // proceed iterating if voice was created in this fragment cycle while (itSelectedVoice && !itSelectedVoice->hasRendered()) ++itSelectedVoice; // found a "stealable" voice ? @@ -922,7 +928,7 @@ #endif // CONFIG_DEVMODE // now kill the selected voice - itSelectedVoice->Kill(itNoteOnEvent); + itSelectedVoice->Kill(itNoteOnEvent); --VoiceTheftsLeft; @@ -1255,7 +1261,7 @@ } String Engine::Version() { - String s = "$Revision: 1.41 $"; + String s = "$Revision: 1.42 $"; return s.substr(11, s.size() - 13); // cut dollar signs, spaces and CVS macro keyword }