• Home
  • Raw
  • Download

Lines Matching refs:pSynth

125 EAS_INLINE const S_REGION* GetRegionPtr (S_SYNTH *pSynth, EAS_U16 regionIndex)  in GetRegionPtr()  argument
129 return &pSynth->pDLS->pDLSRegions[regionIndex & REGION_INDEX_MASK].wtRegion.region; in GetRegionPtr()
133 return &pSynth->pEAS->pFMRegions[regionIndex & REGION_INDEX_MASK].region; in GetRegionPtr()
135 return &pSynth->pEAS->pWTRegions[regionIndex].region; in GetRegionPtr()
137 return &pSynth->pEAS->pWTRegions[regionIndex].region; in GetRegionPtr()
139 return &pSynth->pEAS->pFMRegions[regionIndex].region; in GetRegionPtr()
165 EAS_INLINE EAS_U8 VSynthToChannel (S_SYNTH *pSynth, EAS_U8 channel) in VSynthToChannel() argument
168 return channel | (pSynth->vSynthNum << 4); in VSynthToChannel()
197 S_SYNTH *pSynth; in IncVoicePoolCount() local
206 pSynth = pVoiceMgr->pSynth[GET_VSYNTH(pVoice->nextChannel)]; in IncVoicePoolCount()
207 pool = pSynth->channels[GET_CHANNEL(pVoice->nextChannel)].pool; in IncVoicePoolCount()
211 pSynth = pVoiceMgr->pSynth[GET_VSYNTH(pVoice->channel)]; in IncVoicePoolCount()
212 pool = pSynth->channels[GET_CHANNEL(pVoice->channel)].pool; in IncVoicePoolCount()
215 pSynth->poolCount[pool]++; in IncVoicePoolCount()
230 S_SYNTH *pSynth; in DecVoicePoolCount() local
239 pSynth = pVoiceMgr->pSynth[GET_VSYNTH(pVoice->nextChannel)]; in DecVoicePoolCount()
240 pool = pSynth->channels[GET_CHANNEL(pVoice->nextChannel)].pool; in DecVoicePoolCount()
244 pSynth = pVoiceMgr->pSynth[GET_VSYNTH(pVoice->channel)]; in DecVoicePoolCount()
245 pool = pSynth->channels[GET_CHANNEL(pVoice->channel)].pool; in DecVoicePoolCount()
248 pSynth->poolCount[pool]--; in DecVoicePoolCount()
329 S_SYNTH *pSynth; in VMInitMIDI() local
337 if (pEASData->pVoiceMgr->pSynth[0] != NULL) in VMInitMIDI()
344 pSynth = EAS_CMEnumData(EAS_CM_MIDI_DATA); in VMInitMIDI()
352 if (pEASData->pVoiceMgr->pSynth[virtualSynthNum] == NULL) in VMInitMIDI()
359 pSynth = EAS_HWMalloc(pEASData->hwInstData, sizeof(S_SYNTH)); in VMInitMIDI()
363 if (pSynth == NULL) in VMInitMIDI()
368 EAS_HWMemSet(pSynth, 0, sizeof(S_SYNTH)); in VMInitMIDI()
371 if ((result = VMSetEASLib(pSynth, pEASData->pVoiceMgr->pGlobalEAS)) != EAS_SUCCESS) in VMInitMIDI()
373 VMMIDIShutdown(pEASData, pSynth); in VMInitMIDI()
381 pSynth->pDLS = pEASData->pVoiceMgr->pGlobalDLS; in VMInitMIDI()
382 DLSAddRef(pSynth->pDLS); in VMInitMIDI()
387 pSynth->synthFlags = DEFAULT_SYNTH_FLAGS; in VMInitMIDI()
388 pSynth->masterVolume = DEFAULT_SYNTH_MASTER_VOLUME; in VMInitMIDI()
389 pSynth->refCount = 1; in VMInitMIDI()
390 pSynth->priority = DEFAULT_SYNTH_PRIORITY; in VMInitMIDI()
391 pSynth->poolAlloc[0] = (EAS_U8) pEASData->pVoiceMgr->maxPolyphony; in VMInitMIDI()
393 VMInitializeAllChannels(pEASData->pVoiceMgr, pSynth); in VMInitMIDI()
395 pSynth->vSynthNum = (EAS_U8) virtualSynthNum; in VMInitMIDI()
396 pEASData->pVoiceMgr->pSynth[virtualSynthNum] = pSynth; in VMInitMIDI()
398 *ppSynth = pSynth; in VMInitMIDI()
429 void VMReset (S_VOICE_MGR *pVoiceMgr, S_SYNTH *pSynth, EAS_BOOL force) in VMReset() argument
439 pVoiceMgr->activeVoices -= pSynth->numActiveVoices; in VMReset()
440 pSynth->numActiveVoices = 0; in VMReset()
441 VMInitializeAllVoices(pVoiceMgr, pSynth->vSynthNum); in VMReset()
444 VMMuteAllVoices(pVoiceMgr, pSynth); in VMReset()
447 if (pSynth->numActiveVoices == 0) in VMReset()
455 VMInitializeAllChannels(pVoiceMgr, pSynth); in VMReset()
457 pSynth->poolCount[i] = 0; in VMReset()
460 if (pSynth->maxPolyphony < pVoiceMgr->maxPolyphony) in VMReset()
461 pSynth->poolAlloc[0] = (EAS_U8) pVoiceMgr->maxPolyphony; in VMReset()
463 pSynth->poolAlloc[0] = (EAS_U8) pSynth->maxPolyphony; in VMReset()
466 pSynth->synthFlags &= ~SYNTH_FLAG_RESET_IS_REQUESTED; in VMReset()
471 pSynth->synthFlags |= SYNTH_FLAG_RESET_IS_REQUESTED; in VMReset()
486 void VMInitializeAllChannels (S_VOICE_MGR *pVoiceMgr, S_SYNTH *pSynth) in VMInitializeAllChannels() argument
491 VMResetControllers(pSynth); in VMInitializeAllChannels()
494 pChannel = pSynth->channels; in VMInitializeAllChannels()
512 VMProgramChange(pVoiceMgr, pSynth, (EAS_U8) i, DEFAULT_SYNTH_PROGRAM_NUMBER); in VMInitializeAllChannels()
529 void VMResetControllers (S_SYNTH *pSynth) in VMResetControllers() argument
534 pChannel = pSynth->channels; in VMResetControllers()
545 pSynth->channels[i].reverbSend = DEFAULT_REVERB_SEND; in VMResetControllers()
549 pSynth->channels[i].chorusSend = DEFAULT_CHORUS_SEND; in VMResetControllers()
603 S_SYNTH *pSynth; in VMMuteVoice() local
614 pSynth = pVoiceMgr->pSynth[GET_VSYNTH(pVoice->channel)]; in VMMuteVoice()
615 GetSynthPtr(voiceNum)->pfMuteVoice(pVoiceMgr, pSynth, pVoice, GetAdjustedVoiceNum(voiceNum)); in VMMuteVoice()
626 void VMReleaseVoice (S_VOICE_MGR *pVoiceMgr, S_SYNTH *pSynth, EAS_I32 voiceNum) in VMReleaseVoice() argument
641 …GetSynthPtr(voiceNum)->pfReleaseVoice(pVoiceMgr, pSynth, &pVoiceMgr->voices[voiceNum], GetAdjusted… in VMReleaseVoice()
651 void VMInitMIPTable (S_SYNTH *pSynth) in VMInitMIPTable() argument
660 pSynth->synthFlags &= ~SYNTH_FLAG_SP_MIDI_ON; in VMInitMIPTable()
663 pSynth->channels[i].pool = 0; in VMInitMIPTable()
664 pSynth->channels[i].mip = 0; in VMInitMIPTable()
675 void VMSetMIPEntry (S_VOICE_MGR *pVoiceMgr, S_SYNTH *pSynth, EAS_U8 channel, EAS_U8 priority, EAS_U… in VMSetMIPEntry() argument
685 pSynth->channels[channel].pool = priority; in VMSetMIPEntry()
686 pSynth->channels[channel].mip = mip; in VMSetMIPEntry()
698 void VMMIPUpdateChannelMuting (S_VOICE_MGR *pVoiceMgr, S_SYNTH *pSynth) in VMMIPUpdateChannelMuting() argument
711 if (pSynth->maxPolyphony) in VMMIPUpdateChannelMuting()
712 maxPolyphony = pSynth->maxPolyphony; in VMMIPUpdateChannelMuting()
721 if ((pSynth->channels[i].mip != 0) && (pSynth->channels[i].mip <= maxPolyphony)) in VMMIPUpdateChannelMuting()
722 pSynth->channels[i].channelFlags &= ~CHANNEL_FLAG_MUTE; in VMMIPUpdateChannelMuting()
724 pSynth->channels[i].channelFlags |= CHANNEL_FLAG_MUTE; in VMMIPUpdateChannelMuting()
727 pSynth->poolCount[i] = 0; in VMMIPUpdateChannelMuting()
751 if (vSynthNum != pSynth->vSynthNum) in VMMIPUpdateChannelMuting()
755 pool = pSynth->channels[channel].pool; in VMMIPUpdateChannelMuting()
758 if (pSynth->channels[channel].channelFlags & CHANNEL_FLAG_MUTE) in VMMIPUpdateChannelMuting()
767 VMReleaseVoice(pVoiceMgr, pSynth, i); in VMMIPUpdateChannelMuting()
768 pSynth->poolCount[pool]++; in VMMIPUpdateChannelMuting()
774 pSynth->poolCount[pool]++; in VMMIPUpdateChannelMuting()
789 void VMUpdateMIPTable (S_VOICE_MGR *pVoiceMgr, S_SYNTH *pSynth) in VMUpdateMIPTable() argument
802 pSynth->synthFlags |= SYNTH_FLAG_SP_MIDI_ON; in VMUpdateMIPTable()
809 if (pSynth->channels[i].pool != DEFAULT_SP_MIDI_PRIORITY) in VMUpdateMIPTable()
810 priority[pSynth->channels[i].pool] = i; in VMUpdateMIPTable()
822 pChannel = &pSynth->channels[priority[i]]; in VMUpdateMIPTable()
834 pSynth->poolAlloc[currentPool] = (EAS_U8) (pChannel->mip - currentMIP); in VMUpdateMIPTable()
840 pSynth->synthFlags |= SYNTH_FLAG_SP_MIDI_ON; in VMUpdateMIPTable()
843 VMMIPUpdateChannelMuting (pVoiceMgr, pSynth); in VMUpdateMIPTable()
863 void VMMuteAllVoices (S_VOICE_MGR *pVoiceMgr, S_SYNTH *pSynth) in VMMuteAllVoices() argument
876 if (GET_VSYNTH(pVoiceMgr->voices[i].nextChannel) == pSynth->vSynthNum) in VMMuteAllVoices()
880 else if (pSynth->vSynthNum == GET_VSYNTH(pVoiceMgr->voices[i].channel)) in VMMuteAllVoices()
904 void VMReleaseAllVoices (S_VOICE_MGR *pVoiceMgr, S_SYNTH *pSynth) in VMReleaseAllVoices() argument
911 if (pSynth->channels[ i ].channelFlags & CHANNEL_FLAG_SUSTAIN_PEDAL) in VMReleaseAllVoices()
913 VMReleaseAllDeferredNoteOffs(pVoiceMgr, pSynth, (EAS_U8) i); in VMReleaseAllVoices()
914 pSynth->channels[i].channelFlags &= ~CHANNEL_FLAG_SUSTAIN_PEDAL; in VMReleaseAllVoices()
927 if (GET_VSYNTH(pVoiceMgr->voices[i].channel) == pSynth->vSynthNum) in VMReleaseAllVoices()
928 VMReleaseVoice(pVoiceMgr, pSynth, i); in VMReleaseAllVoices()
932 if (GET_VSYNTH(pVoiceMgr->voices[i].nextChannel) == pSynth->vSynthNum) in VMReleaseAllVoices()
969 void VMAllNotesOff (S_VOICE_MGR *pVoiceMgr, S_SYNTH *pSynth, EAS_U8 channel) in VMAllNotesOff() argument
987 channel = VSynthToChannel(pSynth, channel); in VMAllNotesOff()
997 … GetSynthPtr(voiceNum)->pfMuteVoice(pVoiceMgr, pSynth, pVoice, GetAdjustedVoiceNum(voiceNum)); in VMAllNotesOff()
1022 void VMDeferredStopNote (S_VOICE_MGR *pVoiceMgr, S_SYNTH *pSynth) in VMDeferredStopNote() argument
1086 if (pSynth->channels[channel].channelFlags & CHANNEL_FLAG_SUSTAIN_PEDAL) in VMDeferredStopNote()
1088 …GetSynthPtr(voiceNum)->pfSustainPedal(pVoiceMgr, pSynth, &pVoiceMgr->voices[voiceNum], &pSynth->ch… in VMDeferredStopNote()
1093 VMReleaseVoice(pVoiceMgr, pSynth, voiceNum); in VMDeferredStopNote()
1103 pSynth->synthFlags ^= SYNTH_FLAG_DEFERRED_MIDI_NOTE_OFF_PENDING; in VMDeferredStopNote()
1129 void VMReleaseAllDeferredNoteOffs (S_VOICE_MGR *pVoiceMgr, S_SYNTH *pSynth, EAS_U8 channel) in VMReleaseAllDeferredNoteOffs() argument
1147 channel = VSynthToChannel(pSynth, channel); in VMReleaseAllDeferredNoteOffs()
1159 VMReleaseVoice(pVoiceMgr, pSynth, voiceNum); in VMReleaseAllDeferredNoteOffs()
1190 void VMCatchNotesForSustainPedal (S_VOICE_MGR *pVoiceMgr, S_SYNTH *pSynth, EAS_U8 channel) in VMCatchNotesForSustainPedal() argument
1204 channel = VSynthToChannel(pSynth, channel); in VMCatchNotesForSustainPedal()
1212 …GetSynthPtr(voiceNum)->pfSustainPedal(pVoiceMgr, pSynth, &pVoiceMgr->voices[voiceNum], &pSynth->ch… in VMCatchNotesForSustainPedal()
1260 static void VMStolenVoice (S_VOICE_MGR *pVoiceMgr, S_SYNTH *pSynth, EAS_I32 voiceNum, EAS_U8 channe… in VMStolenVoice() argument
1268 …GetSynthPtr(voiceNum)->pfMuteVoice(pVoiceMgr, pVoiceMgr->pSynth[GET_VSYNTH(pVoice->channel)], &pVo… in VMStolenVoice()
1272 pVoice->nextChannel = VSynthToChannel(pSynth, channel); in VMStolenVoice()
1307 static void VMFreeVoice (S_VOICE_MGR *pVoiceMgr, S_SYNTH *pSynth, S_SYNTH_VOICE *pVoice) in VMFreeVoice() argument
1328 pSynth->numActiveVoices--; in VMFreeVoice()
1358 S_SYNTH *pSynth; in VMRetargetStolenVoice() local
1363 pSynth = pVoiceMgr->pSynth[GET_VSYNTH(pVoice->channel)]; in VMRetargetStolenVoice()
1364 pMIDIChannel = &pSynth->channels[pVoice->channel & 15]; in VMRetargetStolenVoice()
1365 pNextSynth = pVoiceMgr->pSynth[GET_VSYNTH(pVoice->nextChannel)]; in VMRetargetStolenVoice()
1376 if ((pSynth->synthFlags & SYNTH_FLAG_SP_MIDI_ON) && in VMRetargetStolenVoice()
1379 VMFreeVoice(pVoiceMgr, pSynth, &pVoiceMgr->voices[voiceNum]); in VMRetargetStolenVoice()
1389 pSynth->numActiveVoices--; in VMRetargetStolenVoice()
1436 void VMCheckKeyGroup (S_VOICE_MGR *pVoiceMgr, S_SYNTH *pSynth, EAS_U16 keyGroup, EAS_U8 channel) in VMCheckKeyGroup() argument
1445 channel = VSynthToChannel(pSynth, channel); in VMCheckKeyGroup()
1454 pRegion = GetRegionPtr(pSynth, pVoiceMgr->voices[voiceNum].regionIndex); in VMCheckKeyGroup()
1479 pRegion = GetRegionPtr(pSynth, pVoiceMgr->voices[voiceNum].nextRegionIndex); in VMCheckKeyGroup()
1524 EAS_BOOL VMCheckPolyphonyLimiting (S_VOICE_MGR *pVoiceMgr, S_SYNTH *pSynth, EAS_U8 channel, EAS_U8 … in VMCheckPolyphonyLimiting() argument
1537 channel = VSynthToChannel(pSynth, channel); in VMCheckPolyphonyLimiting()
1583 VMStolenVoice(pVoiceMgr, pSynth, oldestVoiceNum, channel, note, velocity, regionIndex); in VMCheckPolyphonyLimiting()
1599 void VMStartVoice (S_VOICE_MGR *pVoiceMgr, S_SYNTH *pSynth, EAS_U8 channel, EAS_U8 note, EAS_U8 vel… in VMStartVoice() argument
1608 pChannel = &pSynth->channels[channel]; in VMStartVoice()
1609 pRegion = GetRegionPtr(pSynth, regionIndex); in VMStartVoice()
1638 if (pSynth->poolCount[pChannel->pool] != 0) in VMStartVoice()
1644 VMCheckKeyGroup(pVoiceMgr, pSynth, keyGroup, channel); in VMStartVoice()
1649 …if (VMCheckPolyphonyLimiting(pVoiceMgr, pSynth, channel, note, velocity, regionIndex, lowVoice, hi… in VMStartVoice()
1655 if ((pSynth->maxPolyphony == 0) || (pVoiceMgr->maxPolyphony < pSynth->maxPolyphony)) in VMStartVoice()
1658 maxSynthPoly = pSynth->maxPolyphony; in VMStartVoice()
1662 (pSynth->numActiveVoices < maxSynthPoly) && in VMStartVoice()
1673 pSynth->numActiveVoices++; in VMStartVoice()
1681 pVoiceMgr->voices[voiceNum].channel = VSynthToChannel(pSynth, channel); in VMStartVoice()
1696 …GetSynthPtr(voiceNum)->pfStartVoice(pVoiceMgr, pSynth, &pVoiceMgr->voices[voiceNum], GetAdjustedVo… in VMStartVoice()
1701 … if (VMStealVoice(pVoiceMgr, pSynth, &voiceNum, channel, note, lowVoice, highVoice) == EAS_SUCCESS) in VMStartVoice()
1702 VMStolenVoice(pVoiceMgr, pSynth, voiceNum, channel, note, velocity, regionIndex); in VMStartVoice()
1736 void VMStartNote (S_VOICE_MGR *pVoiceMgr, S_SYNTH *pSynth, EAS_U8 channel, EAS_U8 note, EAS_U8 velo… in VMStartNote() argument
1743 pSynth->totalNoteCount++; in VMStartNote()
1745 pChannel = &pSynth->channels[channel]; in VMStartNote()
1753 if ((pChannel->channelFlags & CHANNEL_FLAG_EXTERNAL_AUDIO) && (pSynth->cbEventFunc != NULL)) in VMStartNote()
1760 if (pSynth->cbEventFunc(pSynth->pExtAudioInstData, &event)) in VMStartNote()
1773 adjustedNote += pChannel->coarsePitch + pSynth->globalTranspose; in VMStartNote()
1792 const S_DLS_REGION *pDLSRegion = (S_DLS_REGION*) GetRegionPtr(pSynth, regionIndex); in VMStartNote()
1798 VMStartVoice(pVoiceMgr, pSynth, channel, note, velocity, regionIndex); in VMStartNote()
1817 const S_REGION *pRegion = GetRegionPtr(pSynth, regionIndex); in VMStartNote()
1822 VMStartVoice(pVoiceMgr, pSynth, channel, note, velocity, regionIndex); in VMStartNote()
1857 void VMStopNote (S_VOICE_MGR *pVoiceMgr, S_SYNTH *pSynth, EAS_U8 channel, EAS_U8 note, EAS_U8 veloc… in VMStopNote() argument
1862 pChannel = &(pSynth->channels[channel]); in VMStopNote()
1865 if ((pChannel->channelFlags & CHANNEL_FLAG_EXTERNAL_AUDIO) && (pSynth->cbEventFunc != NULL)) in VMStopNote()
1872 if (pSynth->cbEventFunc(pSynth->pExtAudioInstData, &event)) in VMStopNote()
1880 channel = VSynthToChannel(pSynth, channel); in VMStopNote()
1911 pSynth->synthFlags |= SYNTH_FLAG_DEFERRED_MIDI_NOTE_OFF_PENDING; in VMStopNote()
1916 VMReleaseVoice(pVoiceMgr, pSynth, voiceNum); in VMStopNote()
2002 EAS_RESULT VMStealVoice (S_VOICE_MGR *pVoiceMgr, S_SYNTH *pSynth, EAS_INT *pVoiceNumber, EAS_U8 cha… in VMStealVoice() argument
2028 pCurrSynth = pVoiceMgr->pSynth[GET_VSYNTH(pCurrVoice->nextChannel)]; in VMStealVoice()
2034 pCurrSynth = pVoiceMgr->pSynth[GET_VSYNTH(pCurrVoice->channel)]; in VMStealVoice()
2040 if (pSynth->priority > pCurrSynth->priority) in VMStealVoice()
2064 if (pSynth->synthFlags & SYNTH_FLAG_SP_MIDI_ON) in VMStealVoice()
2068 if (pSynth->poolCount[pChannel->pool] >= pSynth->poolAlloc[pChannel->pool]) in VMStealVoice()
2069 …currentPriority += (pSynth->poolCount[pChannel->pool] -pSynth->poolAlloc[pChannel->pool] + 1) << C… in VMStealVoice()
2128 void VMChannelPressure (S_SYNTH *pSynth, EAS_U8 channel, EAS_U8 value) in VMChannelPressure() argument
2132 pChannel = &(pSynth->channels[channel]); in VMChannelPressure()
2170 void VMPitchBend (S_SYNTH *pSynth, EAS_U8 channel, EAS_U8 nPitchLSB, EAS_U8 nPitchMSB) in VMPitchBend() argument
2174 pChannel = &(pSynth->channels[channel]); in VMPitchBend()
2202 void VMControlChange (S_VOICE_MGR *pVoiceMgr, S_SYNTH *pSynth, EAS_U8 channel, EAS_U8 controller, E… in VMControlChange() argument
2206 pChannel = &(pSynth->channels[channel]); in VMControlChange()
2277 VMReleaseAllDeferredNoteOffs(pVoiceMgr, pSynth, channel); in VMControlChange()
2301 VMCatchNotesForSustainPedal(pVoiceMgr, pSynth, channel); in VMControlChange()
2312 pSynth->channels[channel].reverbSend = value; in VMControlChange()
2318 pSynth->channels[channel].chorusSend = value; in VMControlChange()
2360 VMUpdateRPNStateMachine(pSynth, channel, controller, value); in VMControlChange()
2370 VMAllNotesOff(pVoiceMgr, pSynth, channel); in VMControlChange()
2411 EAS_RESULT VMUpdateRPNStateMachine (S_SYNTH *pSynth, EAS_U8 channel, EAS_U8 controller, EAS_U8 valu… in VMUpdateRPNStateMachine() argument
2424 pChannel = &(pSynth->channels[channel]); in VMUpdateRPNStateMachine()
2502 void VMUpdateStaticChannelParameters (S_VOICE_MGR *pVoiceMgr, S_SYNTH *pSynth) in VMUpdateStaticChannelParameters() argument
2506 if (pSynth->synthFlags & SYNTH_FLAG_UPDATE_ALL_CHANNEL_PARAMETERS) in VMUpdateStaticChannelParameters()
2516 if (pSynth->channels[channel].regionIndex & FLAG_RGN_IDX_FM_SYNTH) in VMUpdateStaticChannelParameters()
2517 pSecondarySynth->pfUpdateChannel(pVoiceMgr, pSynth, (EAS_U8) channel); in VMUpdateStaticChannelParameters()
2519 pPrimarySynth->pfUpdateChannel(pVoiceMgr, pSynth, (EAS_U8) channel); in VMUpdateStaticChannelParameters()
2521 pPrimarySynth->pfUpdateChannel(pVoiceMgr, pSynth, (EAS_U8) channel); in VMUpdateStaticChannelParameters()
2529 pSynth->synthFlags &= ~SYNTH_FLAG_UPDATE_ALL_CHANNEL_PARAMETERS; in VMUpdateStaticChannelParameters()
2537 … if ( 0 != (pSynth->channels[channel].channelFlags & CHANNEL_FLAG_UPDATE_CHANNEL_PARAMETERS)) in VMUpdateStaticChannelParameters()
2540 if (pSynth->channels[channel].regionIndex & FLAG_RGN_IDX_FM_SYNTH) in VMUpdateStaticChannelParameters()
2541 pSecondarySynth->pfUpdateChannel(pVoiceMgr, pSynth, (EAS_U8) channel); in VMUpdateStaticChannelParameters()
2543 pPrimarySynth->pfUpdateChannel(pVoiceMgr, pSynth, (EAS_U8) channel); in VMUpdateStaticChannelParameters()
2545 pPrimarySynth->pfUpdateChannel(pVoiceMgr, pSynth, (EAS_U8) channel); in VMUpdateStaticChannelParameters()
2676 void VMProgramChange (S_VOICE_MGR *pVoiceMgr, S_SYNTH *pSynth, EAS_U8 channel, EAS_U8 program) in VMProgramChange() argument
2687 pChannel = &pSynth->channels[channel]; in VMProgramChange()
2706 if (pSynth->cbProgChgFunc != NULL) in VMProgramChange()
2712 if (pSynth->cbProgChgFunc(pSynth->pExtAudioInstData, &prgChg)) in VMProgramChange()
2721 if (VMFindDLSProgram(pSynth->pDLS, bank, program, &regionIndex) != EAS_SUCCESS) in VMProgramChange()
2728 if (VMFindProgram(pSynth->pEAS, bank, program, &regionIndex) != EAS_SUCCESS) in VMProgramChange()
2732 if (pSynth->channels[channel].channelFlags & CHANNEL_FLAG_RHYTHM_CHANNEL) in VMProgramChange()
2737 if (VMFindProgram(pSynth->pEAS, bank, program, &regionIndex) != EAS_SUCCESS) in VMProgramChange()
2741 if (VMFindProgram(pSynth->pEAS, bank, 0, &regionIndex) != EAS_SUCCESS) in VMProgramChange()
2781 S_SYNTH *pSynth; in VMAddSamples() local
2803 pSynth = pVoiceMgr->pSynth[pVoiceMgr->voices[voiceNum].channel >> 4]; in VMAddSamples()
2808 …done = GetSynthPtr(voiceNum)->pfUpdateVoice(pVoiceMgr, pSynth, &pVoiceMgr->voices[voiceNum], GetAd… in VMAddSamples()
2820 VMFreeVoice(pVoiceMgr, pSynth, &pVoiceMgr->voices[voiceNum]); in VMAddSamples()
2857 S_SYNTH *pSynth; in VMRender() local
2869 if (pVoiceMgr->pSynth[i] != NULL) in VMRender()
2870 VMUpdateStaticChannelParameters(pVoiceMgr, pVoiceMgr->pSynth[i]); in VMRender()
2885 pSynth = pVoiceMgr->pSynth[i]; in VMRender()
2887 if (pSynth== NULL) in VMRender()
2890 if (pSynth->synthFlags & SYNTH_FLAG_DEFERRED_MIDI_NOTE_OFF_PENDING) in VMRender()
2891 VMDeferredStopNote(pVoiceMgr, pSynth); in VMRender()
2894 if ((pSynth->synthFlags & SYNTH_FLAG_RESET_IS_REQUESTED) && in VMRender()
2895 (pSynth->numActiveVoices == 0)) in VMRender()
2905 VMInitializeAllChannels(pVoiceMgr, pSynth); in VMRender()
2906 VMInitializeAllVoices(pVoiceMgr, pSynth->vSynthNum); in VMRender()
2909 pSynth->synthFlags &= ~SYNTH_FLAG_RESET_IS_REQUESTED; in VMRender()
2914 pSynth->channels[channel].channelFlags &= ~CHANNEL_FLAG_UPDATE_CHANNEL_PARAMETERS; in VMRender()
3003 EAS_I32 VMActiveVoices (S_SYNTH *pSynth) in VMActiveVoices() argument
3005 return pSynth->numActiveVoices; in VMActiveVoices()
3027 EAS_RESULT VMSetPolyphony (S_VOICE_MGR *pVoiceMgr, S_SYNTH *pSynth, EAS_I32 polyphonyCount) in VMSetPolyphony() argument
3039 pSynth->maxPolyphony = 0; in VMSetPolyphony()
3044 pSynth->maxPolyphony = (EAS_U16) polyphonyCount; in VMSetPolyphony()
3051 if (pSynth->synthFlags & SYNTH_FLAG_SP_MIDI_ON) in VMSetPolyphony()
3052 VMMIPUpdateChannelMuting(pVoiceMgr, pSynth); in VMSetPolyphony()
3054 pSynth->poolAlloc[0] = (EAS_U8) polyphonyCount; in VMSetPolyphony()
3057 if (pSynth->numActiveVoices <= polyphonyCount) in VMSetPolyphony()
3065 if (GET_VSYNTH(pVoiceMgr->voices[i].nextChannel) != pSynth->vSynthNum) in VMSetPolyphony()
3087 if (GET_VSYNTH(pVoice->nextChannel) != pSynth->vSynthNum) in VMSetPolyphony()
3097 …currentPriority += pSynth->channels[GET_CHANNEL(pVoice->nextChannel)].pool << CHANNEL_PRIORITY_STE… in VMSetPolyphony()
3110 …currentPriority += pSynth->channels[GET_CHANNEL(pVoice->nextChannel)].pool << CHANNEL_PRIORITY_STE… in VMSetPolyphony()
3155 EAS_RESULT VMSetPriority (S_VOICE_MGR *pVoiceMgr, S_SYNTH *pSynth, EAS_I32 priority) in VMSetPriority() argument
3157 pSynth->priority = (EAS_U8) priority ; in VMSetPriority()
3179 void VMSetVolume (S_SYNTH *pSynth, EAS_U16 masterVolume) in VMSetVolume() argument
3181 pSynth->masterVolume = masterVolume; in VMSetVolume()
3182 pSynth->synthFlags |= SYNTH_FLAG_UPDATE_ALL_CHANNEL_PARAMETERS; in VMSetVolume()
3191 void VMSetPitchBendRange (S_SYNTH *pSynth, EAS_INT channel, EAS_I16 pitchBendRange) in VMSetPitchBendRange() argument
3193 pSynth->channels[channel].pitchBendSensitivity = pitchBendRange; in VMSetPitchBendRange()
3262 EAS_RESULT VMSetEASLib (S_SYNTH *pSynth, EAS_SNDLIB_HANDLE pEAS) in VMSetEASLib() argument
3270 pSynth->pEAS = pEAS; in VMSetEASLib()
3291 EAS_RESULT VMSetDLSLib (S_SYNTH *pSynth, EAS_DLSLIB_HANDLE pDLS) in VMSetDLSLib() argument
3293 pSynth->pDLS = pDLS; in VMSetDLSLib()
3316 void VMSetTranposition (S_SYNTH *pSynth, EAS_I32 transposition) in VMSetTranposition() argument
3318 pSynth->globalTranspose = (EAS_I8) transposition; in VMSetTranposition()
3337 void VMMIDIShutdown (S_EAS_DATA *pEASData, S_SYNTH *pSynth) in VMMIDIShutdown() argument
3342 if (--pSynth->refCount > 0) in VMMIDIShutdown()
3345 vSynthNum = pSynth->vSynthNum; in VMMIDIShutdown()
3350 if (pSynth->pDLS != NULL) in VMMIDIShutdown()
3353 if ((result = DLSCleanup(pEASData->hwInstData, pSynth->pDLS)) != EAS_SUCCESS) in VMMIDIShutdown()
3355 pSynth->pDLS = NULL; in VMMIDIShutdown()
3359 VMReset(pEASData->pVoiceMgr, pSynth, EAS_TRUE); in VMMIDIShutdown()
3363 EAS_HWFree(pEASData->hwInstData, pSynth); in VMMIDIShutdown()
3366 pEASData->pVoiceMgr->pSynth[vSynthNum] = NULL; in VMMIDIShutdown()
3414 void VMRegExtAudioCallback (S_SYNTH *pSynth, EAS_VOID_PTR pInstData, EAS_EXT_PRG_CHG_FUNC cbProgChg… in VMRegExtAudioCallback() argument
3416 pSynth->pExtAudioInstData = pInstData; in VMRegExtAudioCallback()
3417 pSynth->cbProgChgFunc = cbProgChgFunc; in VMRegExtAudioCallback()
3418 pSynth->cbEventFunc = cbEventFunc; in VMRegExtAudioCallback()
3427 void VMGetMIDIControllers (S_SYNTH *pSynth, EAS_U8 channel, S_MIDI_CONTROLLERS *pControl) in VMGetMIDIControllers() argument
3429 pControl->modWheel = pSynth->channels[channel].modWheel; in VMGetMIDIControllers()
3430 pControl->volume = pSynth->channels[channel].volume; in VMGetMIDIControllers()
3431 pControl->pan = pSynth->channels[channel].pan; in VMGetMIDIControllers()
3432 pControl->expression = pSynth->channels[channel].expression; in VMGetMIDIControllers()
3433 pControl->channelPressure = pSynth->channels[channel].channelPressure; in VMGetMIDIControllers()
3436 pControl->reverbSend = pSynth->channels[channel].reverbSend; in VMGetMIDIControllers()
3440 pControl->chorusSend = pSynth->channels[channel].chorusSend; in VMGetMIDIControllers()
3502 S_SYNTH *pSynth; in VMSanityCheck() local
3532 pSynth = pEASData->pVoiceMgr->pSynth[vSynthNum]; in VMSanityCheck()
3549 pSynth = pEASData->pVoiceMgr->pSynth[vSynthNum]; in VMSanityCheck()
3552 poolCount[vSynthNum][pSynth->channels[GET_CHANNEL(pVoice->nextChannel)].pool]++; in VMSanityCheck()
3559 poolCount[vSynthNum][pSynth->channels[GET_CHANNEL(pVoice->channel)].pool]++; in VMSanityCheck()
3565 poolCount[vSynthNum][pSynth->channels[GET_CHANNEL(pVoice->channel)].pool]++; in VMSanityCheck()
3598 if (pEASData->pVoiceMgr->pSynth[i] == NULL) in VMSanityCheck()
3602 if (pEASData->pVoiceMgr->pSynth[i]->numActiveVoices > MAX_SYNTH_VOICES) in VMSanityCheck()
3609 if (poolCount[i][j] != pEASData->pVoiceMgr->pSynth[i]->poolCount[j]) in VMSanityCheck()