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 audioCopyToWAV(File inputFile, File outputFile, AudioFormat outputFormat) ctex { AudioInputStream sourceStream = AudioSystem.getAudioInputStream(inputFile); AudioInputStream stream = AudioSystem.getAudioInputStream(outputFormat, sourceStream); int nWrittenBytes = AudioSystem.write(stream, AudioFileFormat.Type.WAVE, outputFile); sourceStream.close(); stream.close(); }
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: | 503 / 531 |
Version history: | 3 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1007048 - audioCopyToMP3 - convert an audio file #1009719 - saveAudioInputStreamToWAV |