mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 19:59:28 +02:00
close audio device when switching
This commit is contained in:
parent
a302c220f4
commit
5a11911e1d
2 changed files with 1 additions and 1 deletions
|
@ -1504,6 +1504,7 @@ bool AudioClient::switchOutputToAudioDevice(const QAudioDeviceInfo& outputDevice
|
||||||
|
|
||||||
// cleanup any previously initialized device
|
// cleanup any previously initialized device
|
||||||
if (_audioOutput) {
|
if (_audioOutput) {
|
||||||
|
_audioOutputIODevice.close();
|
||||||
_audioOutput->stop();
|
_audioOutput->stop();
|
||||||
|
|
||||||
delete _audioOutput;
|
delete _audioOutput;
|
||||||
|
|
|
@ -94,7 +94,6 @@ public:
|
||||||
_audio(audio), _unfulfilledReads(0) {}
|
_audio(audio), _unfulfilledReads(0) {}
|
||||||
|
|
||||||
void start() { open(QIODevice::ReadOnly | QIODevice::Unbuffered); }
|
void start() { open(QIODevice::ReadOnly | QIODevice::Unbuffered); }
|
||||||
void stop() { close(); }
|
|
||||||
qint64 readData(char * data, qint64 maxSize) override;
|
qint64 readData(char * data, qint64 maxSize) override;
|
||||||
qint64 writeData(const char * data, qint64 maxSize) override { return 0; }
|
qint64 writeData(const char * data, qint64 maxSize) override { return 0; }
|
||||||
int getRecentUnfulfilledReads() { int unfulfilledReads = _unfulfilledReads; _unfulfilledReads = 0; return unfulfilledReads; }
|
int getRecentUnfulfilledReads() { int unfulfilledReads = _unfulfilledReads; _unfulfilledReads = 0; return unfulfilledReads; }
|
||||||
|
|
Loading…
Reference in a new issue