Package javazoom.jl.player

Examples of javazoom.jl.player.Player


    private static JXAException _getALNoRsrcEx(String fileRsrc) {
        return new JXAException(JXAException.LEVEL.APP, "No such buffer has been loaded before, cannot create openAL source : " + fileRsrc);
    }

    private Player newJLayer(String filename) throws FileNotFoundException, JavaLayerException {
        return new Player(new BufferedInputStream(isInnerResourceModeEnabled() ? getClass().getResourceAsStream(filename) : new FileInputStream(filename)));
    }
View Full Code Here


                    do
                    {
                        try {
                            FileInputStream fis     = new FileInputStream(filename);
                            BufferedInputStream bis = new BufferedInputStream(fis);
                            player = new Player(bis);
                            player.play();

                            if (player != null)
                                player.close();
                            player = null;
View Full Code Here

  @Override
  public void actionPerformed(ActionEvent e) {
    new Thread() {
      public void run() {
        try {
          Player p = new Player(
              ChampionDetailedController.this.champion
                  .getSelectionAudio());
          p.play();
        } catch (Exception e) {
          e.printStackTrace();
        }
      }
    }.start();
View Full Code Here

        if (isMp3)
        {
            try
            {
                FileInputStream fis = new FileInputStream(soundFile);
                mp3Player = new Player(fis);
            }
            catch (Exception ex)
            {
                ex.printStackTrace();
                System.err.println("Failed to open sound file.");
View Full Code Here

      @Override
      public void run() {
        ByteArrayInputStream bais = new ByteArrayInputStream(clickBytes);
        try {
          new Player(new BufferedInputStream(bais)).play();
        } catch (JavaLayerException e) {
          throw new RuntimeException(e);
        }
      }
    });
View Full Code Here

    private void grajDzwiek(String sNazwa) {
      try {
        String sRes = "res/"+sNazwa+".mp3";
        InputStream is = PbnTools.class.getResourceAsStream(sRes);
        if (is != null) {
          Player p = new Player(is);
          p.play();
          }
        else {
          System.err.println("Nie uda�o si� za�adowa� zasobu: "+sRes);
          }
        }
View Full Code Here

        try {
            if (fis == null) {
                fis     = new FileInputStream(filename);
            }
            BufferedInputStream bis = new BufferedInputStream(fis);
            player = new Player(bis);
        }
        catch (Exception e) {
            System.out.println("Problem playing file " + filename);
            System.out.println(e);
        }
View Full Code Here

  public void playStreaming(String path) {
    if (isPlaying)
      return;
    try {
      AudioDevice dev = getAudioDevice();
      player = new Player(getURLInputStream(path), dev);
      isPlaying = true;
      player.play();
      in.close();
      LOGGER.debug("------------------------------------------------- FIM DO PLAY");
      isPlaying = false;
View Full Code Here

    // play the MP3 file to the sound card
    public void play() {
        try {
            FileInputStream fis     = new FileInputStream(filename);
            BufferedInputStream bis = new BufferedInputStream(fis);
            player = new Player(bis);
        }
        catch (Exception e) {
            System.out.println("Problem playing file " + filename);
            System.out.println(e);
        }
View Full Code Here

        @Override
        public void run() {
          try {

            playerSpeak = new Player(
                synthesiser.getMP3Data(spokenText));
            playerSpeak.play();

          } catch (JavaLayerException e) {
            e.printStackTrace();
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.