Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix flickering meters when connected on Windows #776

Merged
merged 1 commit into from Oct 28, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 18 additions & 0 deletions src/gui/virtualstudio.cpp
Expand Up @@ -938,6 +938,11 @@ void VirtualStudio::completeConnection()
&VirtualStudio::receivedConnectionFromPeer,
Qt::QueuedConnection);

// Stop VsAudioInterface
if (!m_vsAudioInterface.isNull()) {
m_vsAudioInterface->closeAudio();
}

// Setup output volume
m_outputVolumePlugin = new Volume(jackTrip->getNumOutputChannels());
jackTrip->appendProcessPluginFromNetwork(m_outputVolumePlugin);
Expand Down Expand Up @@ -1061,6 +1066,19 @@ void VirtualStudio::disconnect()
m_allowRefresh = true;
m_refreshTimer.start();
}

// Start VsAudioInterface again
if (!m_vsAudioInterface.isNull()) {
m_vsAudioInterface->setupAudio();
m_vsAudioInterface->setupPlugins();

m_view.engine()->rootContext()->setContextProperty(
QStringLiteral("inputMeterModel"),
QVariant::fromValue(
QVector<float>(m_vsAudioInterface->getNumInputChannels())));

m_vsAudioInterface->startProcess();
}
}

void VirtualStudio::manageStudio(int studioIndex)
Expand Down