2

I am enumerating mixers with AudioSystem.getMixerInfo(). I found that returning mixers are sometimes duplicated. Investigation showed, that 4 mixers returned are of class DirectAudioDevice and 6 mixers are of class PortMixer. Both classes are undocumented classes of Java API.

I wish to present a user with only one copy of each microphone, while in my case they returned both as DirectAudioDevice and PortMixer.

So, the question is: what is the difference between these two classes and how to distinguish them at runtime?

UPDATE

I found that DirectAudioDevice version of each microphone returns nothing on getLine(Port.Info.MICROPHONE) while return one line on getTargetLineInfo(), while PortMixer versions of microphones returns something on getLine(Port.Info.MICROPHONE), while return both target and source lines, while target one is entitled "loudness"...

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
Dims
  • 47,675
  • 117
  • 331
  • 600
  • See the **[Media](http://stackoverflow.com/a/7616206/418556)** based source in "List of useful environment settings in Java" for code to help you trawl through the JavaSound abilities. – Andrew Thompson Mar 23 '12 at 21:02

0 Answers0