View Single Post
helex's Avatar
Posts: 543 | Thanked: 802 times | Joined on Apr 2010 @ Germany
#4
Okay, here now the PyQt4 class reference for QtMultimedia

But when I try to read from the defaultInputDevice() I get the error:
Code:
ALSA lib pcm.c:2211: (snd_pcm_open_noupdate) Unknown PCM null
So, to find out what I'm doing wrong I created this fast code:
Code:
from PyQt4 import QtMultimedia

devi = QtMultimedia.QAudioDeviceInfo.availableDevices(QtMultimedia.QAudio.AudioInput)
for d in devi:
    d.deviceName()
    
devo = QtMultimedia.QAudioDeviceInfo.availableDevices(QtMultimedia.QAudio.AudioOutput)
for do in devo:
    do.deviceName()

info = QtMultimedia.QAudioDeviceInfo(QtMultimedia.QAudioDeviceInfo.defaultInputDevice())
print info.deviceName()
I expected to have a result of input and output devices and the last one the default Input Device (microphone). But I get only null at the command line. The Lists devi and devo are empty.

What's wrong? Have I to activate the sound devices before? I haven't found anything like this in the class reference nor in your c++ example.