Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
4.7.4
-
None
-
MS Windows 7 Home Basic SP1 (Russian localization), MS Windows 7 Starter SP1 (Russian localization), MS Windows XP SP3 (Russian localization).
-
468656296b79ab2c87fd9ddf10b9f3bdf8ce67c0
Description
The point is that QAudioDeviceInfo::availableDevices method returns list of QAudioDeviceInfo objects. And every object of that list describes its own audio device from all available in the system devices. By the by, there is one virtual device which relates with default system device and the name of that virtual device is always "Default". So the whole point is all another devices in Russian localization of Windows has Russian names (like «Динамики ...» or «Микрофон ...») and that's why Qt can't recognize them. For example the QAudioDeviceInfo::devicename returns something like "D2fq8&$f32" (incorrect encoding) and QAudioDeviceInfo::supportedchannels (supportedcodec, etc.) returns null arrays. So programmer can't work with those devices. I don't know who mess it up - Qt methods or WinAPI functions (which are wrapped into Qt methods how I guess) but we have what we have. My opinion is that this problem occurs because of such thing: Windows contains the names of devices in Unicode (each char takes two bytes), but WinAPI function which is response to give you the name of device returns this name in ASCII or something (one byte per char). Or maybe Qt holds than device names in ASCII. Anyhow the cause of the issue hides in the circumstance of not correct device name encoding. It's just my guess.