/[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 688 by schoenebeck, Thu Jul 14 12:25:20 2005 UTC revision 705 by schoenebeck, Wed Jul 20 21:43:23 2005 UTC
# Line 243  namespace LinuxSampler { namespace gig { Line 243  namespace LinuxSampler { namespace gig {
243          if (MaxFadeOutPos < 0) {          if (MaxFadeOutPos < 0) {
244              std::cerr << "gig::Engine: WARNING, CONFIG_EG_MIN_RELEASE_TIME "              std::cerr << "gig::Engine: WARNING, CONFIG_EG_MIN_RELEASE_TIME "
245                        << "too big for current audio fragment size & sampling rate! "                        << "too big for current audio fragment size & sampling rate! "
246                        << "May lead to click sounds!\n" << std::flush;                        << "May lead to click sounds if voice stealing chimes in!\n" << std::flush;
247              // force volume ramp downs at the beginning of each fragment              // force volume ramp downs at the beginning of each fragment
248              MaxFadeOutPos = 0;              MaxFadeOutPos = 0;
249              // lower minimum release time              // lower minimum release time
# Line 492  namespace LinuxSampler { namespace gig { Line 492  namespace LinuxSampler { namespace gig {
492       *                         this audio fragment cycle       *                         this audio fragment cycle
493       */       */
494      void Engine::RenderActiveVoices(EngineChannel* pEngineChannel, uint Samples) {      void Engine::RenderActiveVoices(EngineChannel* pEngineChannel, uint Samples) {
495            if (pEngineChannel->GetMute()) return; // skip if sampler channel is muted
496    
497          RTList<uint>::Iterator iuiKey = pEngineChannel->pActiveKeys->first();          RTList<uint>::Iterator iuiKey = pEngineChannel->pActiveKeys->first();
498          RTList<uint>::Iterator end    = pEngineChannel->pActiveKeys->end();          RTList<uint>::Iterator end    = pEngineChannel->pActiveKeys->end();
499          while (iuiKey != end) { // iterate through all active keys          while (iuiKey != end) { // iterate through all active keys
# Line 620  namespace LinuxSampler { namespace gig { Line 622  namespace LinuxSampler { namespace gig {
622       *  @param itNoteOnEvent - key, velocity and time stamp of the event       *  @param itNoteOnEvent - key, velocity and time stamp of the event
623       */       */
624      void Engine::ProcessNoteOn(EngineChannel* pEngineChannel, Pool<Event>::Iterator& itNoteOnEvent) {      void Engine::ProcessNoteOn(EngineChannel* pEngineChannel, Pool<Event>::Iterator& itNoteOnEvent) {
625           if (pEngineChannel->GetMute()) return; // skip if sampler channel is muted
626    
627          const int key = itNoteOnEvent->Param.Note.Key;          const int key = itNoteOnEvent->Param.Note.Key;
628    
# Line 679  namespace LinuxSampler { namespace gig { Line 682  namespace LinuxSampler { namespace gig {
682       *  @param itNoteOffEvent - key, velocity and time stamp of the event       *  @param itNoteOffEvent - key, velocity and time stamp of the event
683       */       */
684      void Engine::ProcessNoteOff(EngineChannel* pEngineChannel, Pool<Event>::Iterator& itNoteOffEvent) {      void Engine::ProcessNoteOff(EngineChannel* pEngineChannel, Pool<Event>::Iterator& itNoteOffEvent) {
685          midi_key_info_t* pKey = &pEngineChannel->pMIDIKeyInfo[itNoteOffEvent->Param.Note.Key];          if (pEngineChannel->GetMute()) return; // skip if sampler channel is muted
686    
687            midi_key_info_t* pKey = &pEngineChannel->pMIDIKeyInfo[itNoteOffEvent->Param.Note.Key];
688          pKey->KeyPressed = false; // the MIDI key was now released          pKey->KeyPressed = false; // the MIDI key was now released
689    
690          // release voices on this key if needed          // release voices on this key if needed
# Line 1181  namespace LinuxSampler { namespace gig { Line 1185  namespace LinuxSampler { namespace gig {
1185                      dmsg(4,("PEDAL DOWN\n"));                      dmsg(4,("PEDAL DOWN\n"));
1186                      pEngineChannel->SustainPedal = true;                      pEngineChannel->SustainPedal = true;
1187    
1188                        if (pEngineChannel->GetMute()) return; // skip if sampler channel is muted
1189    
1190                      // cancel release process of voices if necessary                      // cancel release process of voices if necessary
1191                      RTList<uint>::Iterator iuiKey = pEngineChannel->pActiveKeys->first();                      RTList<uint>::Iterator iuiKey = pEngineChannel->pActiveKeys->first();
1192                      for (; iuiKey; ++iuiKey) {                      for (; iuiKey; ++iuiKey) {
# Line 1199  namespace LinuxSampler { namespace gig { Line 1205  namespace LinuxSampler { namespace gig {
1205                      dmsg(4,("PEDAL UP\n"));                      dmsg(4,("PEDAL UP\n"));
1206                      pEngineChannel->SustainPedal = false;                      pEngineChannel->SustainPedal = false;
1207    
1208                        if (pEngineChannel->GetMute()) return; // skip if sampler channel is muted
1209    
1210                      // release voices if their respective key is not pressed                      // release voices if their respective key is not pressed
1211                      RTList<uint>::Iterator iuiKey = pEngineChannel->pActiveKeys->first();                      RTList<uint>::Iterator iuiKey = pEngineChannel->pActiveKeys->first();
1212                      for (; iuiKey; ++iuiKey) {                      for (; iuiKey; ++iuiKey) {
# Line 1423  namespace LinuxSampler { namespace gig { Line 1431  namespace LinuxSampler { namespace gig {
1431      }      }
1432    
1433      String Engine::Version() {      String Engine::Version() {
1434          String s = "$Revision: 1.48 $";          String s = "$Revision: 1.50 $";
1435          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
1436      }      }
1437    

Legend:
Removed from v.688  
changed lines
  Added in v.705

  ViewVC Help
Powered by ViewVC