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

Diff of /linuxsampler/trunk/src/engines/AbstractEngineChannel.cpp

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

revision 2317 by persson, Sun Feb 19 12:13:19 2012 UTC revision 2382 by persson, Sun Dec 2 16:30:42 2012 UTC
# Line 112  namespace LinuxSampler { Line 112  namespace LinuxSampler {
112          Pitch          = 0;          Pitch          = 0;
113          GlobalVolume   = 1.0f;          GlobalVolume   = 1.0f;
114          MidiVolume     = 1.0;          MidiVolume     = 1.0;
         GlobalPanLeft  = 1.0f;  
         GlobalPanRight = 1.0f;  
115          iLastPanRequest = 64;          iLastPanRequest = 64;
116          GlobalTranspose = 0;          GlobalTranspose = 0;
117          // set all MIDI controller values to zero          // set all MIDI controller values to zero
# Line 182  namespace LinuxSampler { Line 180  namespace LinuxSampler {
180          int iMidiPan = int(f * 64.0f) + 64;          int iMidiPan = int(f * 64.0f) + 64;
181          if (iMidiPan > 127) iMidiPan = 127;          if (iMidiPan > 127) iMidiPan = 127;
182          else if (iMidiPan < 0) iMidiPan = 0;          else if (iMidiPan < 0) iMidiPan = 0;
         GlobalPanLeft  = AbstractEngine::PanCurve[128 - iMidiPan];  
         GlobalPanRight = AbstractEngine::PanCurve[iMidiPan];  
183          iLastPanRequest = iMidiPan;          iLastPanRequest = iMidiPan;
184      }      }
185    
# Line 191  namespace LinuxSampler { Line 187  namespace LinuxSampler {
187          return (pEngine) ? pEngine->pAudioOutputDevice : NULL;          return (pEngine) ? pEngine->pAudioOutputDevice : NULL;
188      }      }
189    
190        /**
191         * Gets thread safe access to the currently connected audio output
192         * device from other threads than the lscp thread.
193         */
194        AudioOutputDevice* AbstractEngineChannel::GetAudioOutputDeviceSafe() {
195            EngineMutex.Lock();
196            AudioOutputDevice* res = GetAudioOutputDevice();
197            EngineMutex.Unlock();
198            return res;
199        }
200    
201      void AbstractEngineChannel::SetOutputChannel(uint EngineAudioChannel, uint AudioDeviceChannel) {      void AbstractEngineChannel::SetOutputChannel(uint EngineAudioChannel, uint AudioDeviceChannel) {
202          if (!pEngine || !pEngine->pAudioOutputDevice) throw AudioOutputException("No audio output device connected yet.");          if (!pEngine || !pEngine->pAudioOutputDevice) throw AudioOutputException("No audio output device connected yet.");
203    

Legend:
Removed from v.2317  
changed lines
  Added in v.2382

  ViewVC Help
Powered by ViewVC