Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. 3rd Party Software
  4. how to use (pulseaudio) system-libraries in a new QT Program
QtWS25 Last Chance

how to use (pulseaudio) system-libraries in a new QT Program

Scheduled Pinned Locked Moved Solved 3rd Party Software
pulseaudiolibraryc++
7 Posts 2 Posters 2.8k 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.
  • E Offline
    E Offline
    Ebiko
    wrote on 17 Nov 2020, 22:27 last edited by
    #1

    Okay,

    So - Im pretty new here , as well as to programming in general,
    but i've set myself an ambitious goal - and are now trying to reach it, eventually.
    (even though this project of mine might take like centuries but , i'll still try it.)

    What i'm trying to accomplish:

    I want to write an c++ application which uses an system library to speak with an program / or daemon (PulseAudio to be exact here)

    issue is - i have no clue on how to load this libraries.
    i went through the Pulseaudio src , the additional programs like "paprefs" "pactl" "pacmd" and even oder programs based on the code of PulseAudio, "PavuControl" which is shipped in every Ubuntu nowadays to provide a GUI for Pulseaudio.
    But i still cannot figure out how i can load the libs or talk to Pulseaudio otherwise.
    Code Examples tend to be only the code examples , without loading the libs - so i cant learn it from there.

    I want to write an Program , more or less like pavucontrol but with a different functionality.

    But without access to the libraries , i dont even need to start coding.

    yes , as i mentioned i am new , and this project may be a bit insane for my current knowledge. But I want to try to learn with something i wrote myself - probably the best way to learn it, instead of coding hello worlds (although they may be useful in certain circumstances)

    Hope you can help me.
    I'd really appreciate it.

    Ebiko

    J 1 Reply Last reply 18 Nov 2020, 07:33
    0
    • E Ebiko
      17 Nov 2020, 22:27

      Okay,

      So - Im pretty new here , as well as to programming in general,
      but i've set myself an ambitious goal - and are now trying to reach it, eventually.
      (even though this project of mine might take like centuries but , i'll still try it.)

      What i'm trying to accomplish:

      I want to write an c++ application which uses an system library to speak with an program / or daemon (PulseAudio to be exact here)

      issue is - i have no clue on how to load this libraries.
      i went through the Pulseaudio src , the additional programs like "paprefs" "pactl" "pacmd" and even oder programs based on the code of PulseAudio, "PavuControl" which is shipped in every Ubuntu nowadays to provide a GUI for Pulseaudio.
      But i still cannot figure out how i can load the libs or talk to Pulseaudio otherwise.
      Code Examples tend to be only the code examples , without loading the libs - so i cant learn it from there.

      I want to write an Program , more or less like pavucontrol but with a different functionality.

      But without access to the libraries , i dont even need to start coding.

      yes , as i mentioned i am new , and this project may be a bit insane for my current knowledge. But I want to try to learn with something i wrote myself - probably the best way to learn it, instead of coding hello worlds (although they may be useful in certain circumstances)

      Hope you can help me.
      I'd really appreciate it.

      Ebiko

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 18 Nov 2020, 07:33 last edited by
      #2

      @Ebiko said in how to use (pulseaudio) system-libraries in a new QT Program:

      i have no clue on how to load this libraries

      Usually you do not load them (though this is also possible). Instead you link your application against these libraries.
      See https://doc.qt.io/qtcreator/creator-project-qmake-libraries.html
      And you should read on this topic in general.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • E Offline
        E Offline
        Ebiko
        wrote on 18 Nov 2020, 08:30 last edited by
        #3

        Yeah , i have found this wizard already -

        In this wizard i selected "Load System Library" and the hit browse , for the linux library , went to the lib folder where its supposed to be.
        I searched the libpulse-simple.so.* (which definitely is in this folder , since i can find it with my usual file browser) but i could not find it in this folder , it just wasnt beeing shown.

        Exempt from "ls -la /usr/lib/x86_64-linux-gnu/"

        lrwxrwxrwx   1 root root       31 Aug 13 12:53 libpulse-mainloop-glib.so.0 -> libpulse-mainloop-glib.so.0.0.5
        -rw-r--r--   1 root root    18576 Aug 13 12:53 libpulse-mainloop-glib.so.0.0.5
        lrwxrwxrwx   1 root root       24 Aug 13 12:53 libpulse-simple.so.0 -> libpulse-simple.so.0.1.1
        -rw-r--r--   1 root root    22760 Aug 13 12:53 libpulse-simple.so.0.1.1
        lrwxrwxrwx   1 root root       18 Aug 13 12:53 libpulse.so.0 -> libpulse.so.0.21.2
        -rw-r--r--   1 root root   343240 Aug 13 12:53 libpulse.so.0.21.2
        
        

        Screenshot_2020-11-18_09-28-55.png

        J 1 Reply Last reply 18 Nov 2020, 08:51
        0
        • E Ebiko
          18 Nov 2020, 08:30

          Yeah , i have found this wizard already -

          In this wizard i selected "Load System Library" and the hit browse , for the linux library , went to the lib folder where its supposed to be.
          I searched the libpulse-simple.so.* (which definitely is in this folder , since i can find it with my usual file browser) but i could not find it in this folder , it just wasnt beeing shown.

          Exempt from "ls -la /usr/lib/x86_64-linux-gnu/"

          lrwxrwxrwx   1 root root       31 Aug 13 12:53 libpulse-mainloop-glib.so.0 -> libpulse-mainloop-glib.so.0.0.5
          -rw-r--r--   1 root root    18576 Aug 13 12:53 libpulse-mainloop-glib.so.0.0.5
          lrwxrwxrwx   1 root root       24 Aug 13 12:53 libpulse-simple.so.0 -> libpulse-simple.so.0.1.1
          -rw-r--r--   1 root root    22760 Aug 13 12:53 libpulse-simple.so.0.1.1
          lrwxrwxrwx   1 root root       18 Aug 13 12:53 libpulse.so.0 -> libpulse.so.0.21.2
          -rw-r--r--   1 root root   343240 Aug 13 12:53 libpulse.so.0.21.2
          
          

          Screenshot_2020-11-18_09-28-55.png

          J Offline
          J Offline
          jsulm
          Lifetime Qt Champion
          wrote on 18 Nov 2020, 08:51 last edited by
          #4

          @Ebiko Don't know why these libs are not shown. But you can add them manually as shown in the link I posted:

          LIBS += -lpulse
          

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          2
          • E Offline
            E Offline
            Ebiko
            wrote on 18 Nov 2020, 10:56 last edited by
            #5

            seems to be a good start - qt at least doesnt throw an error or warning of some kind - now i need to figure out where to get an .h file from to work with the lib
            but thanks for your help - i didnt notice the "manual" way of adding the lib

            J 1 Reply Last reply 18 Nov 2020, 12:12
            0
            • E Ebiko
              18 Nov 2020, 10:56

              seems to be a good start - qt at least doesnt throw an error or warning of some kind - now i need to figure out where to get an .h file from to work with the lib
              but thanks for your help - i didnt notice the "manual" way of adding the lib

              J Offline
              J Offline
              jsulm
              Lifetime Qt Champion
              wrote on 18 Nov 2020, 12:12 last edited by jsulm
              #6

              @Ebiko said in how to use (pulseaudio) system-libraries in a new QT Program:

              where to get an .h file from to work with the lib
              Install the pulse-dev package

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              E 1 Reply Last reply 20 Nov 2020, 09:05
              2
              • J jsulm
                18 Nov 2020, 12:12

                @Ebiko said in how to use (pulseaudio) system-libraries in a new QT Program:

                where to get an .h file from to work with the lib
                Install the pulse-dev package

                E Offline
                E Offline
                Ebiko
                wrote on 20 Nov 2020, 09:05 last edited by
                #7

                @jsulm
                thank you really much - now i can really start to learn/write :D

                1 Reply Last reply
                1

                1/7

                17 Nov 2020, 22:27

                • Login

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