• Home
  • Raw
  • Download

Lines Matching refs:voiceNum

144 EAS_INLINE const S_SYNTH_INTERFACE* GetSynthPtr (EAS_INT voiceNum)  in GetSynthPtr()  argument
147 if (voiceNum < NUM_PRIMARY_VOICES) in GetSynthPtr()
156 EAS_INLINE EAS_INT GetAdjustedVoiceNum (EAS_INT voiceNum) in GetAdjustedVoiceNum() argument
159 if (voiceNum >= NUM_PRIMARY_VOICES) in GetAdjustedVoiceNum()
160 return voiceNum - NUM_PRIMARY_VOICES; in GetAdjustedVoiceNum()
162 return voiceNum; in GetAdjustedVoiceNum()
612 void VMMuteVoice (S_VOICE_MGR *pVoiceMgr, EAS_I32 voiceNum) in VMMuteVoice() argument
618 pVoice = &pVoiceMgr->voices[voiceNum]; in VMMuteVoice()
626 GetSynthPtr(voiceNum)->pfMuteVoice(pVoiceMgr, pSynth, pVoice, GetAdjustedVoiceNum(voiceNum)); in VMMuteVoice()
637 void VMReleaseVoice (S_VOICE_MGR *pVoiceMgr, S_SYNTH *pSynth, EAS_I32 voiceNum) in VMReleaseVoice() argument
639 S_SYNTH_VOICE *pVoice = &pVoiceMgr->voices[voiceNum]; in VMReleaseVoice()
649 VMMuteVoice(pVoiceMgr, voiceNum); in VMReleaseVoice()
652 …GetSynthPtr(voiceNum)->pfReleaseVoice(pVoiceMgr, pSynth, &pVoiceMgr->voices[voiceNum], GetAdjusted… in VMReleaseVoice()
982 EAS_INT voiceNum; in VMAllNotesOff() local
999 for (voiceNum = 0; voiceNum < MAX_SYNTH_VOICES; voiceNum++) in VMAllNotesOff()
1001 pVoice = &pVoiceMgr->voices[voiceNum]; in VMAllNotesOff()
1008 … GetSynthPtr(voiceNum)->pfMuteVoice(pVoiceMgr, pSynth, pVoice, GetAdjustedVoiceNum(voiceNum)); in VMAllNotesOff()
1035 EAS_INT voiceNum; in VMDeferredStopNote() local
1042 for (voiceNum=0; voiceNum < MAX_SYNTH_VOICES; voiceNum++) in VMDeferredStopNote()
1044 if (pVoiceMgr->voices[voiceNum].voiceFlags & VOICE_FLAG_DEFER_MIDI_NOTE_OFF) in VMDeferredStopNote()
1047 if (pVoiceMgr->voices[voiceNum].voiceState == eVoiceStateStolen) in VMDeferredStopNote()
1074 if (0 != pVoiceMgr->voices[voiceNum].gain) in VMDeferredStopNote()
1084 pVoiceMgr->voices[voiceNum].voiceFlags ^= in VMDeferredStopNote()
1094 channel = pVoiceMgr->voices[voiceNum].channel & 15; in VMDeferredStopNote()
1099 …etSynthPtr(voiceNum)->pfSustainPedal(pVoiceMgr, pSynth, &pVoiceMgr->voices[voiceNum], &pSynth->cha… in VMDeferredStopNote()
1104 VMReleaseVoice(pVoiceMgr, pSynth, voiceNum); in VMDeferredStopNote()
1143 EAS_INT voiceNum; in VMReleaseAllDeferredNoteOffs() local
1159 for (voiceNum = 0; voiceNum < MAX_SYNTH_VOICES; voiceNum++) in VMReleaseAllDeferredNoteOffs()
1162 pVoice = &pVoiceMgr->voices[voiceNum]; in VMReleaseAllDeferredNoteOffs()
1170 VMReleaseVoice(pVoiceMgr, pSynth, voiceNum); in VMReleaseAllDeferredNoteOffs()
1203 EAS_INT voiceNum; in VMCatchNotesForSustainPedal() local
1218 for (voiceNum = 0; voiceNum < MAX_SYNTH_VOICES; voiceNum++) in VMCatchNotesForSustainPedal()
1220 if (channel == pVoiceMgr->voices[voiceNum].channel) in VMCatchNotesForSustainPedal()
1222 if (eVoiceStateRelease == pVoiceMgr->voices[voiceNum].voiceState) in VMCatchNotesForSustainPedal()
1223 …etSynthPtr(voiceNum)->pfSustainPedal(pVoiceMgr, pSynth, &pVoiceMgr->voices[voiceNum], &pSynth->cha… in VMCatchNotesForSustainPedal()
1271 static void VMStolenVoice (S_VOICE_MGR *pVoiceMgr, S_SYNTH *pSynth, EAS_I32 voiceNum, EAS_U8 channe… in VMStolenVoice() argument
1273 S_SYNTH_VOICE *pVoice = &pVoiceMgr->voices[voiceNum]; in VMStolenVoice()
1279 …thPtr(voiceNum)->pfMuteVoice(pVoiceMgr, pVoiceMgr->pSynth[GET_VSYNTH(pVoice->channel)], &pVoiceMgr… in VMStolenVoice()
1364 static EAS_BOOL VMRetargetStolenVoice (S_VOICE_MGR *pVoiceMgr, EAS_I32 voiceNum) in VMRetargetStolenVoice() argument
1373 pVoice = &pVoiceMgr->voices[voiceNum]; in VMRetargetStolenVoice()
1390 VMFreeVoice(pVoiceMgr, pSynth, &pVoiceMgr->voices[voiceNum]); in VMRetargetStolenVoice()
1424 …GetSynthPtr(voiceNum)->pfStartVoice(pVoiceMgr, pNextSynth, &pVoiceMgr->voices[voiceNum], GetAdjust… in VMRetargetStolenVoice()
1450 EAS_INT voiceNum; in VMCheckKeyGroup() local
1457 for (voiceNum = 0; voiceNum < MAX_SYNTH_VOICES; voiceNum++) in VMCheckKeyGroup()
1459 if (pVoiceMgr->voices[voiceNum].voiceState != eVoiceStateStolen) in VMCheckKeyGroup()
1462 if (channel == pVoiceMgr->voices[voiceNum].channel) in VMCheckKeyGroup()
1465 pRegion = GetRegionPtr(pSynth, pVoiceMgr->voices[voiceNum].regionIndex); in VMCheckKeyGroup()
1473 … if (pVoiceMgr->voices[voiceNum].voiceFlags & VOICE_FLAG_NO_SAMPLES_SYNTHESIZED_YET) in VMCheckKeyGroup()
1474 pVoiceMgr->voices[voiceNum].voiceFlags |= VOICE_FLAG_DEFER_MUTE; in VMCheckKeyGroup()
1478 VMMuteVoice(pVoiceMgr, voiceNum); in VMCheckKeyGroup()
1487 if (channel == pVoiceMgr->voices[voiceNum].nextChannel) in VMCheckKeyGroup()
1490 pRegion = GetRegionPtr(pSynth, pVoiceMgr->voices[voiceNum].nextRegionIndex); in VMCheckKeyGroup()
1498 … if (pVoiceMgr->voices[voiceNum].voiceFlags & VOICE_FLAG_NO_SAMPLES_SYNTHESIZED_YET) in VMCheckKeyGroup()
1499 pVoiceMgr->voices[voiceNum].voiceFlags |= VOICE_FLAG_DEFER_MUTE; in VMCheckKeyGroup()
1503 VMMuteVoice(pVoiceMgr, voiceNum); in VMCheckKeyGroup()
1537 EAS_INT voiceNum; in VMCheckPolyphonyLimiting() local
1551 for (voiceNum = lowVoice; voiceNum <= highVoice; voiceNum++) in VMCheckPolyphonyLimiting()
1554 if (pVoiceMgr->voices[voiceNum].voiceState != eVoiceStateStolen) in VMCheckPolyphonyLimiting()
1558 …if ((channel == pVoiceMgr->voices[voiceNum].channel) && (note == pVoiceMgr->voices[voiceNum].note)) in VMCheckPolyphonyLimiting()
1561 age = pVoiceMgr->age - pVoiceMgr->voices[voiceNum].age; in VMCheckPolyphonyLimiting()
1567 oldestVoiceNum = voiceNum; in VMCheckPolyphonyLimiting()
1576 …if ((channel == pVoiceMgr->voices[voiceNum].nextChannel) && (note == pVoiceMgr->voices[voiceNum].n… in VMCheckPolyphonyLimiting()
1614 EAS_INT voiceNum; in VMStartVoice() local
1674 (EAS_SUCCESS == VMFindAvailableVoice(pVoiceMgr, &voiceNum, lowVoice, highVoice))) in VMStartVoice()
1676 S_SYNTH_VOICE *pVoice = &pVoiceMgr->voices[voiceNum]; in VMStartVoice()
1692 pVoiceMgr->voices[voiceNum].channel = VSynthToChannel(pSynth, channel); in VMStartVoice()
1693 pVoiceMgr->voices[voiceNum].note = note; in VMStartVoice()
1694 pVoiceMgr->voices[voiceNum].velocity = velocity; in VMStartVoice()
1697 pVoiceMgr->voices[voiceNum].age = pVoiceMgr->age++; in VMStartVoice()
1700 pVoiceMgr->voices[voiceNum].voiceState = eVoiceStateStart; in VMStartVoice()
1707 …GetSynthPtr(voiceNum)->pfStartVoice(pVoiceMgr, pSynth, &pVoiceMgr->voices[voiceNum], GetAdjustedVo… in VMStartVoice()
1712 … if (VMStealVoice(pVoiceMgr, pSynth, &voiceNum, channel, note, lowVoice, highVoice) == EAS_SUCCESS) in VMStartVoice()
1713 VMStolenVoice(pVoiceMgr, pSynth, voiceNum, channel, note, velocity, regionIndex); in VMStartVoice()
1871 EAS_INT voiceNum; in VMStopNote() local
1893 for (voiceNum=0; voiceNum < MAX_SYNTH_VOICES; voiceNum++) in VMStopNote()
1897 if (eVoiceStateStolen != pVoiceMgr->voices[voiceNum].voiceState) in VMStopNote()
1901 …if ((channel == pVoiceMgr->voices[voiceNum].channel) && (note == pVoiceMgr->voices[voiceNum].note)) in VMStopNote()
1911 … pVoiceMgr->voices[voiceNum].voiceFlags |= VOICE_FLAG_SUSTAIN_PEDAL_DEFER_NOTE_OFF; in VMStopNote()
1916 if (pVoiceMgr->voices[voiceNum].voiceFlags & VOICE_FLAG_NO_SAMPLES_SYNTHESIZED_YET) in VMStopNote()
1921 pVoiceMgr->voices[voiceNum].voiceFlags |= VOICE_FLAG_DEFER_MIDI_NOTE_OFF; in VMStopNote()
1927 VMReleaseVoice(pVoiceMgr, pSynth, voiceNum); in VMStopNote()
1933 …else if ((channel == pVoiceMgr->voices[voiceNum].nextChannel) && (note == pVoiceMgr->voices[voiceN… in VMStopNote()
1940 pVoiceMgr->voices[voiceNum].voiceFlags |= VOICE_FLAG_DEFER_MIDI_NOTE_OFF; in VMStopNote()
1962 EAS_INT voiceNum; in VMFindAvailableVoice() local
1965 for (voiceNum = lowVoice; voiceNum <= highVoice; voiceNum++) in VMFindAvailableVoice()
1968 if ( pVoiceMgr->voices[voiceNum].voiceState == eVoiceStateFree) in VMFindAvailableVoice()
1970 *pVoiceNumber = voiceNum; /* this voice is available */ in VMFindAvailableVoice()
2017 EAS_INT voiceNum; in VMStealVoice() local
2028 for (voiceNum = lowVoice; voiceNum <= highVoice; voiceNum++) in VMStealVoice()
2030 pCurrVoice = &pVoiceMgr->voices[voiceNum]; in VMStealVoice()
2094 bestCandidate = voiceNum; in VMStealVoice()
2794 EAS_INT voiceNum; in VMAddSamples() local
2806 for (voiceNum = 0; voiceNum < MAX_SYNTH_VOICES; voiceNum++) in VMAddSamples()
2810 …if ((pVoiceMgr->voices[voiceNum].voiceState == eVoiceStateStolen) && (pVoiceMgr->voices[voiceNum].… in VMAddSamples()
2811 VMRetargetStolenVoice(pVoiceMgr, voiceNum); in VMAddSamples()
2814 pSynth = pVoiceMgr->pSynth[pVoiceMgr->voices[voiceNum].channel >> 4]; in VMAddSamples()
2817 if (pVoiceMgr->voices[voiceNum].voiceState != eVoiceStateFree) in VMAddSamples()
2819 …done = GetSynthPtr(voiceNum)->pfUpdateVoice(pVoiceMgr, pSynth, &pVoiceMgr->voices[voiceNum], GetAd… in VMAddSamples()
2826 if (pVoiceMgr->voices[voiceNum].voiceState == eVoiceStateStolen) in VMAddSamples()
2827 pVoiceMgr->voices[voiceNum].gain = 0; in VMAddSamples()
2831 VMFreeVoice(pVoiceMgr, pSynth, &pVoiceMgr->voices[voiceNum]); in VMAddSamples()
2835 if (pVoiceMgr->voices[voiceNum].voiceFlags & VOICE_FLAG_DEFER_MUTE) in VMAddSamples()
2837 …pVoiceMgr->voices[voiceNum].voiceFlags &= ~(VOICE_FLAG_DEFER_MUTE | VOICE_FLAG_DEFER_MIDI_NOTE_OFF… in VMAddSamples()
2838 VMMuteVoice(pVoiceMgr, voiceNum); in VMAddSamples()
2842 if (pVoiceMgr->voices[voiceNum].voiceState == eVoiceStateStart) in VMAddSamples()
2843 pVoiceMgr->voices[voiceNum].voiceState = eVoiceStatePlay; in VMAddSamples()