Qt Forum

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

    Update: Forum Guidelines & Code of Conduct

    Play sound in ubuntu linux suggestion

    General and Desktop
    3
    6
    5564
    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.
    • A
      alexandros last edited by

      Hello developers :)
      QSound apparently doesn't work for linux because it requires NAS or something like this that it's not default and I don't want dependencies like this...

      So, I've seen some libraries such as QtMultimedia or QAudioOutput that look really interesting (I don't want to use phonon because it is huge and I just want to play an audio file, nothing more) but they are not available (maybe available only for mobile programming if correct?)!
      Why is this? What do you suggest me to do?
      I run this version of Qt:
      Qt 2.1.0 based on Qt 4.7.2 (32 bit)
      and, as always, thanks in advance for any answers :) :)

      1 Reply Last reply Reply Quote 0
      • D
        dangelog last edited by

        They ARE available even on desktop. You could just include the QtMultimedia module (QT += multimedia), but it's a much better idea to use the one available from QtMobility.

        Software Engineer
        KDAB (UK) Ltd., a KDAB Group company

        1 Reply Last reply Reply Quote 0
        • D
          dialingo last edited by

          Use QMediaPlayer!
          It is part of Mobility. Ubuntu users find it in package qtmobility-dev

          Mobility comes with a media player example.

          1 Reply Last reply Reply Quote 0
          • A
            alexandros last edited by

            Hey, thanks, I have already tried including QT += multimedia in the project file but I got
            @/usr/bin/ld: cannot find -lQtMultimedia@ so I assumed it's not available :/

            1 Reply Last reply Reply Quote 0
            • D
              dialingo last edited by

              Since mobility lives outside Qt the build system integration does not work reliably. It all depends on where Mobility is located.

              If you have good luck this works:
              @CONFIG += mobility
              MOBILITY = multimedia@

              If not do not despair. Simply add two includepathes (to QtMulitmediaKit and QtMobility) and a link path.

              1 Reply Last reply Reply Quote 0
              • A
                alexandros last edited by

                Thanks, the last one worked fine :)

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post