Ejemplo n.º 1
0
 private Line.Info[] getPortInfo(Mixer mixer) {
   Line.Info[] infos;
   List<Line.Info> portInfoList = new ArrayList<>();
   infos = mixer.getSourceLineInfo();
   for (Line.Info info : infos) {
     if (info instanceof Port.Info || info instanceof DataLine.Info) {
       portInfoList.add(info);
     }
   }
   infos = mixer.getTargetLineInfo();
   for (Line.Info info1 : infos) {
     if (info1 instanceof Port.Info || info1 instanceof DataLine.Info) {
       portInfoList.add(info1);
     }
   }
   return portInfoList.toArray(EMPTY_PORT_INFO_ARRAY);
 }
Ejemplo n.º 2
0
 private boolean arePortsSupported(Mixer mixer) {
   Line.Info[] infos;
   infos = mixer.getSourceLineInfo();
   for (Line.Info info : infos) {
     if (info instanceof Port.Info) {
       return true;
     } else if (info instanceof DataLine.Info) {
       return true;
     }
   }
   infos = mixer.getTargetLineInfo();
   for (Line.Info info : infos) {
     if (info instanceof Port.Info) {
       return true;
     } else if (info instanceof DataLine.Info) {
       return true;
     }
   }
   return false;
 }