mirror of
https://github.com/overte-org/overte.git
synced 2025-07-15 09:36:41 +02:00
Moved Menu dependency out of audio
This commit is contained in:
parent
71b565c33c
commit
dbdb87a1a2
4 changed files with 9 additions and 11 deletions
|
@ -296,6 +296,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) :
|
||||||
auto audioIO = DependencyManager::get<Audio>();
|
auto audioIO = DependencyManager::get<Audio>();
|
||||||
audioIO->moveToThread(audioThread);
|
audioIO->moveToThread(audioThread);
|
||||||
connect(audioThread, &QThread::started, audioIO.data(), &Audio::start);
|
connect(audioThread, &QThread::started, audioIO.data(), &Audio::start);
|
||||||
|
connect(audioIO, SIGNAL(muteToggled()), this, SLOT(audioMuteToggled()));
|
||||||
|
|
||||||
audioThread->start();
|
audioThread->start();
|
||||||
|
|
||||||
|
@ -693,6 +694,12 @@ void Application::runTests() {
|
||||||
runTimingTests();
|
runTimingTests();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Application::audioMuteToggled() {
|
||||||
|
QAction* muteAction = Menu::getInstance()->getActionForOption(MenuOption::MuteAudio);
|
||||||
|
Q_CHECK_PTR(muteAction);
|
||||||
|
muteAction->setChecked(DependencyManager::get<Audio>()->isMuted());
|
||||||
|
}
|
||||||
|
|
||||||
void Application::aboutApp() {
|
void Application::aboutApp() {
|
||||||
InfoView::forcedShow(INFO_HELP_PATH);
|
InfoView::forcedShow(INFO_HELP_PATH);
|
||||||
}
|
}
|
||||||
|
|
|
@ -396,6 +396,8 @@ private slots:
|
||||||
|
|
||||||
void runTests();
|
void runTests();
|
||||||
|
|
||||||
|
void audioMuteToggled();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void resetCamerasOnResizeGL(Camera& camera, int width, int height);
|
void resetCamerasOnResizeGL(Camera& camera, int width, int height);
|
||||||
void updateProjectionMatrix();
|
void updateProjectionMatrix();
|
||||||
|
|
|
@ -104,18 +104,10 @@ Audio::Audio() :
|
||||||
|
|
||||||
connect(&_receivedAudioStream, &MixedProcessedAudioStream::processSamples, this, &Audio::processReceivedSamples, Qt::DirectConnection);
|
connect(&_receivedAudioStream, &MixedProcessedAudioStream::processSamples, this, &Audio::processReceivedSamples, Qt::DirectConnection);
|
||||||
|
|
||||||
connect(this, SIGNAL(muteToggled()), this, SLOT(audioMuteToggled()));
|
|
||||||
|
|
||||||
// Initialize GVerb
|
// Initialize GVerb
|
||||||
initGverb();
|
initGverb();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Audio::audioMuteToggled() {
|
|
||||||
QAction* muteAction = Menu::getInstance()->getActionForOption(MenuOption::MuteAudio);
|
|
||||||
Q_CHECK_PTR(muteAction);
|
|
||||||
muteAction->setChecked(isMuted());
|
|
||||||
}
|
|
||||||
|
|
||||||
void Audio::reset() {
|
void Audio::reset() {
|
||||||
_receivedAudioStream.reset();
|
_receivedAudioStream.reset();
|
||||||
_stats.reset();
|
_stats.reset();
|
||||||
|
|
|
@ -176,9 +176,6 @@ public slots:
|
||||||
void loadSettings();
|
void loadSettings();
|
||||||
void saveSettings();
|
void saveSettings();
|
||||||
|
|
||||||
private slots:
|
|
||||||
void audioMuteToggled();
|
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
bool muteToggled();
|
bool muteToggled();
|
||||||
void inputReceived(const QByteArray& inputSamples);
|
void inputReceived(const QByteArray& inputSamples);
|
||||||
|
|
Loading…
Reference in a new issue