|
|
@ -2505,8 +2505,17 @@ void CMiniDexed::GetCurrentVoiceData(uint8_t* dest, unsigned nTG) { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void CMiniDexed::SetPendingVoicePerformanceUpdate(const uint8_t* voiceData, uint8_t tg) { |
|
|
|
void CMiniDexed::SetPendingVoicePerformanceUpdate(unsigned nTG) { |
|
|
|
m_PendingVoicePerformanceUpdate.pending = true; |
|
|
|
if (nTG < m_nToneGenerators && m_pTG[nTG]) { |
|
|
|
memcpy(m_PendingVoicePerformanceUpdate.voiceData, voiceData, 156); |
|
|
|
// Get the current voice data from the synthesizer
|
|
|
|
m_PendingVoicePerformanceUpdate.tg = tg; |
|
|
|
uint8_t currentVoiceData[155]; |
|
|
|
|
|
|
|
m_pTG[nTG]->getVoiceData(currentVoiceData); |
|
|
|
|
|
|
|
// We need to set the voice data in the synthesizer's performance config
|
|
|
|
|
|
|
|
// to ensure that the performance is not changed back to the previous one
|
|
|
|
|
|
|
|
// when a parameter is changed.
|
|
|
|
|
|
|
|
// This is a workaround for the fact that the performance config
|
|
|
|
|
|
|
|
// is not updated when the voice data is changed because it would be
|
|
|
|
|
|
|
|
// too costly to do in the thread.
|
|
|
|
|
|
|
|
this->GetPerformanceConfig()->SetVoiceDataToTxt(currentVoiceData, nTG); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|