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 |
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 |
|
|
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 |
|
|