0

I'd like to check my systemmixers for volume in Java.

So I loop through all mixers and create a line. Is there a possibility to get an integer of the volume currently active on that line? I only seem to find adjustments to the systemvolume or linevolume but not the current actual volume.

Or should I try to record a little part of every mixer and check for volume?

Help is really bad appreciated.

Thanks!

baklap
  • 2,055
  • 5
  • 27
  • 39

1 Answers1

2

You can get get a Mixer from the AudioSystem, then get a Line from the Mixer, then get a Control you need (I guess, FloatControl.Type.VOLUME). The Control has getValue() method.

unbeli
  • 26,619
  • 5
  • 51
  • 55
  • Yeah but this way you get the value of the volume that is set in the mixer. I need the actual output of the moment. Some mixers don't do anything and some are playbacking audio. I need to check what mixer plays the audio. – baklap Jun 21 '10 at 13:19
  • ah ok, that was not clear from the question. It's good you've found the answer. – unbeli Jun 21 '10 at 13:47