119 |
pMainFilterParameters = NULL; |
pMainFilterParameters = NULL; |
120 |
|
|
121 |
ResetInternal(); |
ResetInternal(); |
122 |
|
ResetScaleTuning(); |
123 |
} |
} |
124 |
|
|
125 |
/** |
/** |
172 |
void Engine::Reset() { |
void Engine::Reset() { |
173 |
DisableAndLock(); |
DisableAndLock(); |
174 |
ResetInternal(); |
ResetInternal(); |
175 |
|
ResetScaleTuning(); |
176 |
Enable(); |
Enable(); |
177 |
} |
} |
178 |
|
|
192 |
iuiLastStolenKeyGlobally = RTList<uint>::Iterator(); |
iuiLastStolenKeyGlobally = RTList<uint>::Iterator(); |
193 |
pLastStolenChannel = NULL; |
pLastStolenChannel = NULL; |
194 |
|
|
|
// reset to normal chromatic scale (means equal temper) |
|
|
memset(&ScaleTuning[0], 0x00, 12); |
|
|
|
|
195 |
// reset all voices |
// reset all voices |
196 |
for (RTList<Voice>::Iterator iterVoice = pVoicePool->allocAppend(); iterVoice == pVoicePool->last(); iterVoice = pVoicePool->allocAppend()) { |
for (RTList<Voice>::Iterator iterVoice = pVoicePool->allocAppend(); iterVoice == pVoicePool->last(); iterVoice = pVoicePool->allocAppend()) { |
197 |
iterVoice->Reset(); |
iterVoice->Reset(); |
206 |
} |
} |
207 |
|
|
208 |
/** |
/** |
209 |
|
* Reset to normal, chromatic scale (means equal tempered). |
210 |
|
*/ |
211 |
|
void Engine::ResetScaleTuning() { |
212 |
|
memset(&ScaleTuning[0], 0x00, 12); |
213 |
|
} |
214 |
|
|
215 |
|
/** |
216 |
* Connect this engine instance with the given audio output device. |
* Connect this engine instance with the given audio output device. |
217 |
* This method will be called when an Engine instance is created. |
* This method will be called when an Engine instance is created. |
218 |
* All of the engine's data structures which are dependant to the used |
* All of the engine's data structures which are dependant to the used |
845 |
RTList<uint>::Iterator iuiSelectedKey = (this->iuiLastStolenKey) ? ++this->iuiLastStolenKey : pEngineChannel->pActiveKeys->first(); |
RTList<uint>::Iterator iuiSelectedKey = (this->iuiLastStolenKey) ? ++this->iuiLastStolenKey : pEngineChannel->pActiveKeys->first(); |
846 |
while (iuiSelectedKey) { |
while (iuiSelectedKey) { |
847 |
midi_key_info_t* pSelectedKey = &pEngineChannel->pMIDIKeyInfo[*iuiSelectedKey]; |
midi_key_info_t* pSelectedKey = &pEngineChannel->pMIDIKeyInfo[*iuiSelectedKey]; |
848 |
itSelectedVoice = pSelectedKey->pActiveVoices->first(); |
itSelectedVoice = pSelectedKey->pActiveVoices->first(); |
849 |
// proceed iterating if voice was created in this fragment cycle |
// proceed iterating if voice was created in this fragment cycle |
850 |
while (itSelectedVoice && !itSelectedVoice->hasRendered()) ++itSelectedVoice; |
while (itSelectedVoice && !itSelectedVoice->hasRendered()) ++itSelectedVoice; |
851 |
// found a "stealable" voice ? |
// found a "stealable" voice ? |
928 |
#endif // CONFIG_DEVMODE |
#endif // CONFIG_DEVMODE |
929 |
|
|
930 |
// now kill the selected voice |
// now kill the selected voice |
931 |
itSelectedVoice->Kill(itNoteOnEvent); |
itSelectedVoice->Kill(itNoteOnEvent); |
932 |
|
|
933 |
--VoiceTheftsLeft; |
--VoiceTheftsLeft; |
934 |
|
|
1261 |
} |
} |
1262 |
|
|
1263 |
String Engine::Version() { |
String Engine::Version() { |
1264 |
String s = "$Revision: 1.41 $"; |
String s = "$Revision: 1.42 $"; |
1265 |
return s.substr(11, s.size() - 13); // cut dollar signs, spaces and CVS macro keyword |
return s.substr(11, s.size() - 13); // cut dollar signs, spaces and CVS macro keyword |
1266 |
} |
} |
1267 |
|
|