No default output device on iPod toch, QAudioOutput



  • Hi,

    i use Qt5.2 alpha to test some audio features.
    I have a simple QT application which prints the number of available output devices by
    @QList<QAudioDeviceInfo> mList = QAudioDeviceInfo::availableDevices(QAudio::AudioOutput);
    std::cout << "there are " << mList.size() << " output devices" << std::endl@
    On Pc and MAC this runs without problems. But when i run the application on an iPod touch 5th gen (ios 7.0.2 xcode 5). it says there are 0 devices.
    What might be the problem here? I don't think that qt is not able to play sounds on ios devices.

    regards!



  • Does nobody have an idea what might be wrong?



  • Hi, I had the same problem with Qt5.2 final and could not get my app or the audiooutput example to find any output devices using the QAudioOutput set of classes.

    The answer was in the end quite simple, you just need to add the following to your .pro project file:

    QTPLUGIN += qtaudio_coreaudio

    Since all iOS apps must be statically linked with the Qt libraries, plugins must also be statically linked but you need to tell Qt which plugins you want so that they can self register with the plugin system. This may be a bit late to help you dualfaces but may be useful to others anyway.


Log in to reply
 

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