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

14
LINES

< > BotCompany Repo | #1009720 // playAudioInputStream_safe

JavaX fragment (include)

static void playAudioInputStream_safe(AudioInputStream in, File tempWavFile) {
  S method = soundPlayMethod();
  if (eq(method, "JavaSound"))
    javaSound_playAudioInputStream(in);
  else {
    mkdirsFor(tempWavFile);
    try {
      saveAudioInputStreamToWAV(in, tempWavFile);
      playWAVAndWait(tempWavFile);
    } finally {
      tempWavFile.delete();
    }
  }
}

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: 459 / 492
Version history: 2 change(s)
Referenced in: [show references]