get sound Mixer Name - Java javax.sound.sampled

Java examples for javax.sound.sampled:Sound

Description

get sound Mixer Name

Demo Code


//package com.java2s;

import javax.sound.sampled.AudioSystem;

import javax.sound.sampled.Mixer;

public class Main {
    public static String getMixerName(int i) {
        Mixer.Info a[] = AudioSystem.getMixerInfo();
        if (i < a.length) {
            return a[i].getName();
        } else {/*from   w  w w.  ja  va  2 s.co m*/
            return null;
        }
    }
}

Related Tutorials