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. QAudioDeviceInfo::availableDevices always returning devices even when no microphone is attached.

QAudioDeviceInfo::availableDevices always returning devices even when no microphone is attached.

Scheduled Pinned Locked Moved General and Desktop
qaudiodeviceinfavailabledevice
2 Posts 2 Posters 1.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.
  • musimbateM Offline
    musimbateM Offline
    musimbate
    wrote on last edited by
    #1

    Hello ,
    I am trying to enumerate audio devices on the system (Windows7 Qt4.8 msvc2010) and the call to

    QAudioDeviceInfo::availableDevices ( QAudio::AudioInput );
    

    always returns a list with a few devices even when I have no device( attached to the PC.
    It is returning

    Microphone /Line In(Sigmatel)  and 
    default
    

    on one of my test boxes.I suspect that it is a problem with the system set up on my particular machine as I tested on a machine(Desktop) at my workplace by chance and it returns 0 when there is no microphone attached.

    This problem doesn't only affect QAudioDeviceInfo ,it also affects my openCV module to detect the attached web cams.(I know this is another topic but I suspect that the two problems are related).

    Any hints on how I can get QAudioDeviceInfo::availableDevices to return 0 when no mic is attached ?

    Thank you for your time.

    Why join the navy if you can be a pirate?-Steve Jobs

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      That's rather a Windows problem. Qt queries Windows to get the list of devices so it's your system that's returning something fishy

      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

      • Login

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