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:
parent
e7f666be77
commit
872be36225
|
@ -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()
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user