Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    QAudioDeviceInfo::availableDevices does not work in my build of Qt 5.3.2 on Ubuntu Linux 12

    Installation and Deployment
    2
    8
    1329
    Loading More Posts
    • 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
      sahlan last edited by

      I built Qt 5.3.2 and programmed a C++ multimedia application, which detects my camera OK, but QAudioDdeviceInfo::availableDevices returns zero audio input and output devices, whereas the Ubuntu system settings for sound shows two of each audio device type. I have read that this problem is something to do with plugins. Is that correct?

      Here are my command lines options for configure, which was followed by a make then a make install:

      ./configure -prefix /home/username/QtSDK/5.3.2/debug -debug -opensource -shared
      -platform linux-g++ -rpath -no-c++11 -nomake tests -make tools -make libs -make examples

      I don't see any options in the Qt Linux configure for audio plugins, apart form -pulseaudio and -alsa, which it says are default choices. Where would these plugins be built and installed to? I don't see them under the plugins directory. Or, could I be missing a required library? Or could I fix this by installing a later version of Ubuntu?

      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        Hi and welcome to devnet,

        Does it also happen if you use one of the pre-built package ?

        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 Reply Quote 0
        • S
          sahlan last edited by

          Thank you. That's a good question. I will try what you suggest.

          It leads me to further question, as I haven't distributed a Linux application based on Qt before. In general should I be installing my build of Qt along with my application binaries or should I be asking the user to run the official pre-built Qt installer, before installing my application?

          1 Reply Last reply Reply Quote 0
          • SGaist
            SGaist Lifetime Qt Champion last edited by

            It depend on how you will deploy your application (through Linux distributions package manager, by hand etc.)

            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 Reply Quote 0
            • S
              sahlan last edited by

              I found that the pre-built install has an "audio" directory under "plugins", whereas my build did not. I thought audio plugins were a default option for the build. Next time I will add them explicitly. Copying the audio plugins directory to my build directories solved the problem. Thank you for your suggestion to try the pre-built libraries.

              I have been using a script to install the libraries to a subdirectory of /usr/local/lib, adding a conf file and calling ldconfig, but this requires sudo. I understand that a simpler install would involve a command file that temporarily sets LD_LIBRARY_PATH to a subdirectory of the user's home, then runs the application.

              1 Reply Last reply Reply Quote 0
              • SGaist
                SGaist Lifetime Qt Champion last edited by

                That's pretty strange, the make install step should have copied them in the right place.

                How are you installing Qt exactly ? Looks like your not following the standard procedure

                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 Reply Quote 0
                • S
                  sahlan last edited by

                  I have just completed a make and make install of Qt 5.3.2 on OSX 10.8, and I see it has created audio plugins, so I don't know what went wrong with my Linux build. Anyway, I know what to look for if the problem happens again.

                  The install procedure I referred to in my previous post is the one I use to install Qt for my application on a user's machine, rather than on my development machine. Is there a standard way this should be done?

                  1 Reply Last reply Reply Quote 0
                  • SGaist
                    SGaist Lifetime Qt Champion last edited by

                    Look for the "deployment guides" for the platform you target. Also on linux, depending on how you would like to distribute your application you could also provide packages for the targeted distributions.

                    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 Reply Quote 0
                    • First post
                      Last post