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. Control default sound device
Forum Updated to NodeBB v4.3 + New Features

Control default sound device

Scheduled Pinned Locked Moved Unsolved General and Desktop
8 Posts 3 Posters 1.9k 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.
  • Q Offline
    Q Offline
    QT-static-prgm
    wrote on 10 Apr 2017, 10:13 last edited by
    #1

    Hey,

    i wonder if there is any qt that allows you to get the current default sound device and to change it.

    I searched for that but i only found some crazy c++ workarounds. Those start the window and navigate through the window by sending inputs to it.

    Since Qt is a really powerful library i hope there is a class that gives me all sound devices and can switch the default one.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 10 Apr 2017, 10:28 last edited by
      #2

      Hi,

      To get the default device: QAudioDeviceInfo.
      To change it at OS level is outside of Qt's scope.

      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
      1
      • Q Offline
        Q Offline
        QT-static-prgm
        wrote on 10 Apr 2017, 10:30 last edited by
        #3

        yeah i found that. But i want to change the default device (speakers/headset)

        I hoped i can get the current default device that way. But defaultOutputDevice().deviceName() returns: "Default output device" instead of it's real name...

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 10 Apr 2017, 20:30 last edited by
          #4

          That's the name Qt receives from the OS.

          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
          • Q Offline
            Q Offline
            QT-static-prgm
            wrote on 11 Apr 2017, 06:45 last edited by
            #5

            @SGaist then the os is stupid ;)

            Any ideas if there is a windows api that allows you to change the default device??

            And (other "problem") is it possible to record from Outputdevice1 and send everything to micro 1??

            J 1 Reply Last reply 11 Apr 2017, 06:48
            0
            • Q QT-static-prgm
              11 Apr 2017, 06:45

              @SGaist then the os is stupid ;)

              Any ideas if there is a windows api that allows you to change the default device??

              And (other "problem") is it possible to record from Outputdevice1 and send everything to micro 1??

              J Offline
              J Offline
              jsulm
              Lifetime Qt Champion
              wrote on 11 Apr 2017, 06:48 last edited by
              #6

              @QT-static-prgm You want record from an output device and send it to an input device?

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

              1 Reply Last reply
              1
              • Q Offline
                Q Offline
                QT-static-prgm
                wrote on 11 Apr 2017, 07:48 last edited by
                #7

                @jsulm yeah :D Teamspeak: Headset, music: speaker. And if i start the program the music should be passed to the teamspeak micro. There are a few plugins but those need music files and if you are streaming the music, you don't have the mp3 files

                J 1 Reply Last reply 11 Apr 2017, 09:51
                0
                • Q QT-static-prgm
                  11 Apr 2017, 07:48

                  @jsulm yeah :D Teamspeak: Headset, music: speaker. And if i start the program the music should be passed to the teamspeak micro. There are a few plugins but those need music files and if you are streaming the music, you don't have the mp3 files

                  J Offline
                  J Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on 11 Apr 2017, 09:51 last edited by
                  #8

                  @QT-static-prgm I don't think you can pass anything to a microphone as it is an input device, not output.

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

                  1 Reply Last reply
                  0

                  1/8

                  10 Apr 2017, 10:13

                  • Login

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