• 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()
601 void VMMuteVoice (S_VOICE_MGR *pVoiceMgr, EAS_I32 voiceNum) in VMMuteVoice() argument
607 pVoice = &pVoiceMgr->voices[voiceNum]; 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
628 S_SYNTH_VOICE *pVoice = &pVoiceMgr->voices[voiceNum]; in VMReleaseVoice()
638 VMMuteVoice(pVoiceMgr, voiceNum); in VMReleaseVoice()
641 …GetSynthPtr(voiceNum)->pfReleaseVoice(pVoiceMgr, pSynth, &pVoiceMgr->voices[voiceNum], GetAdjusted… in VMReleaseVoice()
971 EAS_INT voiceNum; in VMAllNotesOff() local
988 for (voiceNum = 0; voiceNum < MAX_SYNTH_VOICES; voiceNum++) in VMAllNotesOff()
990 pVoice = &pVoiceMgr->voices[voiceNum]; in VMAllNotesOff()
997 … GetSynthPtr(voiceNum)->pfMuteVoice(pVoiceMgr, pSynth, pVoice, GetAdjustedVoiceNum(voiceNum)); in VMAllNotesOff()
1024 EAS_INT voiceNum; in VMDeferredStopNote() local
1031 for (voiceNum=0; voiceNum < MAX_SYNTH_VOICES; voiceNum++) in VMDeferredStopNote()
1033 if (pVoiceMgr->voices[voiceNum].voiceFlags & VOICE_FLAG_DEFER_MIDI_NOTE_OFF) in VMDeferredStopNote()
1036 if (pVoiceMgr->voices[voiceNum].voiceState == eVoiceStateStolen) in VMDeferredStopNote()
1063 if (0 != pVoiceMgr->voices[voiceNum].gain) in VMDeferredStopNote()
1073 pVoiceMgr->voices[voiceNum].voiceFlags ^= in VMDeferredStopNote()
1083 channel = pVoiceMgr->voices[voiceNum].channel & 15; in VMDeferredStopNote()
1088 …etSynthPtr(voiceNum)->pfSustainPedal(pVoiceMgr, pSynth, &pVoiceMgr->voices[voiceNum], &pSynth->cha… in VMDeferredStopNote()
1093 VMReleaseVoice(pVoiceMgr, pSynth, voiceNum); in VMDeferredStopNote()
1132 EAS_INT voiceNum; in VMReleaseAllDeferredNoteOffs() local
1148 for (voiceNum = 0; voiceNum < MAX_SYNTH_VOICES; voiceNum++) in VMReleaseAllDeferredNoteOffs()
1151 pVoice = &pVoiceMgr->voices[voiceNum]; in VMReleaseAllDeferredNoteOffs()
1159 VMReleaseVoice(pVoiceMgr, pSynth, voiceNum); in VMReleaseAllDeferredNoteOffs()
1192 EAS_INT voiceNum; in VMCatchNotesForSustainPedal() local
1207 for (voiceNum = 0; voiceNum < MAX_SYNTH_VOICES; voiceNum++) in VMCatchNotesForSustainPedal()
1209 if (channel == pVoiceMgr->voices[voiceNum].channel) in VMCatchNotesForSustainPedal()
1211 if (eVoiceStateRelease == pVoiceMgr->voices[voiceNum].voiceState) in VMCatchNotesForSustainPedal()
1212 …etSynthPtr(voiceNum)->pfSustainPedal(pVoiceMgr, pSynth, &pVoiceMgr->voices[voiceNum], &pSynth->cha… in VMCatchNotesForSustainPedal()
1260 static void VMStolenVoice (S_VOICE_MGR *pVoiceMgr, S_SYNTH *pSynth, EAS_I32 voiceNum, EAS_U8 channe… in VMStolenVoice() argument
1262 S_SYNTH_VOICE *pVoice = &pVoiceMgr->voices[voiceNum]; in VMStolenVoice()
1268 …thPtr(voiceNum)->pfMuteVoice(pVoiceMgr, pVoiceMgr->pSynth[GET_VSYNTH(pVoice->channel)], &pVoiceMgr… in VMStolenVoice()
1353 static EAS_BOOL VMRetargetStolenVoice (S_VOICE_MGR *pVoiceMgr, EAS_I32 voiceNum) in VMRetargetStolenVoice() argument
1362 pVoice = &pVoiceMgr->voices[voiceNum]; in VMRetargetStolenVoice()
1379 VMFreeVoice(pVoiceMgr, pSynth, &pVoiceMgr->voices[voiceNum]); in VMRetargetStolenVoice()
1413 …GetSynthPtr(voiceNum)->pfStartVoice(pVoiceMgr, pNextSynth, &pVoiceMgr->voices[voiceNum], GetAdjust… in VMRetargetStolenVoice()
1439 EAS_INT voiceNum; in VMCheckKeyGroup() local
1446 for (voiceNum = 0; voiceNum < MAX_SYNTH_VOICES; voiceNum++) in VMCheckKeyGroup()
1448 if (pVoiceMgr->voices[voiceNum].voiceState != eVoiceStateStolen) in VMCheckKeyGroup()
1451 if (channel == pVoiceMgr->voices[voiceNum].channel) in VMCheckKeyGroup()
1454 pRegion = GetRegionPtr(pSynth, pVoiceMgr->voices[voiceNum].regionIndex); in VMCheckKeyGroup()
1462 … if (pVoiceMgr->voices[voiceNum].voiceFlags & VOICE_FLAG_NO_SAMPLES_SYNTHESIZED_YET) in VMCheckKeyGroup()
1463 pVoiceMgr->voices[voiceNum].voiceFlags |= VOICE_FLAG_DEFER_MUTE; in VMCheckKeyGroup()
1467 VMMuteVoice(pVoiceMgr, voiceNum); in VMCheckKeyGroup()
1476 if (channel == pVoiceMgr->voices[voiceNum].nextChannel) in VMCheckKeyGroup()
1479 pRegion = GetRegionPtr(pSynth, pVoiceMgr->voices[voiceNum].nextRegionIndex); in VMCheckKeyGroup()
1487 … if (pVoiceMgr->voices[voiceNum].voiceFlags & VOICE_FLAG_NO_SAMPLES_SYNTHESIZED_YET) in VMCheckKeyGroup()
1488 pVoiceMgr->voices[voiceNum].voiceFlags |= VOICE_FLAG_DEFER_MUTE; in VMCheckKeyGroup()
1492 VMMuteVoice(pVoiceMgr, voiceNum); in VMCheckKeyGroup()
1526 EAS_INT voiceNum; in VMCheckPolyphonyLimiting() local
1540 for (voiceNum = lowVoice; voiceNum <= highVoice; voiceNum++) in VMCheckPolyphonyLimiting()
1543 if (pVoiceMgr->voices[voiceNum].voiceState != eVoiceStateStolen) in VMCheckPolyphonyLimiting()
1547 …if ((channel == pVoiceMgr->voices[voiceNum].channel) && (note == pVoiceMgr->voices[voiceNum].note)) in VMCheckPolyphonyLimiting()
1550 age = pVoiceMgr->age - pVoiceMgr->voices[voiceNum].age; in VMCheckPolyphonyLimiting()
1556 oldestVoiceNum = voiceNum; in VMCheckPolyphonyLimiting()
1565 …if ((channel == pVoiceMgr->voices[voiceNum].nextChannel) && (note == pVoiceMgr->voices[voiceNum].n… in VMCheckPolyphonyLimiting()
1603 EAS_INT voiceNum; in VMStartVoice() local
1663 (EAS_SUCCESS == VMFindAvailableVoice(pVoiceMgr, &voiceNum, lowVoice, highVoice))) in VMStartVoice()
1665 S_SYNTH_VOICE *pVoice = &pVoiceMgr->voices[voiceNum]; in VMStartVoice()
1681 pVoiceMgr->voices[voiceNum].channel = VSynthToChannel(pSynth, channel); in VMStartVoice()
1682 pVoiceMgr->voices[voiceNum].note = note; in VMStartVoice()
1683 pVoiceMgr->voices[voiceNum].velocity = velocity; in VMStartVoice()
1686 pVoiceMgr->voices[voiceNum].age = pVoiceMgr->age++; in VMStartVoice()
1689 pVoiceMgr->voices[voiceNum].voiceState = eVoiceStateStart; 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()
1860 EAS_INT voiceNum; in VMStopNote() local
1882 for (voiceNum=0; voiceNum < MAX_SYNTH_VOICES; voiceNum++) in VMStopNote()
1886 if (eVoiceStateStolen != pVoiceMgr->voices[voiceNum].voiceState) in VMStopNote()
1890 …if ((channel == pVoiceMgr->voices[voiceNum].channel) && (note == pVoiceMgr->voices[voiceNum].note)) in VMStopNote()
1900 … pVoiceMgr->voices[voiceNum].voiceFlags |= VOICE_FLAG_SUSTAIN_PEDAL_DEFER_NOTE_OFF; in VMStopNote()
1905 if (pVoiceMgr->voices[voiceNum].voiceFlags & VOICE_FLAG_NO_SAMPLES_SYNTHESIZED_YET) in VMStopNote()
1910 pVoiceMgr->voices[voiceNum].voiceFlags |= VOICE_FLAG_DEFER_MIDI_NOTE_OFF; in VMStopNote()
1916 VMReleaseVoice(pVoiceMgr, pSynth, voiceNum); in VMStopNote()
1922 …else if ((channel == pVoiceMgr->voices[voiceNum].nextChannel) && (note == pVoiceMgr->voices[voiceN… in VMStopNote()
1929 pVoiceMgr->voices[voiceNum].voiceFlags |= VOICE_FLAG_DEFER_MIDI_NOTE_OFF; in VMStopNote()
1951 EAS_INT voiceNum; in VMFindAvailableVoice() local
1954 for (voiceNum = lowVoice; voiceNum <= highVoice; voiceNum++) in VMFindAvailableVoice()
1957 if ( pVoiceMgr->voices[voiceNum].voiceState == eVoiceStateFree) in VMFindAvailableVoice()
1959 *pVoiceNumber = voiceNum; /* this voice is available */ in VMFindAvailableVoice()
2006 EAS_INT voiceNum; in VMStealVoice() local
2017 for (voiceNum = lowVoice; voiceNum <= highVoice; voiceNum++) in VMStealVoice()
2019 pCurrVoice = &pVoiceMgr->voices[voiceNum]; in VMStealVoice()
2083 bestCandidate = voiceNum; in VMStealVoice()
2783 EAS_INT voiceNum; in VMAddSamples() local
2795 for (voiceNum = 0; voiceNum < MAX_SYNTH_VOICES; voiceNum++) in VMAddSamples()
2799 …if ((pVoiceMgr->voices[voiceNum].voiceState == eVoiceStateStolen) && (pVoiceMgr->voices[voiceNum].… in VMAddSamples()
2800 VMRetargetStolenVoice(pVoiceMgr, voiceNum); in VMAddSamples()
2803 pSynth = pVoiceMgr->pSynth[pVoiceMgr->voices[voiceNum].channel >> 4]; in VMAddSamples()
2806 if (pVoiceMgr->voices[voiceNum].voiceState != eVoiceStateFree) in VMAddSamples()
2808 …done = GetSynthPtr(voiceNum)->pfUpdateVoice(pVoiceMgr, pSynth, &pVoiceMgr->voices[voiceNum], GetAd… in VMAddSamples()
2815 if (pVoiceMgr->voices[voiceNum].voiceState == eVoiceStateStolen) in VMAddSamples()
2816 pVoiceMgr->voices[voiceNum].gain = 0; in VMAddSamples()
2820 VMFreeVoice(pVoiceMgr, pSynth, &pVoiceMgr->voices[voiceNum]); in VMAddSamples()
2824 if (pVoiceMgr->voices[voiceNum].voiceFlags & VOICE_FLAG_DEFER_MUTE) in VMAddSamples()
2826 …pVoiceMgr->voices[voiceNum].voiceFlags &= ~(VOICE_FLAG_DEFER_MUTE | VOICE_FLAG_DEFER_MIDI_NOTE_OFF… in VMAddSamples()
2827 VMMuteVoice(pVoiceMgr, voiceNum); in VMAddSamples()
2831 if (pVoiceMgr->voices[voiceNum].voiceState == eVoiceStateStart) in VMAddSamples()
2832 pVoiceMgr->voices[voiceNum].voiceState = eVoiceStatePlay; in VMAddSamples()