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

14
LINES

< > BotCompany Repo | #1009719 // saveAudioInputStreamToWAV

JavaX fragment (include)

import javax.sound.sampled.AudioFileFormat;
import javax.sound.sampled.AudioFormat;
import javax.sound.sampled.AudioInputStream;
import javax.sound.sampled.AudioSystem;
import javax.sound.sampled.UnsupportedAudioFileException;

static void saveAudioInputStreamToWAV(AudioInputStream stream, File outputFile) ctex {
  try {
    int nWrittenBytes = AudioSystem.write(stream, AudioFileFormat.Type.WAVE, mkdirsForFile(outputFile));
    printFileSaved(outputFile);
  } finally {
    stream.close();
  }
}

Author comment

Began life as a copy of #1006990

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1009719
Snippet name: saveAudioInputStreamToWAV
Eternal ID of this version: #1009719/5
Text MD5: 7afcd5b0c82cf6d1eafd0c64fcfa85bd
Author: stefan
Category: javax / audio
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-10-29 02:53:46
Source code size: 512 bytes / 14 lines
Pitched / IR pitched: No / No
Views / Downloads: 442 / 497
Version history: 4 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)