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 multiShortArraysToWAVE(L<short[]> chunks, File wavFile, O... params) ctex { |
8 | AudioFormat format = optPar(params, format := javaSound_cdQuality()); |
9 | temp AudioInputStream sourceStream = new AudioInputStream(new MultiShortArrayInputStream(chunks), format, lengthLevel2_shortArrays(chunks)/format.getChannels()); |
10 | temp AudioInputStream stream = AudioSystem.getAudioInputStream(format, sourceStream); |
11 | AudioSystem.write(stream, AudioFileFormat.Type.WAVE, mkdirsForFile(wavFile)); |
12 | } |
Began life as a copy of #1007036
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1018608 |
Snippet name: | multiShortArraysToWAVE |
Eternal ID of this version: | #1018608/6 |
Text MD5: | 0ab378b29fa2387c943de5be11c05d08 |
Author: | stefan |
Category: | javax / speech |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-10-17 21:30:54 |
Source code size: | 734 bytes / 12 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 388 / 453 |
Version history: | 5 change(s) |
Referenced in: | [show references] |