Package javazoom.jl.player

Examples of javazoom.jl.player.Player


  public RecordedFFT recordFFT(String pFilename) throws Exception {
    FileInputStream fin = new FileInputStream(pFilename);
    BufferedInputStream bin = new BufferedInputStream(fin);
    FFTRecordingAudioProcessor processor = new FFTRecordingAudioProcessor();
    JWFAudioDevice audioDevice = new JWFAudioDevice(processor);
    Player player = new Player(bin, audioDevice);
    try {
      player.play();
    }
    finally {
      processor.finish();
    }
    return processor.getFFT();
View Full Code Here


    BufferedInputStream bin = new BufferedInputStream(fin);
    processor = new PlayerAudioProcessor();
    processor.setMuted(muted);
    audioDevice = new JWFAudioDevice(processor);
    audioDevice.close();
    player = new Player(bin, audioDevice);
    new Thread(new Runnable() {
      @Override
      public void run() {
        try {
          playing = true;
View Full Code Here

    super(file);
  }

  @Override
  public Player restoreAudio() throws IOException, JavaLayerException {
    return new Player(new FileInputStream(getLocalFile()));
  }
View Full Code Here

    }

    private void createPlayer(File f) throws FileNotFoundException,
            JavaLayerException {
        InputStream stream = new FileInputStream(f);
        p = new Player(stream);
    }
View Full Code Here

        public void run() {
            Synthesiser synthesiser = new Synthesiser(LANGUAGE_CODE);
            try {
                InputStream is = synthesiser.getMP3Data(message);
                //InputStreamToMP3File(is);
                Player player = new Player(is);
                player.play();

            } catch (Exception ex) {
                ex.printStackTrace();
            }
        }
View Full Code Here

        public void run() {

            Synthesiser synthesiser = new Synthesiser();

            try {
                Player player = new Player(synthesiser.getMP3Data(synthText.getText()));
                player.play();
            } catch (Exception ex) {
                ex.printStackTrace();
            }
            setSynthStatus("Waiting...");
        }
View Full Code Here

    if (System.currentTimeMillis() > lastPlayed + playInterval || !lastSong.equals(mp3.getFile()))
    {
      //System.out.println(mp3.getFile());
      try
      {
        player = new Player(mp3.openStream());
        th.start();
      }
      catch (Exception e)
      {
        e.printStackTrace();
View Full Code Here

    // status variable what player thread is doing/supposed to do
    private int playerStatus = NOTSTARTED;

    public PausablePlayer(final InputStream inputStream) throws JavaLayerException {
        this.player = new Player(inputStream);
    }
View Full Code Here

    public PausablePlayer(final InputStream inputStream) throws JavaLayerException {
        this.player = new Player(inputStream);
    }

    public PausablePlayer(final InputStream inputStream, final AudioDevice audioDevice) throws JavaLayerException {
        this.player = new Player(inputStream, audioDevice);
    }
View Full Code Here

    InputStream audioSrc = urlConn.getInputStream();
    return new BufferedInputStream(audioSrc);
  }

  public void play(InputStream sound) throws JavaLayerException {
    new Player(sound).play();
  }
View Full Code Here

TOP

Related Classes of javazoom.jl.player.Player

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.