get sound Mixer - Java javax.sound.sampled

Java examples for javax.sound.sampled:Sound

Description

get sound Mixer

Demo Code


//package com.java2s;

import javax.sound.sampled.AudioSystem;

import javax.sound.sampled.Mixer;

public class Main {
    private static Mixer.Info getMixer(String name) {
        Mixer.Info a[] = AudioSystem.getMixerInfo();
        for (int i = 0; i < a.length; i++) {
            if (a[i].getName().equals(name)) {
                return a[i];
            }/*  w w w. j a v a  2 s. c  o  m*/
        }
        return null;
    }
}

Related Tutorials