Phonon BackendCapabilities::availableAudioOutputDevices() returns empty list
Christian Esken
esken at kde.org
Wed Dec 18 16:56:57 GMT 2013
Hello,
I am trying to find the existing audio devices known to Phonon. I am
trying to use BackendCapabilities::availableAudioOutputDevices() in
KDE4.11.3, but this simply returns an empty list. "kcmshell4 kcm_phonon"
shows all devices, so its not a generic issue. As background
information, I want to get the actual device name from Phonon, and then
match it to the Mixer devices in KMix (e.g. "hw:0 => hw:0" in ALSA or
"/dev/dsp1 => /dev/mixer1" in OSS).
Do I need initialization code (the tutorials made me think that I do not
need it)? Does anybody has advice?
Christian
// This is the first Phonon call in my code:
QList<Phonon::AudioOutputDevice> devs =
Phonon::BackendCapabilities::availableAudioOutputDevices();
if (devs.isEmpty())
return; // Always returns!!!
Phonon::AudioOutputDevice& dev = devs[0];
// ...
More information about the kde-multimedia
mailing list