is sound Input Port - Java javax.sound.sampled

Java examples for javax.sound.sampled:Sound

Description

is sound Input Port

Demo Code


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

public class Main {
    public static boolean isInputPort(Mixer mixer)
    // a port on a source line is for recording controls
    {//  w w w.  j a  va2s  .  c  o  m
        Line.Info[] sli = mixer.getSourceLineInfo(); // sources for the mixer
        for (Line.Info lineInfo : sli) {
            if (lineInfo instanceof Port.Info)
                return true;
        }
        return false;
    }
}

Related Tutorials