Alsa Plugin with QT
-
Hi,
I have seen
QAlsaPlugin
,QPulseAudioPlugin
classes in qtmultimedia source code but it didn't look anyone can use it since it's not exported.class QAlsaPlugin : public QAudioSystemPlugin, public QAudioSystemPluginExtension
If I want to use alsa with qt, how can it be done ?
Any help will be appreciated.
Thanks
Vaibhav -
Hi and welcome to devnet,
There's no reason to export these classes as they are plugins that are automatically loaded.
-
The quick and dirty way is to move the other plugins out of the folder.
-
While I have zero love for pulseaudio, the hordes have decreed that it is the official sound interface in linux. You'll see less and less direct support for alsa as time goes by...unless the world miraculously regains its sense.
But to answer your question about direct access to alsa: it is still possible, but probably not directly from the canned Qt classes. You'd have to write your own interface to the alsa sound devices and implement the Qt sound interface classes.
-
@Kent-Dorfman I think there's a bit of a mixup here, it's not PulseAudio VS ALSA. To the best of my knowledge, PulseAudio uses ALSA internally. It is a sound server that sits on to of ALSA and provides features like allowing multiple applications to access audio devices at the same time which is something that ALSA does not do however ALSA provides the hardware accessibility part.
Qt has had several several different backends for that over the years like Phonon which was an audio engine that would also interface with the system sound engine that ultimately would use ALSA at the bottom.
-
@SGaist and @Kent-Dorfman Thanks for your inputs.