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 audioCopyToWAV(File inputFile, File outputFile, AudioFormat outputFormat) ctex { |
8 | AudioInputStream sourceStream = AudioSystem.getAudioInputStream(inputFile); |
9 | AudioInputStream stream = AudioSystem.getAudioInputStream(outputFormat, sourceStream); |
10 | int nWrittenBytes = AudioSystem.write(stream, AudioFileFormat.Type.WAVE, outputFile); |
11 | sourceStream.close(); |
12 | stream.close(); |
13 | } |
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: | #1006990 |
Snippet name: | audioCopyToWAV - convert an audio file |
Eternal ID of this version: | #1006990/4 |
Text MD5: | 06b0d6cc165b7c513c2c92516062f9db |
Author: | stefan |
Category: | javax / audio |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-02-26 14:25:17 |
Source code size: | 631 bytes / 13 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 505 / 535 |
Version history: | 3 change(s) |
Referenced in: | [show references] |