Details
-
Bug
-
Resolution: Out of scope
-
P1: Critical
-
None
-
5.6.0
-
None
-
Windows 7 64bit Enterprise
Description
This code:
foreach (const QAudioDeviceInfo &deviceInfo, QAudioDeviceInfo::availableDevices(QAudio::AudioOutput))
{ qDebug() << "Device name: " << deviceInfo.deviceName() << endl; }Prints this:
Device name: "Speakers (Realtek High Definiti"
Device name: "Acer P241W (2- High Definition "
Device name: "Realtek Digital Output (Realtek"
The device names are truncated at 32 characters due to a limitation in Win32 API's waveInGetDevCaps() and waveOutGetDevCaps(). Those use WAVEINCAPS structure where TCHAR szPname[MAXPNAMELEN] houses 32 characters tops.
That makes it impossible to distinguish between two similar adapters installed.
Enumeration should be performed by calling DirectSoundEnumerate instead which has no such limitation: https://msdn.microsoft.com/en-us/library/windows/desktop/ee417545%28v=vs.85%29.aspx
Attachments
Issue Links
- is duplicated by
-
QTBUG-53805 On Windows retrieving the deviceName from QAudioDeviceInfo returns a partial string for the deviceName
-
- Closed
-
-
QTBUG-27216 QString QAudioDeviceInfo::deviceName() const. This function crops full name of multimedia device on Win32.
-
- Closed
-