Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Mac OSX and missing pulseaudio plugin
QtWS25 Last Chance

Mac OSX and missing pulseaudio plugin

Scheduled Pinned Locked Moved Installation and Deployment
macpulseaudio
8 Posts 2 Posters 4.2k Views
  • 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.
  • G Offline
    G Offline
    gonesurfing
    wrote on 31 Aug 2015, 03:46 last edited by
    #1

    All,

    I've hit a roadblock trying to get a cross platform application to run on osx which requires pulseaudio. QT5 builds and installs fine (through macports), but only builds the qtaudio_coreaudio.dylib in the plugin directory. This is despite selecting the pulse audio variant which supplies "-pulseaudio" to the configure script. I even built the audio devices example project, and it also only detects the core audio input/output. I've done a verbose log of the build process, of which some relevant parts are pasted below. Any ideas?

    -Here is the configure invocation
    configure -top-level -prefix /opt/local/libexec/qt5-mac -bindir /opt/local/libexec/qt5-mac/bin -headerdir /opt/local/libexec/qt5-mac/include -libdir /opt/local/libexec/qt5-mac/lib -archdatadir /opt/local/libexec/qt5-mac -plugindir /opt/local/libexec/qt5-mac/plugins -importdir /opt/local/libexec/qt5-mac/imports -qmldir /opt/local/libexec/qt5-mac/qml -datadir /opt/local/libexec/qt5-mac -docdir /opt/local/libexec/qt5-mac/doc -translationdir /opt/local/libexec/qt5-mac/translations -sysconfdir /opt/local/libexec/qt5-mac/etc/xdg -examplesdir /opt/local/libexec/qt5-mac/examples -testsdir /opt/local/libexec/qt5-mac/tests -hostdatadir /opt/local/libexec/qt5-mac -release -opensource -confirm-license -shared -largefile -accessibility -no-sql-db2 -no-sql-ibase -no-sql-mysql -no-sql-oci -no-sql-odbc -no-sql-psql -no-sql-sqlite -no-sql-sqlite2 -no-sql-tds -platform macx-clang -force-pkg-config -system-zlib -no-mtdev -no-journald -system-libpng -system-libjpeg -system-freetype -system-harfbuzz -openssl-linked -system-pcre --disable-xcb --disable-xkbcommon -no-xinput2 -no-xcb-xlib -glib -pulseaudio -no-alsa -no-gtkstyle -make libs -make tools -nomake examples -nomake tests -gui -widgets -rpath -verbose -no-optimized-qmake -nis -cups -iconv -no-evdev -icu -fontconfig -strip -no-pch -dbus-linked -no-use-gold-linker -no-separate-debug-info -no-xcb -no-eglfs -no-directfb -no-linuxfb -no-kms -no-system-proxies -framework -no-libudev -no-egl -no-openvg

    Support enabled for:
    Accessibility .......... yes
    ALSA ................... no
    CUPS ................... yes
    Evdev .................. no
    FontConfig ............. yes
    FreeType ............... yes (system library)
    Glib ................... yes
    GTK theme .............. no
    HarfBuzz ............... yes (system library)
    Iconv .................. yes
    ICU .................... yes
    Image formats:
    GIF .................. yes (plugin, using bundled copy)
    JPEG ................. yes (plugin, using system library)
    PNG .................. yes (in QtGui, using system library)
    journald ............... no
    mtdev .................. no
    Networking:
    CoreWlan ............. yes
    getaddrinfo .......... yes
    getifaddrs ........... yes
    IPv6 ifname .......... yes
    OpenSSL .............. yes (linked to the libraries)
    NIS .................... yes
    OpenGL / OpenVG:
    EGL .................. no
    OpenGL ............... desktop
    OpenVG ............... no
    PCRE ................... system
    pkg-config ............. yes
    PulseAudio ............. yes
    QPA backends:
    DirectFB ............. no
    EGLFS ................ no
    KMS .................. no
    LinuxFB .............. no
    XCB .................. no
    Session management ..... yes

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 31 Aug 2015, 21:50 last edited by
      #2

      Hi and welcome to devnet,

      You can try by moving the CoreAudio plugin out of the install path. Then you'll see if the PulseAudio plugin is loaded. In doubt, you can use QT_DEBUG_PLUGINS=1 before your application start to follow what is being loaded

      Hope it helps

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

      G 1 Reply Last reply 1 Sept 2015, 00:06
      0
      • S SGaist
        31 Aug 2015, 21:50

        Hi and welcome to devnet,

        You can try by moving the CoreAudio plugin out of the install path. Then you'll see if the PulseAudio plugin is loaded. In doubt, you can use QT_DEBUG_PLUGINS=1 before your application start to follow what is being loaded

        Hope it helps

        G Offline
        G Offline
        gonesurfing
        wrote on 1 Sept 2015, 00:06 last edited by
        #3

        @SGaist

        I just tried moving it, and no audio plugin is loaded. It appears that without the dylib in the audio plugin directory, pulseaudio is not an option to any application. I found this in the src qtmultimedia/qtmultimedia.pro file...

        load(configure)
        qtCompileTest(openal)
        win32 {
        qtCompileTest(directshow) {
        qtCompileTest(wshellitem)
        }
        qtCompileTest(wmsdk)
        qtCompileTest(wmp)
        contains(QT_CONFIG, wmf-backend): qtCompileTest(wmf)
        qtCompileTest(evr)
        } else:mac {
        qtCompileTest(avfoundation)
        } else:qnx {
        qtCompileTest(mmrenderer)
        } else:!android {
        contains(QT_CONFIG, alsa):qtCompileTest(alsa)
        contains(QT_CONFIG, pulseaudio):qtCompileTest(pulseaudio)

        It appears that when the mac platform is selected, only the coreaudio plugin is built. I can try to edit this to include the pulseaudio library and see if it will compile. Fingers crossed.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 1 Sept 2015, 21:16 last edited by
          #4

          That's not something I would have guessed but it's not unexpected. So yes, disabling it by hand looks like the only solution currently. You could however try to ask a feature request to allow building of the pulse audio module on OS X

          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
          • G Offline
            G Offline
            gonesurfing
            wrote on 15 Sept 2015, 03:54 last edited by
            #5

            I've modified the following project files to ensure pulse audio support is compiled in...
            qtmultimedia.pro
            plugins/plugins.pro

            The dylib file is compiled but when I load the audiodevice example app, I still don't get pulse audio support. Using QT_DEBUG_PLUGINS, I see that the pulseaudio dylib is found, but only coreaudio is loaded. I even tried compiling with gstreamer support with the same result. Here is the debug output. The same program compiles in Ubuntu and loads pulseaudio support with no issues.

            What am I missing? It seems like there must be a qmake configuration setting that says not to include the pulseaudio library on mac.

            QFactoryLoader::QFactoryLoader() looking at "/Users/ewthornton/local/qt-macx-clang-pulse2/plugins/audio/libqtmedia_pulse.dylib"
            Found metadata in lib /Users/ewthornton/local/qt-macx-clang-pulse2/plugins/audio/libqtmedia_pulse.dylib, metadata=
            {
            "IID": "org.qt-project.qt.audiosystemfactory/5.0",
            "MetaData": {
            "Keys": [
            "default"
            ]
            },
            "className": "QPulseAudioPlugin",
            "debug": false,
            "version": 328706
            }

            Got keys from plugin meta data ("default")
            QFactoryLoader::QFactoryLoader() looking at "/Users/ewthornton/local/qt-macx-clang-pulse2/plugins/audio/libqtmedia_pulse_debug.dylib"
            Found metadata in lib /Users/ewthornton/local/qt-macx-clang-pulse2/plugins/audio/libqtmedia_pulse_debug.dylib, metadata=
            {
            "IID": "org.qt-project.qt.audiosystemfactory/5.0",
            "MetaData": {
            "Keys": [
            "default"
            ]
            },
            "className": "QPulseAudioPlugin",
            "debug": true,
            "version": 328706
            }

            Got keys from plugin meta data ("default")
            QFactoryLoader::QFactoryLoader() checking directory path "/Users/ewthornton/qt-examples/audiodevices/audiodevices.app/Contents/MacOS/audio" ...
            loaded library "/Users/ewthornton/local/qt-macx-clang-pulse2/plugins/audio/libqtaudio_coreaudio.dylib"

            otool -L audiodevices
            audiodevices:
            /Users/ewthornton/local/qt-macx-clang-pulse2/lib/QtMultimedia.framework/Versions/5/QtMultimedia (compatibility version 5.4.0, current version 5.4.2)
            /Users/ewthornton/local/qt-macx-clang-pulse2/lib/QtNetwork.framework/Versions/5/QtNetwork (compatibility version 5.4.0, current version 5.4.2)
            /Users/ewthornton/local/qt-macx-clang-pulse2/lib/QtCore.framework/Versions/5/QtCore (compatibility version 5.4.0, current version 5.4.2)
            /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration (compatibility version 1.0.0, current version 1.0.0)
            /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
            /Users/ewthornton/local/qt-macx-clang-pulse2/lib/QtGui.framework/Versions/5/QtGui (compatibility version 5.4.0, current version 5.4.2)
            /Users/ewthornton/local/qt-macx-clang-pulse2/lib/QtWidgets.framework/Versions/5/QtWidgets (compatibility version 5.4.0, current version 5.4.2)
            /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)
            /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)
            /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 104.1.0)
            /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0)

            1 Reply Last reply
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 15 Sept 2015, 21:58 last edited by
              #6

              On OS X the official backend is CoreAudio not PulseAudio so for testing purpose, i'd remove the CoreAudio backend to see if the PulseAudio gets selected

              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
              • G Offline
                G Offline
                gonesurfing
                wrote on 16 Sept 2015, 04:35 last edited by
                #7

                @SGaist

                That worked!

                Now, why won't they coexist? I'd like to have support for both in my application.

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on 16 Sept 2015, 22:29 last edited by
                  #8

                  They do but I guess that since CoreAudio comes before PulseAudio alphabetically, it's the one getting selected.

                  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