Libraryless. Click here for Pure Java version (3214L/18K).
1 | srecord CutOffSoundSource(double seconds, VF1<double[]> source) extends VF1<double[]> {
|
2 | long count; |
3 | |
4 | public void get(double[] lr) {
|
5 | if (count++ < seconds*44100) |
6 | source.get(lr); |
7 | else |
8 | lr[0] = Double.NaN; // mark end |
9 | } |
10 | } |
Began life as a copy of #1018698
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: | #1018699 |
| Snippet name: | CutOffSoundSource - end after a certain time |
| Eternal ID of this version: | #1018699/4 |
| Text MD5: | e22faa5c9699d10b8c32f4d558020f11 |
| Transpilation MD5: | 03b74b1132220f345b31a12324fa62d7 |
| Author: | stefan |
| Category: | javax / audio |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2021-09-03 03:11:22 |
| Source code size: | 254 bytes / 10 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 524 / 1161 |
| Version history: | 3 change(s) |
| Referenced in: | [show references] |