Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [solved] QAudioDeviceInfo::availableDevices - no device found, if start on PC without Qt installed

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

Scheduled Pinned Locked Moved General and Desktop
5 Posts 2 Posters 4.9k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    SashkaTekon
    wrote on last edited by
    #1

    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)

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SashkaTekon
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi and welcome to devnet,

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

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SashkaTekon
          wrote on last edited by
          #4

          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!

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            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 :)

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved