1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

un-/subscribe audio in/out in AV-Settings form

This commit is contained in:
Nils Fenner 2015-11-08 21:13:46 +01:00
parent e7f666be77
commit 872be36225
No known key found for this signature in database
GPG Key ID: 9591A163FF9BE04C
2 changed files with 12 additions and 4 deletions

View File

@ -104,7 +104,9 @@ void AVForm::showEvent(QShowEvent*)
getAudioInDevices();
createVideoSurface();
getVideoDevices();
Audio::getInstance().subscribeInput();
Audio& audio = Audio::getInstance();
audio.subscribeInput();
audio.subscribeOutput();
}
void AVForm::onVideoModesIndexChanged(int index)
@ -241,7 +243,9 @@ void AVForm::hideEvent(QHideEvent *)
killVideoSurface();
}
videoDeviceList.clear();
Audio::getInstance().unsubscribeInput();
Audio& audio = Audio::getInstance();
audio.unsubscribeInput();
audio.unsubscribeOutput();
}
void AVForm::getVideoDevices()

View File

@ -85,13 +85,17 @@ void MicFeedbackWidget::timerEvent(QTimerEvent*)
void MicFeedbackWidget::showEvent(QShowEvent*)
{
Audio::getInstance().subscribeInput();
Audio& audio = Audio::getInstance();
audio.subscribeInput();
audio.subscribeOutput();
timerId = startTimer(60);
}
void MicFeedbackWidget::hideEvent(QHideEvent*)
{
Audio::getInstance().unsubscribeInput();
Audio& audio = Audio::getInstance();
audio.unsubscribeInput();
audio.unsubscribeOutput();
if (timerId != 0)
{