Problems reading multichannel data from usb soundboards using QAudioInput and QAudioInfo

  • I have found that the Audio Input example that comes with QT 5.0.1 running under Ubuntu 12.03 and 13.04 does not return correct multichannel data. I modified the example for two channels and I find that data from channel 1 shows up in channel 1 and also in channel 2. I have checked this with two different USB soundboards (Griffen iMic and Lexicon Omega). I also have checked that the Ubuntu ALSA driver works for the USB soundboard (arecord -v -c 2 -f cd -t wav -D hw:CARD=system test1.wav records a proper two channel file with the proper channel separation).

    So, it seems to me that AudioInput or AudioInfo is not working properly.
    If I interrogate the devices via AudioInfo via
    foreach(const QAudioDeviceInfo &deviceInfo, QAudioDeviceInfo::availableDevices(QAudio::AudioInput))
    qDebug() << "Device name: " << deviceInfo.deviceName();
    I find that the iMic shows up only as mono:
    Device name: "alsa_input.usb-Griffin_Technology__Inc_iMic_USB_audio_system-00-system.analog-mono"
    Interestingly, the Lexicon which is a 4 channel A/D shows up as stereo
    Device name: "alsa_input.usb-Lexicon_Lexicon_Omega_Lex1.00-00-Omega.analog-stereo"
    When reading 4 channel data with a signal in channel 1 and zero signal on the other channels, the signal comes in on channel 1 but various seemingly random portions show up in the other channels.

    I wonder if others have found a solution to getting multichannel audio data into Qt using QAudioInput?

    Thanks for any suggestions.

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    It looks like the problem could be in the platform integration. IIRC on linux gstreamer is used.

    You should bring this question to the interest mailing list, you'll find Qt's developers/maintainers there (this forum is more user oriented)

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.