All pastes #15600 Raw Edit

Unnamed

public java v1 · immutable
#15600 ·published 2005-06-22 22:09 UTC
rendered paste body
import javax.sound.sampled.AudioSystem;import javax.sound.sampled.Control;import javax.sound.sampled.Line;import javax.sound.sampled.Mixer;public class AudioInfo{    public void show()    {        Mixer mixer;        Mixer.Info[] mixerInfos;        mixerInfos = AudioSystem.getMixerInfo();        for (int i = 0; i < mixerInfos.length; i++)        {            Mixer.Info mixerInfo = mixerInfos[i];            mixer = AudioSystem.getMixer(mixerInfo);            System.out.println(mixerInfo);            Line[] targetLines = mixer.getTargetLines();            for (int j = 0; j < targetLines.length; j++)            {               System.out.println("  Line[" + j + "]: " + targetLines[j]);            }                        Control[] controls = mixer.getControls();            for (int j = 0; j < controls.length; j++)            {               System.out.println("  Control[" + j + "]: " + controls[j]);            }        }    }    public static void main(String[] args)    {        new AudioInfo().show();    }}