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.
  • QT-static-prgmQ Offline
    QT-static-prgmQ Offline
    QT-static-prgm
    wrote on 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
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on 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
      • QT-static-prgmQ Offline
        QT-static-prgmQ Offline
        QT-static-prgm
        wrote on 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
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on 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
          • QT-static-prgmQ Offline
            QT-static-prgmQ Offline
            QT-static-prgm
            wrote on 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??

            jsulmJ 1 Reply Last reply
            0
            • QT-static-prgmQ QT-static-prgm

              @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??

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on 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
              • QT-static-prgmQ Offline
                QT-static-prgmQ Offline
                QT-static-prgm
                wrote on 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

                jsulmJ 1 Reply Last reply
                0
                • QT-static-prgmQ QT-static-prgm

                  @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

                  jsulmJ Offline
                  jsulmJ Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on 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

                  • Login

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