/[svn]/linuxsampler/trunk/src/engines/gig/Engine.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/engines/gig/Engine.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 658 by schoenebeck, Wed Jun 15 00:01:28 2005 UTC revision 659 by schoenebeck, Thu Jun 16 21:35:30 2005 UTC
# Line 119  namespace LinuxSampler { namespace gig { Line 119  namespace LinuxSampler { namespace gig {
119          pMainFilterParameters   = NULL;          pMainFilterParameters   = NULL;
120    
121          ResetInternal();          ResetInternal();
122            ResetScaleTuning();
123      }      }
124    
125      /**      /**
# Line 171  namespace LinuxSampler { namespace gig { Line 172  namespace LinuxSampler { namespace gig {
172      void Engine::Reset() {      void Engine::Reset() {
173          DisableAndLock();          DisableAndLock();
174          ResetInternal();          ResetInternal();
175            ResetScaleTuning();
176          Enable();          Enable();
177      }      }
178    
# Line 190  namespace LinuxSampler { namespace gig { Line 192  namespace LinuxSampler { namespace gig {
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();
# Line 207  namespace LinuxSampler { namespace gig { Line 206  namespace LinuxSampler { namespace gig {
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
# Line 839  namespace LinuxSampler { namespace gig { Line 845  namespace LinuxSampler { namespace gig {
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 ?
# Line 922  namespace LinuxSampler { namespace gig { Line 928  namespace LinuxSampler { namespace gig {
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    
# Line 1255  namespace LinuxSampler { namespace gig { Line 1261  namespace LinuxSampler { namespace gig {
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    

Legend:
Removed from v.658  
changed lines
  Added in v.659

  ViewVC Help
Powered by ViewVC