/[svn]/linuxsampler/trunk/src/engines/EngineBase.h
ViewVC logotype

Diff of /linuxsampler/trunk/src/engines/EngineBase.h

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

revision 2434 by schoenebeck, Thu Mar 7 19:23:24 2013 UTC revision 2448 by schoenebeck, Fri May 3 14:26:32 2013 UTC
# Line 143  namespace LinuxSampler { Line 143  namespace LinuxSampler {
143                          }                          }
144                      }                      }
145                  }                  }
146                    
147                    // In case scale tuning has been changed, recalculate pitch for
148                    // all active voices.
149                    ProcessScaleTuningChange();
150    
151                  // reset internal voice counter (just for statistic of active voices)                  // reset internal voice counter (just for statistic of active voices)
152                  ActiveVoiceCountTemp = 0;                  ActiveVoiceCountTemp = 0;
# Line 1452  namespace LinuxSampler { Line 1456  namespace LinuxSampler {
1456    
1457                  return -1;                  return -1;
1458              }              }
1459                
1460                /**
1461                 * Checks whether scale tuning setting has been changed since last
1462                 * time this method was called, if yes, it recalculates the pitch
1463                 * for all active voices.
1464                 */
1465                void ProcessScaleTuningChange() {
1466                    const bool changed = ScaleTuningChanged.readAndReset();
1467                    if (!changed) return;
1468                    
1469                    for (int i = 0; i < engineChannels.size(); i++) {
1470                        EngineChannelBase<V, R, I>* channel =
1471                            static_cast<EngineChannelBase<V, R, I>*>(engineChannels[i]);
1472                        channel->OnScaleTuningChanged();
1473                    }
1474                }
1475    
1476          private:          private:
1477              Pool<V>*    pVoicePool;            ///< Contains all voices that can be activated.              Pool<V>*    pVoicePool;            ///< Contains all voices that can be activated.

Legend:
Removed from v.2434  
changed lines
  Added in v.2448

  ViewVC Help
Powered by ViewVC