Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

14
LINES

< > BotCompany Repo | #1014503 // playMp3_javaSound (desktop)

JavaX fragment (include)

lib 1001094 // JavaLayer 1.0.1

import javazoom.jl.player.*;

static void playMp3_javaSound(File mp3) ctex {
  FileInputStream fis = new FileInputStream(mp3);
  Player player = new Player(fis);
  player.play();
  repeat with ms sleep 10 {
    if (player.isComplete()) break;
  }
  player.close();
  fis.close();
}

Author comment

Began life as a copy of #1001267

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1014503
Snippet name: playMp3_javaSound (desktop)
Eternal ID of this version: #1014503/1
Text MD5: 46c60792d7c751ec7228f25362b54306
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-04-22 22:15:13
Source code size: 326 bytes / 14 lines
Pitched / IR pitched: No / No
Views / Downloads: 367 / 401
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1023249 - playMp3_javaSound_basicPlayer (supports gain)