1 | srecord GainSoundSource(double gain, VF1<double[]> source) extends VF1<double[]> { |
2 | *(double *gain) {} |
3 | |
4 | public void get(double[] lr) { |
5 | if (source == null) ret with lr[0] = lr[1] = 0; |
6 | source.get(lr); |
7 | if (isNaN(lr[0])) ret; |
8 | for i over lr: |
9 | lr[i] *= gain; |
10 | } |
11 | |
12 | void replaceSource(VF1<double[]> source) { |
13 | this.source = source; |
14 | } |
15 | } |
Began life as a copy of #1018699
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: | #1018703 |
Snippet name: | GainSoundSource - change volume |
Eternal ID of this version: | #1018703/7 |
Text MD5: | a7d3a1ce7f58a3daafa5b775599f29ac |
Author: | stefan |
Category: | javax / audio |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-12-08 21:45:16 |
Source code size: | 377 bytes / 15 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 307 / 882 |
Version history: | 6 change(s) |
Referenced in: | [show references] |