mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-19 08:18:05 +02:00
Merge pull request #10429 from zzmp/audio/close-device
Close audio device when switching outputs
This commit is contained in:
commit
c5a0a1af2f
2 changed files with 1 additions and 1 deletions
|
@ -1506,6 +1506,7 @@ bool AudioClient::switchOutputToAudioDevice(const QAudioDeviceInfo& outputDevice
|
|||
|
||||
// cleanup any previously initialized device
|
||||
if (_audioOutput) {
|
||||
_audioOutputIODevice.close();
|
||||
_audioOutput->stop();
|
||||
|
||||
//must be deleted in next eventloop cycle when its called from notify()
|
||||
|
|
|
@ -94,7 +94,6 @@ public:
|
|||
_audio(audio), _unfulfilledReads(0) {}
|
||||
|
||||
void start() { open(QIODevice::ReadOnly | QIODevice::Unbuffered); }
|
||||
void stop() { close(); }
|
||||
qint64 readData(char * data, qint64 maxSize) override;
|
||||
qint64 writeData(const char * data, qint64 maxSize) override { return 0; }
|
||||
int getRecentUnfulfilledReads() { int unfulfilledReads = _unfulfilledReads; _unfulfilledReads = 0; return unfulfilledReads; }
|
||||
|
|
Loading…
Reference in a new issue