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

8
LINES

< > BotCompany Repo | #1025058 // playAudioFile

JavaX fragment (include)

1  
svoid playAudioFile(File f) {
2  
  if (fileHasExtension(f, "mp3") || isMP3FileByContent(f))
3  
    playMp3(f);
4  
  else if (fileHasExtension(f, "wav") || isRIFFFileByContent(f))
5  
    playWAV(f);
6  
  else
7  
    fail("Can't play audio file: " + f2s(f));
8  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1025058
Snippet name: playAudioFile
Eternal ID of this version: #1025058/3
Text MD5: 803fe53457d4a83c3c1f660cc4854342
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-01-22 14:41:16
Source code size: 247 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 286 / 298
Version history: 2 change(s)
Referenced in: [show references]