QAudioDeviceInfo availableDevices
-
Hi all,
I am using Qt 5.2.1 on Linux. If I call
@QAudioDeviceInfo::availableDevices(...)@
I get a list of devices like this:
@alsa_output.pci-0000_00_1b.0.analog-stereo
alsa_input.pci-0000_00_1b.0.analog-stereo
alsa_output.pci-0000_00_1b.0.analog-stereo.monitor@Now, as far as I understand, availableDevices is the only API that can be called to retrieve the audio devices list that can be presented to the application UI. How can strings like those be of any use to the user ?
In my previous implementation based on Qt 4.8, I was using direct calls to ALSA, getting a list like this:
@HDA Intel PCH - ALC269VB Analog
HDA Intel PCH - HDMI 0@So there is indeed a way to get better strings, without the need of additional parsing. Moreover, the code has to be distinguished by platform, as on Windows (for example) the names are a little bit better, but truncated to 31 characters for historical reasons (which I am surprised have never been faced in a serious way)
My point is, I can use the old ALSA code, but why ?
First of all I would loose the Qt's cross platform promise.
Secondly, QtMultimedia should provide all the necessary APIs to control either low level layers but also should give the necessary information to be presented at the UI level.Anyone has found any workaround for this ?
Thanks