|
|
|
@ -1521,6 +1521,8 @@ void CMiniDexed::ProcessSound (void) |
|
|
|
|
|
|
|
|
|
m_pTG[0]->getSamples (SampleBuffer[indexL], nFrames); |
|
|
|
|
|
|
|
|
|
if (m_pConfig->GetFXEnabled()) |
|
|
|
|
{ |
|
|
|
|
m_InsertFXSpinLock[0]->Acquire(); |
|
|
|
|
m_InsertFX[0]->process(SampleBuffer[indexL], SampleBuffer[indexL], SampleBuffer[indexL], SampleBuffer[indexR], nFrames); |
|
|
|
|
m_InsertFXSpinLock[0]->Release(); |
|
|
|
@ -1550,7 +1552,6 @@ void CMiniDexed::ProcessSound (void) |
|
|
|
|
arm_add_f32(SampleBuffer[indexR], SendFXOutputBuffer[indexR], SampleBuffer[indexR], nFrames); |
|
|
|
|
// END adding send fx 1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// BEGIN adding send fx 2
|
|
|
|
|
m_SendFX2SpinLock.Acquire (); |
|
|
|
|
send_fx2_mixer->getMix(SendFXMixBuffer[indexL], SendFXMixBuffer[indexR]); |
|
|
|
@ -1568,6 +1569,11 @@ void CMiniDexed::ProcessSound (void) |
|
|
|
|
m_MasterFXSpinLock.Acquire (); |
|
|
|
|
m_MasterFX->process(SampleBuffer[indexL], SampleBuffer[indexR], SampleBuffer[indexL], SampleBuffer[indexR], nFrames); |
|
|
|
|
m_MasterFXSpinLock.Release (); |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
memcpy(SampleBuffer[indexR], SampleBuffer[indexR], nFrames * sizeof(float32_t)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// swap stereo channels if needed prior to writing back out
|
|
|
|
|
if (m_bChannelsSwapped) |
|
|
|
@ -1634,7 +1640,8 @@ void CMiniDexed::ProcessSound (void) |
|
|
|
|
|
|
|
|
|
m_pTG[i]->getSamples (m_OutputLevel[i][0], nFrames); |
|
|
|
|
|
|
|
|
|
if (!m_bQuadDAC8Chan) { |
|
|
|
|
if (!m_bQuadDAC8Chan && m_pConfig->GetFXEnabled()) |
|
|
|
|
{ |
|
|
|
|
m_InsertFXSpinLock[i]->Acquire(); |
|
|
|
|
m_InsertFX[i]->process(m_OutputLevel[i][0], m_OutputLevel[i][0], m_OutputLevel[i][0], m_OutputLevel[i][1], nFrames); |
|
|
|
|
m_InsertFXSpinLock[i]->Release(); |
|
|
|
@ -1710,9 +1717,13 @@ void CMiniDexed::ProcessSound (void) |
|
|
|
|
for (uint8_t i = 0; i < m_nToneGenerators; i++) |
|
|
|
|
{ |
|
|
|
|
tg_mixer->doAddMix(i, m_OutputLevel[i][indexL], m_OutputLevel[i][indexR]); |
|
|
|
|
|
|
|
|
|
if (m_pConfig->GetFXEnabled()) |
|
|
|
|
{ |
|
|
|
|
send_fx1_mixer->doAddMix(i, m_OutputLevel[i][indexL], m_OutputLevel[i][indexR]); |
|
|
|
|
send_fx2_mixer->doAddMix(i, m_OutputLevel[i][indexL], m_OutputLevel[i][indexR]); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
// END TG mixing
|
|
|
|
|
|
|
|
|
|
// BEGIN create SampleBuffer for holding audio data
|
|
|
|
@ -1722,6 +1733,8 @@ void CMiniDexed::ProcessSound (void) |
|
|
|
|
// get the mix of all TGs
|
|
|
|
|
tg_mixer->getMix(SampleBuffer[indexL], SampleBuffer[indexR]); |
|
|
|
|
|
|
|
|
|
if (m_pConfig->GetFXEnabled()) |
|
|
|
|
{ |
|
|
|
|
// BEGIN adding send fx 1
|
|
|
|
|
float32_t SendFXOutputBuffer[2][nFrames]; |
|
|
|
|
float32_t SendFXMixBuffer[2][nFrames]; |
|
|
|
@ -1765,6 +1778,7 @@ void CMiniDexed::ProcessSound (void) |
|
|
|
|
m_MasterFXSpinLock.Acquire (); |
|
|
|
|
m_MasterFX->process(SampleBuffer[indexL], SampleBuffer[indexR], SampleBuffer[indexL], SampleBuffer[indexR], nFrames); |
|
|
|
|
m_MasterFXSpinLock.Release (); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// swap stereo channels if needed prior to writing back out
|
|
|
|
|
if (m_bChannelsSwapped) |
|
|
|
|