Package javax.sound.sampled

Examples of javax.sound.sampled.Mixer$Info


                D.addLog("There are no mixers that support Port lines. Sound volume can not be set!",0);
            }
            Iterator<Mixer> iterator = portMixers.iterator();
            while (iterator.hasNext())
            {
                Mixer mixer = iterator.next();
                String strMixerName = mixer.getMixerInfo().getName();
//System.out.println("Mixer: " + strMixerName);
    Port.Info[] infosToCheck = getPortInfo(mixer);
    for (int i = 0; i < infosToCheck.length; i++)
    {
                    Port port = null;
                    try
                    {
                            port = (Port) mixer.getLine(infosToCheck[i]);
                            port.open();
                    }
                    catch (LineUnavailableException e)
                    {
                         //   e.printStackTrace();
View Full Code Here


    Mixer.Info[] mixerInfos = AudioSystem.getMixerInfo();
    for (Mixer.Info mixerInfo:mixerInfos)
                {
                        System.out.println("\n"+mixerInfo);
      Mixer m = AudioSystem.getMixer(mixerInfo);
                        Control[] c1 =m.getControls();
      Line.Info[] lineInfos = m.getSourceLineInfo();
      for (Line.Info li:lineInfos)
                        {
                           

                            Line line;
                            try
                            {
                                line = m.getLine(li);
                                Control[] c = line.getControls();
                                FloatControl volume= (FloatControl) line.getControl(FloatControl.Type.MASTER_GAIN);                                
                                float max = volume.getMaximum();
                                float min = volume.getMinimum();
                                float dist = max-min;
View Full Code Here

//Mixer.Info mixerInfo = AudioSystem.getMixer(null).getMixerInfo();
    Mixer.Info[] mixerInfos = AudioSystem.getMixerInfo();
    for (Mixer.Info mixerInfo:mixerInfos)
                {
                        System.out.println("\n"+mixerInfo);
      Mixer m = AudioSystem.getMixer(mixerInfo);
      Line.Info[] lineInfos = m.getSourceLineInfo();
      for (Line.Info li:lineInfos) {
        if (li instanceof Port.Info){
          Port.Info pi=(Port.Info)li;
          Line portLine=m.getLine(pi);
          printPortControls(portLine);
        }
      }
      lineInfos = m.getTargetLineInfo();
      for (Line.Info li:lineInfos) {
        if (li instanceof Port.Info){
          if (li instanceof Port.Info){
            Port.Info pi=(Port.Info)li;
            Line portLine=m.getLine(pi);
            printPortControls(portLine);
          }
        }
      }
    }
View Full Code Here

            try
            {
                Mixer.Info[] mixers = AudioSystem.getMixerInfo();
                for (Mixer.Info info : mixers)
                {
                    Mixer mixer = AudioSystem.getMixer(info);
                    if (mixer.isLineSupported(Port.Info.SPEAKER))
                    {
                        Port port = (Port) mixer.getLine(Port.Info.SPEAKER);
                        boolean openPortNeeded = !port.isOpen();
                        try
                        {
                            if (openPortNeeded)
                            {
View Full Code Here

                D.addLog("There are no mixers that support Port lines. Sound volume can not be set!",0);
            }
            Iterator<Mixer> iterator = portMixers.iterator();
            while (iterator.hasNext())
            {
                Mixer mixer = iterator.next();
                String strMixerName = mixer.getMixerInfo().getName();
//System.out.println("Mixer: " + strMixerName);
    Port.Info[] infosToCheck = getPortInfo(mixer);
    for (int i = 0; i < infosToCheck.length; i++)
    {
                    Port port = null;
                    try
                    {
                            port = (Port) mixer.getLine(infosToCheck[i]);
                            port.open();
                    }
                    catch (LineUnavailableException e)
                    {
                         //   e.printStackTrace();
View Full Code Here

    List<Mixer>    supportingMixers = new ArrayList<Mixer>();
    Mixer.Info[]  aMixerInfos = AudioSystem.getMixerInfo();
    Line.Info  portInfo = new Line.Info(Port.class);
    for (int i = 0; i < aMixerInfos.length; i++)
    {
      Mixer  mixer = AudioSystem.getMixer(aMixerInfos[i]);
      boolean  bSupportsPorts = arePortsSupported(mixer);
      if (bSupportsPorts)
      {
        supportingMixers.add(mixer);
      }
View Full Code Here

    Mixer.Info[] mixerInfos = AudioSystem.getMixerInfo();
    for (Mixer.Info mixerInfo:mixerInfos)
                {
                        System.out.println("\n"+mixerInfo);
      Mixer m = AudioSystem.getMixer(mixerInfo);
                        Control[] c1 =m.getControls();
      Line.Info[] lineInfos = m.getSourceLineInfo();
      for (Line.Info li:lineInfos)
                        {
                           

                            Line line;
                            try
                            {
                                line = m.getLine(li);
                                Control[] c = line.getControls();
                                FloatControl volume= (FloatControl) line.getControl(FloatControl.Type.MASTER_GAIN);                                
                                float max = volume.getMaximum();
                                float min = volume.getMinimum();
                                float dist = max-min;
View Full Code Here

        Info[] mixes = AudioSystem.getMixerInfo();
        for (int i = 0; i < mixes.length; i++) {
            Mixer.Info mixi = mixes[i];
            String mixup = mixi.getName().trim();
            Log.debug("mixer input " + mixup);
            Mixer mx = AudioSystem.getMixer(mixi);
            Line.Info[] infos = mx.getTargetLineInfo();
            if ((infos != null) && (infos.length > 0) &&
                    (infos[0] instanceof DataLine.Info)) {
                vres.add(mixup);
                if (mixup.equals(preferred)) {
                    foundPreferred = true;
View Full Code Here

        boolean foundPreferred = false;
        Info[] mixes = AudioSystem.getMixerInfo();
        for (int i = 0; i < mixes.length; i++) {
            Mixer.Info mixi = mixes[i];
            String mixup = mixi.getName().trim();
            Mixer mx = AudioSystem.getMixer(mixi);
            Line.Info[] infos = mx.getSourceLineInfo();
            if ((infos != null) && (infos.length > 0) &&
                    (infos[0] instanceof DataLine.Info)) {
                vres.add(mixup);
                if (mixup.equals(preferred)) {
                    foundPreferred = true;
View Full Code Here

   
    for (int i = 0; i < mixerInfoPool.length; i++) {
      System.out.println(mixerInfoPool[i]);
    }
   
    final Mixer mixer = AudioSystem.getMixer(mixerInfoPool[6]);
    try {
      if (mixer.isLineSupported(Port.Info.LINE_IN)) {
        lineIn = (Port) mixer.getLine(Port.Info.LINE_IN);
        lineIn.open();
      } else if (mixer.isLineSupported(Port.Info.MICROPHONE)) {
        lineIn = (Port) mixer.getLine(Port.Info.MICROPHONE);
        lineIn.open();
      } else {
        System.out.println("Unable to get Input Port");
        return;
      }
View Full Code Here

TOP

Related Classes of javax.sound.sampled.Mixer$Info

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.