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

17
LINES

< > BotCompany Repo | #1003614 // playMP3 - TODO: check with playMp3

JavaX fragment (include)

1  
lib 1001094 // JavaLayer 1.0.1
2  
3  
import javazoom.jl.player.*;
4  
5  
static Player playMP3(File mp3) ctex {
6  
  ret playMP3(new FileInputStream(mp3));
7  
}
8  
9  
static Player playMP3(InputStream in) ctex {
10  
  print("Playing audio...");
11  
  final Player player = new Player(in);
12  
  thread "Playing MP3" {
13  
    player.play();
14  
    player.close();
15  
  }
16  
  ret player;
17  
}

Author comment

Began life as a copy of #1003613

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1003614
Snippet name: playMP3 - TODO: check with playMp3
Eternal ID of this version: #1003614/4
Text MD5: 40c7ba1bd016684b2eb95bd62523d982
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-08-19 01:30:41
Source code size: 358 bytes / 17 lines
Pitched / IR pitched: No / No
Views / Downloads: 564 / 561
Version history: 3 change(s)
Referenced in: [show references]