228 |
} |
} |
229 |
catch (AudioOutputException e) { |
catch (AudioOutputException e) { |
230 |
String msg = "Audio output device unable to provide 2 audio channels, cause: " + e.Message(); |
String msg = "Audio output device unable to provide 2 audio channels, cause: " + e.Message(); |
231 |
throw LinuxSamplerException(msg); |
throw Exception(msg); |
232 |
} |
} |
233 |
|
|
234 |
this->MaxSamplesPerCycle = pAudioOutputDevice->MaxSamplesPerCycle(); |
this->MaxSamplesPerCycle = pAudioOutputDevice->MaxSamplesPerCycle(); |
329 |
} |
} |
330 |
|
|
331 |
/** |
/** |
332 |
* Let this engine proceed to render the given amount of sample points. The |
* Let this engine proceed to render the given amount of sample points. |
333 |
* calculated audio data of all voices of this engine will be placed into |
* The engine will iterate through all engine channels and render audio |
334 |
* the engine's audio sum buffer which has to be copied and eventually be |
* for each engine channel independently. The calculated audio data of |
335 |
* converted to the appropriate value range by the audio output class (e.g. |
* all voices of each engine channel will be placed into the audio sum |
336 |
* AlsaIO or JackIO) right after. |
* buffers of the respective audio output device, connected to the |
337 |
|
* respective engine channel. |
338 |
* |
* |
339 |
* @param Samples - number of sample points to be rendered |
* @param Samples - number of sample points to be rendered |
340 |
* @returns 0 on success |
* @returns 0 on success |
643 |
{ |
{ |
644 |
const ::gig::Instrument* pInstrument = pEngineChannel->pInstrument; |
const ::gig::Instrument* pInstrument = pEngineChannel->pInstrument; |
645 |
if (key >= pInstrument->DimensionKeyRange.low && key <= pInstrument->DimensionKeyRange.high) |
if (key >= pInstrument->DimensionKeyRange.low && key <= pInstrument->DimensionKeyRange.high) |
646 |
pEngineChannel->CurrentKeyDimension = ((key - pInstrument->DimensionKeyRange.low) * 128) / |
pEngineChannel->CurrentKeyDimension = float(key - pInstrument->DimensionKeyRange.low) / |
647 |
(pInstrument->DimensionKeyRange.high - pInstrument->DimensionKeyRange.low + 1); |
(pInstrument->DimensionKeyRange.high - pInstrument->DimensionKeyRange.low + 1); |
648 |
} |
} |
649 |
|
|
871 |
DimValues[i] = itNoteOnEvent->Param.Note.Velocity; |
DimValues[i] = itNoteOnEvent->Param.Note.Velocity; |
872 |
break; |
break; |
873 |
case ::gig::dimension_channelaftertouch: |
case ::gig::dimension_channelaftertouch: |
874 |
DimValues[i] = 0; //TODO: we currently ignore this dimension |
DimValues[i] = pEngineChannel->ControllerTable[128]; |
875 |
break; |
break; |
876 |
case ::gig::dimension_releasetrigger: |
case ::gig::dimension_releasetrigger: |
877 |
VoiceType = (ReleaseTriggerVoice) ? Voice::type_release_trigger : (!iLayer) ? Voice::type_release_trigger_required : Voice::type_normal; |
VoiceType = (ReleaseTriggerVoice) ? Voice::type_release_trigger : (!iLayer) ? Voice::type_release_trigger_required : Voice::type_normal; |
878 |
DimValues[i] = (uint) ReleaseTriggerVoice; |
DimValues[i] = (uint) ReleaseTriggerVoice; |
879 |
break; |
break; |
880 |
case ::gig::dimension_keyboard: |
case ::gig::dimension_keyboard: |
881 |
DimValues[i] = (uint) pEngineChannel->CurrentKeyDimension; |
DimValues[i] = (uint) (pEngineChannel->CurrentKeyDimension * pRegion->pDimensionDefinitions[i].zones); |
882 |
break; |
break; |
883 |
case ::gig::dimension_roundrobin: |
case ::gig::dimension_roundrobin: |
884 |
DimValues[i] = (uint) pEngineChannel->pMIDIKeyInfo[MIDIKey].RoundRobinIndex; // incremented for each note on |
DimValues[i] = (uint) pEngineChannel->pMIDIKeyInfo[MIDIKey].RoundRobinIndex; // incremented for each note on |
1358 |
break; |
break; |
1359 |
} |
} |
1360 |
case 123: { // all notes off |
case 123: { // all notes off |
1361 |
|
#if CONFIG_PROCESS_ALL_NOTES_OFF |
1362 |
ReleaseAllVoices(pEngineChannel, itControlChangeEvent); |
ReleaseAllVoices(pEngineChannel, itControlChangeEvent); |
1363 |
|
#endif // CONFIG_PROCESS_ALL_NOTES_OFF |
1364 |
break; |
break; |
1365 |
} |
} |
1366 |
case 126: { // mono mode on |
case 126: { // mono mode on |
1568 |
} |
} |
1569 |
|
|
1570 |
String Engine::Version() { |
String Engine::Version() { |
1571 |
String s = "$Revision: 1.60 $"; |
String s = "$Revision: 1.65 $"; |
1572 |
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 |
1573 |
} |
} |
1574 |
|
|