mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
fix: [un]subscribe output in avform
Fix sound test on AV settings tab
This commit is contained in:
parent
c41de48a6b
commit
8c05399e41
|
@ -117,6 +117,7 @@ void AVForm::hideEvent(QHideEvent* event)
|
||||||
{
|
{
|
||||||
if (subscribedToAudioIn) {
|
if (subscribedToAudioIn) {
|
||||||
// TODO: This should not be done in show/hide events
|
// TODO: This should not be done in show/hide events
|
||||||
|
audio->unsubscribeOutput(alSource);
|
||||||
audio->unsubscribeInput();
|
audio->unsubscribeInput();
|
||||||
subscribedToAudioIn = false;
|
subscribedToAudioIn = false;
|
||||||
}
|
}
|
||||||
|
@ -139,6 +140,7 @@ void AVForm::showEvent(QShowEvent* event)
|
||||||
|
|
||||||
if (!subscribedToAudioIn) {
|
if (!subscribedToAudioIn) {
|
||||||
// TODO: This should not be done in show/hide events
|
// TODO: This should not be done in show/hide events
|
||||||
|
audio->subscribeOutput(alSource);
|
||||||
audio->subscribeInput();
|
audio->subscribeInput();
|
||||||
subscribedToAudioIn = true;
|
subscribedToAudioIn = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -102,6 +102,7 @@ private:
|
||||||
CameraSource& camera;
|
CameraSource& camera;
|
||||||
QVector<QPair<QString, QString>> videoDeviceList;
|
QVector<QPair<QString, QString>> videoDeviceList;
|
||||||
QVector<VideoMode> videoModes;
|
QVector<VideoMode> videoModes;
|
||||||
|
uint alSource;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue
Block a user