is sound Output Port - Java javax.sound.sampled

Java examples for javax.sound.sampled:Sound

Description

is sound Output Port

Demo Code


//package com.java2s;
import javax.sound.sampled.*;

public class Main {
    public static boolean isOutputPort(Mixer mixer)
    // a port on a target line is for playback controls
    {/*  ww w .  ja  v a2  s . c  om*/
        Line.Info[] tli = mixer.getTargetLineInfo(); // targets for the mixer
        for (Line.Info lineInfo : tli) {
            if (lineInfo instanceof Port.Info)
                return true;
        }
        return false;
    }
}

Related Tutorials