mirror of
https://github.com/overte-org/overte.git
synced 2025-04-15 16:02:08 +02:00
Reset loopback resampler when input device is changed
This commit is contained in:
parent
f7236f0498
commit
451cf60e54
1 changed files with 6 additions and 6 deletions
|
@ -755,11 +755,6 @@ void AudioClient::stop() {
|
|||
qCDebug(audioclient) << "AudioClient::stop(), requesting switchOutputToAudioDevice() to shut down";
|
||||
switchOutputToAudioDevice(QAudioDeviceInfo(), true);
|
||||
|
||||
if (_loopbackResampler) {
|
||||
delete _loopbackResampler;
|
||||
_loopbackResampler = NULL;
|
||||
}
|
||||
|
||||
// Stop triggering the checks
|
||||
QObject::disconnect(_checkPeakValuesTimer, &QTimer::timeout, nullptr, nullptr);
|
||||
QObject::disconnect(_checkDevicesTimer, &QTimer::timeout, nullptr, nullptr);
|
||||
|
@ -1663,12 +1658,17 @@ bool AudioClient::switchInputToAudioDevice(const QAudioDeviceInfo inputDeviceInf
|
|||
_dummyAudioInput = NULL;
|
||||
}
|
||||
|
||||
// cleanup any resamplers
|
||||
if (_inputToNetworkResampler) {
|
||||
// if we were using an input to network resampler, delete it here
|
||||
delete _inputToNetworkResampler;
|
||||
_inputToNetworkResampler = NULL;
|
||||
}
|
||||
|
||||
if (_loopbackResampler) {
|
||||
delete _loopbackResampler;
|
||||
_loopbackResampler = NULL;
|
||||
}
|
||||
|
||||
if (_audioGate) {
|
||||
delete _audioGate;
|
||||
_audioGate = nullptr;
|
||||
|
|
Loading…
Reference in a new issue