Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. Get device index from QMediaDevices
Forum Updated to NodeBB v4.3 + New Features

Get device index from QMediaDevices

Scheduled Pinned Locked Moved Unsolved Qt for Python
2 Posts 2 Posters 487 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.
  • D Offline
    D Offline
    DoubleFelix
    wrote on last edited by DoubleFelix
    #1

    I can get a list of input audio devices with QMediaDevices.audioInputs() and then iterating and printing description() to get the name, but I can't seem to find how to get the device index. PyAudio has a method to do this, but the device name gets cut off, but this isn't the case in PySide so I'd prefer to use it. I know from several sources that my default microphone index is 1, but if I print the index of the default device using enumerate() and isDefault(), it says the device is 0. QAudioDevice.id() also doesn't give me anything useful.

    Any ideas?

    1 Reply Last reply
    0
    • CristianMaureiraC Offline
      CristianMaureiraC Offline
      CristianMaureira
      wrote on last edited by
      #2

      Hey @DoubleFelix
      Which kind of index are you looking for? the identifier from id() looks correct to me, because it contains the information of the peripheral from my system.

      Maybe you can share the information you get with PyAudio that you are trying to find here?

      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