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:
parent
dd1b0efd61
commit
552155bd1f
|
@ -760,6 +760,8 @@ void Audio::unsubscribeOutput(SID& sid)
|
||||||
{
|
{
|
||||||
QMutexLocker locker(&d->audioLock);
|
QMutexLocker locker(&d->audioLock);
|
||||||
|
|
||||||
|
d->outSources.removeAll(sid);
|
||||||
|
|
||||||
if (sid) {
|
if (sid) {
|
||||||
if (alIsSource(sid)) {
|
if (alIsSource(sid)) {
|
||||||
alDeleteSources(1, &sid);
|
alDeleteSources(1, &sid);
|
||||||
|
@ -772,8 +774,6 @@ void Audio::unsubscribeOutput(SID& sid)
|
||||||
sid = 0;
|
sid = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
d->outSources.removeAll(sid);
|
|
||||||
|
|
||||||
if (d->outSources.isEmpty())
|
if (d->outSources.isEmpty())
|
||||||
d->cleanupOutput();
|
d->cleanupOutput();
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,7 +49,6 @@ ToxCall::ToxCall(ToxCall&& other) noexcept
|
||||||
// required -> ownership of audio input is moved to new instance
|
// required -> ownership of audio input is moved to new instance
|
||||||
Audio& audio = Audio::getInstance();
|
Audio& audio = Audio::getInstance();
|
||||||
audio.subscribeInput();
|
audio.subscribeInput();
|
||||||
audio.subscribeOutput(alSource);
|
|
||||||
|
|
||||||
#ifdef QTOX_FILTER_AUDIO
|
#ifdef QTOX_FILTER_AUDIO
|
||||||
filterer = other.filterer;
|
filterer = other.filterer;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user