1 | sclass AudioInputStreamsCollector {
|
2 | new L<InputStream> streams; |
3 | int frames; |
4 | |
5 | void add(InputStream stream, int frames) {
|
6 | streams.add(stream); |
7 | this.frames += frames; |
8 | } |
9 | |
10 | void addSilence(double seconds) {
|
11 | int n = iround(seconds/2); |
12 | add(ZerosInputStream(n*2), n); |
13 | } |
14 | |
15 | void writeToWAV(File wavFile) {
|
16 | writeInputStreamsToWAV(streams, frames, wavFile); |
17 | } |
18 | } |
download show line numbers debug dex old transpilations
Travelled to 12 computer(s): bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1019218 |
| Snippet name: | AudioInputStreamsCollector |
| Eternal ID of this version: | #1019218/3 |
| Text MD5: | fda6658bbecebdd4c0276f891232fd4c |
| Author: | stefan |
| Category: | javax / audio |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2018-10-28 00:23:13 |
| Source code size: | 406 bytes / 18 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 598 / 1124 |
| Version history: | 2 change(s) |
| Referenced in: | [show references] |