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

14
LINES

< > BotCompany Repo | #1009720 // playAudioInputStream_safe

JavaX fragment (include)

1  
static void playAudioInputStream_safe(AudioInputStream in, File tempWavFile) {
2  
  S method = soundPlayMethod();
3  
  if (eq(method, "JavaSound"))
4  
    javaSound_playAudioInputStream(in);
5  
  else {
6  
    mkdirsFor(tempWavFile);
7  
    try {
8  
      saveAudioInputStreamToWAV(in, tempWavFile);
9  
      playWAVAndWait(tempWavFile);
10  
    } finally {
11  
      tempWavFile.delete();
12  
    }
13  
  }
14  
}

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: #1009720
Snippet name: playAudioInputStream_safe
Eternal ID of this version: #1009720/3
Text MD5: 84f5e8337625561b857d5e3c0805976b
Author: stefan
Category: javax / sound
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-08-15 02:09:14
Source code size: 382 bytes / 14 lines
Pitched / IR pitched: No / No
Views / Downloads: 543 / 579
Version history: 2 change(s)
Referenced in: [show references]