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. Question about Vista/7 volume controller.
Qt 6.11 is out! See what's new in the release blog

Question about Vista/7 volume controller.

Scheduled Pinned Locked Moved General and Desktop
13 Posts 6 Posters 6.4k Views 1 Watching
  • 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 Offline
    S Offline
    snowpong
    wrote on last edited by
    #2

    I don't understand your question. You're playing/streaming audio and you want to do it through "WASAPI":http://msdn.microsoft.com/en-us/library/dd370851(VS.85).aspx on Windows 7 - but since that doesn't exist for Windows XP you don't know what to do?

    Why don't you tell us what you're trying to achieve (not which API you want to use) and we can tell you if it's possible in Qt? :)

    1 Reply Last reply
    0
    • A Offline
      A Offline
      Aeromiss
      wrote on last edited by
      #3

      Oh sorry... I want create application "volume controller for vista/7" windows.h give possibility for windows XP.... I read about Vista/7 developers use wasapi - http://msdn.microsoft.com/en-us/library/dd371455(VS.85).aspx, but What about Qt?

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

        Hello,
        It's so simple to make using Qt Phonon library. Search for "volume" in your Qt creator help. You'll find articles fit to your need.

        1 Reply Last reply
        0
        • J Offline
          J Offline
          jdbastardy
          wrote on last edited by
          #5

          I suggest you to use Phonon as moshen said. On Windows it uses DirectX to handle audio. :-)

          http://mattias-cibien.co.cc

          • Prepare for Qt consequences.
          1 Reply Last reply
          0
          • A Offline
            A Offline
            Aeromiss
            wrote on last edited by
            #6

            Phonon give possibility to control application's volume(music player) but what about system volume?

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

              Not only for application's volume. It also handles audio device

              1 Reply Last reply
              0
              • A Offline
                A Offline
                Aeromiss
                wrote on last edited by
                #8

                Phonon::AudioOutput *ao=new Phonon::AudioOutput;
                ao->setVolume(50);
                ao->setVolume(00);
                ao->setVolume(100);
                ao->setMuted(true);
                ao->setVolumeDecibel(0);
                attempts not give me results....=(
                Can you give me your example..... please??

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

                  Sorry dear, I did mistake. I checked for your problem but unfortunately phonon does not affects master volume. I'll find a new way for your problem. I promiss

                  1 Reply Last reply
                  0
                  • A Offline
                    A Offline
                    Aeromiss
                    wrote on last edited by
                    #10

                    Thanks, I hope=)
                    This problem still unsolved....

                    1 Reply Last reply
                    0
                    • D Offline
                      D Offline
                      DenisKormalev
                      wrote on last edited by
                      #11

                      I think that you should use system API. As I understood you need it only for one platform, so it will be the best way for you.

                      1 Reply Last reply
                      0
                      • A Offline
                        A Offline
                        Aeromiss
                        wrote on last edited by
                        #12

                        Yes=) but system(winapi) (exactly audio.... programs on it create program's channel on mixer and control it, not master volume channel )dont work on Vista/7 only for Windows XP.... because Microsoft change audio driver.... now Vista/7 use wasapi.... IDE for wasapi uses only Visual studio 2010 maybe 2007... but I want Qt.... What can I'll do guys?

                        1 Reply Last reply
                        0
                        • I Offline
                          I Offline
                          ixSci
                          wrote on last edited by
                          #13

                          Perhaps Phonon should change system volume but it doesn't because of the behaviour changing in the new MS OSs. I actually don't understand from the Qt documentation what volume Phonon is supposed to change. But if there is no direct note about application-scope volume you can think about system wide volume. That is my logic. Try to ask Trolls about their point of view about the system volume. Maybe you should file a bug and wait for an answer. Nevertheless it is a bad practice to touch system wide properties such as sound volume from the custom application, I think.
                          If you need the issue solved quick you can write your own wrapper and implements system specific volume control as Qt-like D-pointers or any other design practice. "There":http://blogs.msdn.com/b/larryosterman/archive/2007/03/06/how-do-i-change-the-master-volume-in-windows-vista.aspx is an article about volume changing in the Vista. It seems quite simple to me.

                          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