我的电脑上有一个音频输入设备。
QAudioDeviceInfo::availableDevices
返回空列表。
调用waveInGetDevCaps(0)
会返回下一步:
FF FF - Mid
FF FF - Pid
10 00 00 00 version
1C 04 38 04 3A 04 40 04 -name
3E 04 44 04 3E 04 3D 04
20 00 28 00 57 00 65 00
62 00 63 00 61 00 6D 00
20 00 43 00 32 00 31 00
30 00 29 00 00 00 00 00
00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00
FF FF 0F 00 - formats
02 00 - channels
00 00 - reserved
我建议原因是西里尔语设备名称。
有什么想法吗?
谢谢大家!
UPD:
QList<QAudioDeviceInfo> devices = QAudioDeviceInfo::availableDevices(QAudio::AudioInput);
foreach(QAudioDeviceInfo deviceInfo, devices)
{
printList(deviceInfo.supportedByteOrders(), "Orders: ");
printList(deviceInfo.supportedChannelCounts(),"Channs: ");
printList(deviceInfo.supportedCodecs(), "Codecs: ");
printList(deviceInfo.supportedSampleRates(), "Rates : ");
printList(deviceInfo.supportedSampleSizes(), "Sizes : ");
printList(deviceInfo.supportedSampleTypes(), "Types : ");
printFormat(deviceInfo.preferredFormat(), "preferred");
}