mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-07 19:35:32 +08:00
[AFV] Ref T739, audio context default device handling
This commit is contained in:
committed by
Mat Sutcliffe
parent
aed1103ce6
commit
a9a772c929
@@ -86,8 +86,12 @@ namespace BlackSound
|
||||
{
|
||||
if (device.isDefault() || !device.isValid())
|
||||
{
|
||||
if (device.getType() == CAudioDeviceInfo::InputDevice) { return CAudioDeviceInfoList::defaultQtInputDevice(); }
|
||||
else { return CAudioDeviceInfoList::defaultQtOutputDevice(); }
|
||||
const QAudioDeviceInfo defDevice = device.isInputDevice() ? QAudioDeviceInfo::defaultInputDevice() : QAudioDeviceInfo::defaultOutputDevice();
|
||||
if (!defDevice.isFormatSupported(format))
|
||||
{
|
||||
format = defDevice.nearestFormat(format);
|
||||
}
|
||||
return defDevice;
|
||||
}
|
||||
|
||||
const QList<QAudioDeviceInfo> allQtDevices =
|
||||
|
||||
Reference in New Issue
Block a user