Examples of AudioDevice


Examples of javazoom.jl.player.AudioDevice

    /** Implements callable interface: Loads the AudioDevice and returns it*/
    public AudioDevice call(){
      try{
        // Get AudioDevice from Registry
        FactoryRegistry factoryregistry = FactoryRegistry.systemRegistry();
        AudioDevice audio = factoryregistry.createAudioDevice();
        return audio;
      }
      catch(Exception ee){
        System.err.println("Could not load audio driver");
        ee.printStackTrace();
View Full Code Here

Examples of net.javazoom.jl.player.AudioDevice

    }

//    if (!ret)
    {
      // last frame, ensure all data flushed to the audio device.
      AudioDevice out = audio;
      if (out != null)
      {
//        System.out.println(audio.getPosition());
        out.flush();
//        System.out.println(audio.getPosition());
        synchronized (this)
        {
          complete = (!closed);
          close();
View Full Code Here

Examples of net.javazoom.jl.player.AudioDevice

   * Cloases this player. Any audio currently playing is stopped
   * immediately.
   */
  public synchronized void close()
  {
    AudioDevice out = audio;
    if (out != null)
    {
      closed = true;
      audio = null;
      // this may fail, so ensure object state is set up before
      // calling this method.
      out.close();
      lastPosition = out.getPosition();
      try
      {
        bitstream.close();
      }
      catch (BitstreamException ex)
View Full Code Here

Examples of net.javazoom.jl.player.AudioDevice

   */
  protected boolean decodeFrame() throws JavaLayerException
  {
    try
    {
      AudioDevice out = audio;
      if (out == null) return false;

      Header h = bitstream.readFrame();
      if (h == null) return false;

      // sample buffer set when decoder constructed
      SampleBuffer output = (SampleBuffer) decoder.decodeFrame(h, bitstream);

      synchronized (this)
      {
        out = audio;
        if(out != null)
        {
          out.write(output.getBuffer(), 0, output.getBufferLength());
        }
      }

      bitstream.closeFrame();
    }
View Full Code Here

Examples of net.sphene.goim.rcp.media.mp3.AudioDevice

  }

  public void play() {
    try {
      BufferedInputStream bin = new BufferedInputStream(is);
      AudioDevice dev = getAudioDevice();
      player = new Player(bin, dev);
      player.play();
    } catch (Exception e) {
      e.printStackTrace();
    }
View Full Code Here

Examples of uk.co.caprica.vlcj.player.AudioDevice

    private static void dump(int i, AudioOutput audioOutput) {
        List<AudioDevice> audioDevices = audioOutput.getDevices();
        System.out.printf(FORMAT_PATTERN, String.valueOf(i + 1), audioOutput.getName(), audioOutput.getDescription(), "(" + audioDevices.size() + ")", "");
        for(int j = 0; j < audioDevices.size(); j ++ ) {
            AudioDevice audioDevice = audioOutput.getDevices().get(j);
            System.out.printf(FORMAT_PATTERN, "", "", "", audioDevice.getDeviceId(), formatLongName(audioDevice.getLongName()));
        }
    }
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.