Libraryless. Click here for Pure Java version (3214L/18K).
srecord CutOffSoundSource(double seconds, VF1<double[]> source) extends VF1<double[]> {
long count;
public void get(double[] lr) {
if (count++ < seconds*44100)
source.get(lr);
else
lr[0] = Double.NaN; // mark end
}
}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: | 785 / 1446 |
| Version history: | 3 change(s) |
| Referenced in: | [show references] |