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"...