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

Merge PR #2719 from antis81:fix_audio_subscriptions

* fix dangling audio output device
* do not resubscribe sid in copy constructor
This commit is contained in:
Nils Fenner 2015-12-23 23:29:20 +01:00
parent dd1b0efd61
commit 552155bd1f
No known key found for this signature in database
GPG Key ID: 9591A163FF9BE04C
2 changed files with 2 additions and 3 deletions

View File

@ -760,6 +760,8 @@ void Audio::unsubscribeOutput(SID& sid)
{
QMutexLocker locker(&d->audioLock);
d->outSources.removeAll(sid);
if (sid) {
if (alIsSource(sid)) {
alDeleteSources(1, &sid);
@ -772,8 +774,6 @@ void Audio::unsubscribeOutput(SID& sid)
sid = 0;
}
d->outSources.removeAll(sid);
if (d->outSources.isEmpty())
d->cleanupOutput();
}

View File

@ -49,7 +49,6 @@ ToxCall::ToxCall(ToxCall&& other) noexcept
// required -> ownership of audio input is moved to new instance
Audio& audio = Audio::getInstance();
audio.subscribeInput();
audio.subscribeOutput(alSource);
#ifdef QTOX_FILTER_AUDIO
filterer = other.filterer;