Examples of open()


Examples of javax.media.Renderer.open()

            try {
                // Set the format and open the device
                AudioFormat af = new AudioFormat(AudioFormat.LINEAR, 44100, 16,
                        2);
                rend.setInputFormat(af);
                rend.open();
                Format[] inputFormats = rend.getSupportedInputFormats();
                // Register the device
                PlugInManager.addPlugIn(dar, inputFormats, new Format[0],
                        plType);
                // Move it to the top of the list
View Full Code Here

Examples of javax.sound.midi.MidiDevice.open()

     */
    public void openMidiDevice(final int deviceHandle)
        throws MidiUnavailableException
    {
        final MidiDevice device = resolveDeviceHandle(deviceHandle);
        device.open();
    }

    /**
     * Checks if the specified MIDI device is open.
     *
 
View Full Code Here

Examples of javax.sound.midi.Sequencer.open()

   */
  public static Object playSound(final String fileName) {
    try {
      if (fileName.toLowerCase().endsWith(".mid")) {
        final Sequencer sequencer = MidiSystem.getSequencer();
        sequencer.open();

        final InputStream midiFile = new FileInputStream(fileName);
        sequencer.setSequence(MidiSystem.getSequence(midiFile));

        sequencer.start();
View Full Code Here

Examples of javax.sound.midi.Synthesizer.open()

        );
        timerThread.start();
       
        try {
            Synthesizer synthesizer = MidiSystem.getSynthesizer();
            synthesizer.open();
            channels = synthesizer.getChannels();
        } catch (MidiUnavailableException e)
        {
            throw new JFugueException(JFugueException.ERROR_PLAYING_MUSIC);
        }
View Full Code Here

Examples of javax.sound.sampled.Clip.open()

              System.out.println("testplaying " + name + " "
                  + playStream.getFormat());

              final Clip line = (Clip) defaultMixer.getLine(info);
              line.open(playStream);
              line.loop(2);
              final TestLineListener testListener = new TestLineListener();
              line.addLineListener(testListener);
              while (testListener.active) {
                Thread.yield();
View Full Code Here

Examples of javax.sound.sampled.Mixer.open()

    Mixer.Info[] mixerInfos = AudioSystem.getMixerInfo();

    for (int i = 0; i < mixerInfos.length; i++) {
      Mixer mixer = AudioSystem.getMixer(mixerInfos[i]);
      try {
        mixer.open();
      } catch (LineUnavailableException e) {
        e.printStackTrace();
      }
      Line.Info[] targetLines = mixer.getTargetLineInfo();
      for (Line.Info info : targetLines) {
View Full Code Here

Examples of javax.sound.sampled.Port.open()

                        boolean openPortNeeded = !port.isOpen();
                        try
                        {
                            if (openPortNeeded)
                            {
                                port.open();
                            }
                            if (port.isControlSupported(FloatControl.Type.VOLUME))
                            {
                                FloatControl volumeControl = (FloatControl) port.getControl(FloatControl.Type.VOLUME);
                                float min = volumeControl.getMinimum();
View Full Code Here

Examples of javax.sound.sampled.SourceDataLine.open()

        final DataLine.Info info = new DataLine.Info(SourceDataLine.class, format);

        if(AudioSystem.isLineSupported(info)) {
          final SourceDataLine line = (SourceDataLine) AudioSystem.getLine(info);

          line.open(format);
          line.start();

          new Thread("Reminder audio playing") {
            private boolean stopped;
            @Override
View Full Code Here

Examples of javax.sound.sampled.TargetDataLine.open()

    DataLine.Info  info = new DataLine.Info(TargetDataLine.class, audioFormat);
    TargetDataLine  targetDataLine = null;
    try
    {
      targetDataLine = (TargetDataLine) AudioSystem.getLine(info);
      targetDataLine.open(audioFormat);
    }
    catch (LineUnavailableException e)
    {
      out("unable to get a recording line");
      e.printStackTrace();
View Full Code Here

Examples of javax.usb.UsbPipe.open()

     
      UsbEndpoint endpoint = usbInterface.getUsbEndpoint(NiaDevice2.ENDPOINT_IN);
      UsbPipe usbPipe = endpoint.getUsbPipe();
     
      try {
        usbPipe.open();
      } catch (UsbException e) {
        e.printStackTrace();
      }
     
      boolean insync = false;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.