Merge remote-tracking branch 'origin/stable' into dev
Change-Id: I48a140d1bbe82ab65e54683d77aea8c97c06ec80
This commit is contained in:
@@ -469,20 +469,22 @@ QList<QByteArray> QAudioDeviceInfoInternal::availableDevices(QAudio::Mode mode)
|
||||
|
||||
QByteArray QAudioDeviceInfoInternal::defaultOutputDevice()
|
||||
{
|
||||
QList<QByteArray> list = availableDevices(QAudio::AudioOutput);
|
||||
if (list.size() > 0)
|
||||
return list.at(0);
|
||||
else
|
||||
return QByteArray();
|
||||
QByteArray defaultDevice;
|
||||
QDataStream ds(&defaultDevice, QIODevice::WriteOnly);
|
||||
ds << quint32(WAVE_MAPPER) // device ID for default device
|
||||
<< QStringLiteral("Default Output Device");
|
||||
|
||||
return defaultDevice;
|
||||
}
|
||||
|
||||
QByteArray QAudioDeviceInfoInternal::defaultInputDevice()
|
||||
{
|
||||
QList<QByteArray> list = availableDevices(QAudio::AudioInput);
|
||||
if (list.size() > 0)
|
||||
return list.at(0);
|
||||
else
|
||||
return QByteArray();
|
||||
QByteArray defaultDevice;
|
||||
QDataStream ds(&defaultDevice, QIODevice::WriteOnly);
|
||||
ds << quint32(WAVE_MAPPER) // device ID for default device
|
||||
<< QStringLiteral("Default Input Device");
|
||||
|
||||
return defaultDevice;
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
Reference in New Issue
Block a user