Use C++20 in RemoteVstPlugin (#7916)
- Build RemoteVstPlugin in C++20 mode - Avoids using std::wstring due to strange issues with it when built with wineg++. See https://bugs.winehq.org/show_bug.cgi?id=58465 - Fix some memory leaks + minor cleanup of RemoteVstPlugin code - Rename `F_OPEN_UTF8` to `fopenUtf8` - Use C++20 in our `determine_version_from_source` CMake function - Update ZynAddSubFX submodule
This commit is contained in:
@@ -52,7 +52,7 @@ VstSyncController::VstSyncController()
|
||||
}
|
||||
|
||||
m_syncData->isPlaying = false;
|
||||
m_syncData->m_bufferSize = Engine::audioEngine()->framesPerPeriod();
|
||||
m_syncData->bufferSize = Engine::audioEngine()->framesPerPeriod();
|
||||
m_syncData->timeSigNumer = 4;
|
||||
m_syncData->timeSigDenom = 4;
|
||||
|
||||
@@ -67,9 +67,9 @@ void VstSyncController::setAbsolutePosition(double ticks)
|
||||
if (!m_syncData) { return; }
|
||||
|
||||
#ifdef VST_SNC_LATENCY
|
||||
m_syncData->ppqPos = ( ( ticks + 0 ) / 48.0 ) - m_syncData->m_latency;
|
||||
m_syncData->ppqPos = ((ticks + 0) / 48.0) - m_syncData->latency;
|
||||
#else
|
||||
m_syncData->ppqPos = ( ( ticks + 0 ) / 48.0 );
|
||||
m_syncData->ppqPos = ((ticks + 0) / 48.0);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -88,10 +88,10 @@ void VstSyncController::setTempo(int newTempo)
|
||||
{
|
||||
if (!m_syncData) { return; }
|
||||
|
||||
m_syncData->m_bpm = newTempo;
|
||||
m_syncData->bpm = newTempo;
|
||||
|
||||
#ifdef VST_SNC_LATENCY
|
||||
m_syncData->m_latency = m_syncData->m_bufferSize * newTempo / ( (float) m_syncData->m_sampleRate * 60 );
|
||||
m_syncData->latency = m_syncData->bufferSize * newTempo / (static_cast<float>(m_syncData->sampleRate) * 60);
|
||||
#endif
|
||||
|
||||
}
|
||||
@@ -132,7 +132,7 @@ void VstSyncController::setPlaybackJumped(bool jumped)
|
||||
{
|
||||
if (!m_syncData) { return; }
|
||||
|
||||
m_syncData->m_playbackJumped = jumped;
|
||||
m_syncData->playbackJumped = jumped;
|
||||
}
|
||||
|
||||
|
||||
@@ -141,10 +141,10 @@ void VstSyncController::update()
|
||||
{
|
||||
if (!m_syncData) { return; }
|
||||
|
||||
m_syncData->m_bufferSize = Engine::audioEngine()->framesPerPeriod();
|
||||
m_syncData->bufferSize = Engine::audioEngine()->framesPerPeriod();
|
||||
|
||||
#ifdef VST_SNC_LATENCY
|
||||
m_syncData->m_latency = m_syncData->m_bufferSize * m_syncData->m_bpm / ( (float) m_syncData->m_sampleRate * 60 );
|
||||
m_syncData->latency = m_syncData->bufferSize * m_syncData->bpm / (static_cast<float>(m_syncData->sampleRate) * 60);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -154,10 +154,10 @@ void VstSyncController::updateSampleRate()
|
||||
{
|
||||
if (!m_syncData) { return; }
|
||||
|
||||
m_syncData->m_sampleRate = Engine::audioEngine()->outputSampleRate();
|
||||
m_syncData->sampleRate = Engine::audioEngine()->outputSampleRate();
|
||||
|
||||
#ifdef VST_SNC_LATENCY
|
||||
m_syncData->m_latency = m_syncData->m_bufferSize * m_syncData->m_bpm / ( (float) m_syncData->m_sampleRate * 60 );
|
||||
m_syncData->latency = m_syncData->bufferSize * m_syncData->bpm / (static_cast<float>(m_syncData->sampleRate) * 60);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user