mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 19:04:32 +02:00
Merge pull request #3769 from birarda/plugs
add guard for handling of local audio
This commit is contained in:
commit
885a93b7e3
1 changed files with 5 additions and 2 deletions
|
@ -1345,8 +1345,11 @@ void Audio::handleAudioByteArray(const QByteArray& audioByteArray, const AudioIn
|
|||
QAudioOutput* localSoundOutput = new QAudioOutput(getNamedAudioDeviceForMode(QAudio::AudioOutput, _outputAudioDeviceName), localFormat, this);
|
||||
|
||||
QIODevice* localIODevice = localSoundOutput->start();
|
||||
qDebug() << "Writing" << audioByteArray.size() << "to" << localIODevice;
|
||||
localIODevice->write(audioByteArray);
|
||||
if (localIODevice) {
|
||||
localIODevice->write(audioByteArray);
|
||||
} else {
|
||||
qDebug() << "Unable to handle audio byte array. Error:" << localSoundOutput->error();
|
||||
}
|
||||
} else {
|
||||
qDebug() << "Audio::handleAudioByteArray called with an empty byte array. Sound is likely still downloading.";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue