mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-06-16 17:00:22 +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";
|
qCDebug(audioclient) << "AudioClient::stop(), requesting switchOutputToAudioDevice() to shut down";
|
||||||
switchOutputToAudioDevice(QAudioDeviceInfo(), true);
|
switchOutputToAudioDevice(QAudioDeviceInfo(), true);
|
||||||
|
|
||||||
if (_loopbackResampler) {
|
|
||||||
delete _loopbackResampler;
|
|
||||||
_loopbackResampler = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Stop triggering the checks
|
// Stop triggering the checks
|
||||||
QObject::disconnect(_checkPeakValuesTimer, &QTimer::timeout, nullptr, nullptr);
|
QObject::disconnect(_checkPeakValuesTimer, &QTimer::timeout, nullptr, nullptr);
|
||||||
QObject::disconnect(_checkDevicesTimer, &QTimer::timeout, nullptr, nullptr);
|
QObject::disconnect(_checkDevicesTimer, &QTimer::timeout, nullptr, nullptr);
|
||||||
|
@ -1663,12 +1658,17 @@ bool AudioClient::switchInputToAudioDevice(const QAudioDeviceInfo inputDeviceInf
|
||||||
_dummyAudioInput = NULL;
|
_dummyAudioInput = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// cleanup any resamplers
|
||||||
if (_inputToNetworkResampler) {
|
if (_inputToNetworkResampler) {
|
||||||
// if we were using an input to network resampler, delete it here
|
|
||||||
delete _inputToNetworkResampler;
|
delete _inputToNetworkResampler;
|
||||||
_inputToNetworkResampler = NULL;
|
_inputToNetworkResampler = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_loopbackResampler) {
|
||||||
|
delete _loopbackResampler;
|
||||||
|
_loopbackResampler = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (_audioGate) {
|
if (_audioGate) {
|
||||||
delete _audioGate;
|
delete _audioGate;
|
||||||
_audioGate = nullptr;
|
_audioGate = nullptr;
|
||||||
|
|
Loading…
Reference in a new issue