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

17
LINES

< > BotCompany Repo | #1001267 // playMp3 (desktop)

JavaX fragment (include) [tags: use-pretranspiled]

Transpiled version (5587L) is out of date.

swappable svoid playMp3(File mp3, O... _) ctex {
  if (!isJavaSoundOnly() && isLinux() && onPATH("play")) {
    //print("Playing MP3 (`play`)...");
    Number gain = cast optPar gain(_);
    S output = backtick(print("> ", "play --magic " + (gain == null ? "" : "-v " + toDouble(gain) + " ")
      + bashQuote(mp3)));
    if (cic(output, "no handler for file extension"))
      print(output);
    else
      ret;
  }
  playMp3_javaSound_basicPlayer(mp3, _);
}

svoid playMp3(S snippetID) {
  playMp3(loadLibrary(snippetID));
}

Author comment

Began life as a copy of #1001095

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1001267
Snippet name: playMp3 (desktop)
Eternal ID of this version: #1001267/17
Text MD5: 99d9b4a46a3f1bfbc8accdfff0779e89
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-07-21 20:51:28
Source code size: 542 bytes / 17 lines
Pitched / IR pitched: No / No
Views / Downloads: 743 / 1063
Version history: 16 change(s)
Referenced in: #1002427 - Accellerating 629 (SPIKE)
#1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1014503 - playMp3_javaSound (desktop)
#1014804 - playMp3WithSoftVolume - returns true when successful
#3000382 - Answer for ferdie (>> t = 1, f = 0)
#3000383 - Answer for funkoverflow (>> t=1, f=0 okay)