[solved] QAudioDeviceInfo::availableDevices - no device found, if start on PC without Qt installed



  • Hi, all...

    Qt 5.3.2 (mingw482_32)

    This sample code :
    ...
    foreach (const QAudioDeviceInfo &deviceInfo, QAudioDeviceInfo::availableDevices(QAudio::AudioOutput))
    {
    ui->terminal->append ( "Device name: " + deviceInfo.deviceName());
    }
    ...

    works fine if start on PC where Qt installed. If I start .exe on PC without Qt, QAudioDeviceInfo::availableDevices return 0 audio output device.

    My PC (with Qt) is Windows 7 (64), other PC is Windows XP, 7 (32 bit)



  • Sample
    .. Qt-32\Qt5.3.2\Examples\Qt-5.3\multimedia\audiooutput

    works the same.

    All Ok on my PC
    http://clip2net.com/s/joTByQ

    And Empty list on other PC
    http://clip2net.com/s/joTEqu


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Are you sure you deployed your application correctly with all dlls and plugins needed ?



  • Magnificently!!

    I tried to act by analogy with Qt 5.0.2

    My App folder contains the following files:

    @
    .\platforms
    MyApp.exe
    D3DCompiler_43.dll
    icudt52.dll
    icuin52.dll
    icuuc52.dll
    libgcc_s_dw2-1.dll
    libstdc++-6.dll
    libwinpthread-1.dll
    qt5core.dll
    qt5gui.dll
    qt5multimedia.dll
    qt5network.dll
    qt5serialport.dll
    qt5widgets.dll
    @

    Application to be started, but there are problems described above.

    After that I copy Qt5.3.2\Tools\QtCreator\bin\qt.conf file App folder
    @
    [Paths]
    Libraries=../lib/qtcreator
    Plugins=plugins
    Imports=imports
    Qml2Imports=qml
    @

    and copy Qt5.3.2\5.3\mingw482_32\plugins folder to App folder :

    @
    .\plugins
    ..\audio
    ..\platforms
    MyApp.exe
    D3DCompiler_43.dll
    icudt52.dll
    icuin52.dll
    icuuc52.dll
    libgcc_s_dw2-1.dll
    libstdc++-6.dll
    libwinpthread-1.dll
    qt5core.dll
    qt5gui.dll
    qt5multimedia.dll
    qt5network.dll
    qt5serialport.dll
    qt5widgets.dll
    qt.conf
    @

    ... and then everything was fine

    Thanks!


  • Lifetime Qt Champion

    You should correct the qt.conf file since it's tailored for Qt Creator.

    You're welcome !

    Since you have it working now, please update the thread title prepending [solved] so other forum users may know a solution has been found :)


Log in to reply
 

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