1 | import javax.sound.sampled.AudioFileFormat; |
2 | import javax.sound.sampled.AudioFormat; |
3 | import javax.sound.sampled.AudioInputStream; |
4 | import javax.sound.sampled.AudioSystem; |
5 | import javax.sound.sampled.UnsupportedAudioFileException; |
6 | |
7 | static void saveAudioInputStreamToWAV(AudioInputStream stream, File outputFile) ctex {
|
8 | try {
|
9 | int nWrittenBytes = AudioSystem.write(stream, AudioFileFormat.Type.WAVE, mkdirsForFile(outputFile)); |
10 | printFileSaved(outputFile); |
11 | } finally {
|
12 | stream.close(); |
13 | } |
14 | } |
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: | 653 / 716 |
| Version history: | 4 change(s) |
| Referenced in: | [show references] |