get Audio Mixers - Java javax.sound.sampled

Java examples for javax.sound.sampled:Audio

Description

get Audio Mixers

Demo Code


//package com.java2s;

import java.util.ArrayList;
import java.util.List;
import javax.sound.sampled.AudioSystem;

import javax.sound.sampled.Mixer;
import javax.sound.sampled.Mixer.Info;

public class Main {


    public static List<Mixer> getMixers() {
        Info[] infos = AudioSystem.getMixerInfo();
        List<Mixer> mixers = new ArrayList<Mixer>(infos.length);
        for (Info info : infos) {
            Mixer mixer = AudioSystem.getMixer(info);
            mixers.add(mixer);/*w ww.java2 s.c om*/
        }
        return mixers;
    }
}

Related Tutorials