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. Setting volume in Phonon
QtWS25 Last Chance

Setting volume in Phonon

Scheduled Pinned Locked Moved General and Desktop
7 Posts 4 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.
  • J Offline
    J Offline
    jech
    wrote on last edited by
    #1

    Hi,

    I created a music player in Qt/QML/Phonon which I use on my Windows UMPC. I have some problems with controlling volume.

    The first problem is that the output volume is quite low compared to other players. I found out that I can set volume above 1.0 (or 0 dB) but it has no impact. Is this normal?

    Also since Phonon/DirectShow doesn't support replaygain, I implemented it myself so that I change the volume whenever a new track starts playing. It works but the changes are to strong. I use the function setVolumeDecibel and add the calculated replaygain value to the current volume. The result is that loud tracks are quieted to much and quiet tracks are amplified to much. I also tried MPlayer as a backend before and this approach worked fine there.

    I would appreciate any advice regarding these problems with volume control. Probably the best solution would be to switch to VLC backend but I have no idea how to do this on Windows.

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mohsen
      wrote on last edited by
      #2

      did you compiled phonon library yourself? AFAIK you should compile it with your own directx version to be compatible with your windows.
      Also you can't set windows master volume by phonon. you may use native APIs (just a note).

      1 Reply Last reply
      0
      • S Offline
        S Offline
        stukdev
        wrote on last edited by
        #3

        Phonon is a deprecate module. The new module "is http://doc.qt.nokia.com/qtmobility/qtmultimediakit.html":http://doc.qt.nokia.com/qtmobility/qtmultimediakit.html

        1 Reply Last reply
        0
        • A Offline
          A Offline
          andre
          wrote on last edited by
          #4

          Not true. Phonon is not depricated.
          From the "module maturity":http://labs.qt.nokia.com/2011/05/12/qt-modules-maturity-level-the-list/ page:
          [quote]
          Phonon copy inside Qt
          State: Done
          Reasoning: a separate release of Phonon, with its own version numbers, is available and can be used instead; the copy inside Qt will not be updated further.
          [/quote]

          That is not the same as "depricated", but it fits in the more modular approach that Qt is taking: use the external Phonon module instead.

          1 Reply Last reply
          0
          • S Offline
            S Offline
            stukdev
            wrote on last edited by
            #5

            bq. Overall module state: Done inside Qt, Maintained outside of Qt
            Reasoning: QtMultimediaKit recommended instead; development of Phonon continues and is maintained outside of Qt, by the KDE community

            So for new project is recommended QtMultimediaKit...no?

            1 Reply Last reply
            0
            • A Offline
              A Offline
              andre
              wrote on last edited by
              #6

              If you want to stick with pure Qt only modules: yes. But nothing is stopping you from using the external Phonon anyway.

              1 Reply Last reply
              0
              • J Offline
                J Offline
                jech
                wrote on last edited by
                #7

                mohsen> I haven't compiled it myself. I use the program many different computers and it works the same on all of them. I don't want to control master volume, I want to control the volume internally. So this works OK for me, just the change in dB seems to be bigger then I intent.

                Regarding QtMultimediaKit, I plan to switch to it. But the last time I tried it, it didn't work on Windows. There was no binary available and when I tried to compile it myself, it always failed (with both MinGW and MSVC). I'll check it again but I'm afraid there won't be any change before Qt 4.8.

                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