srecord GainSoundSource(double gain, VF1<double[]> source) extends VF1<double[]> {
*(double *gain) {}
public void get(double[] lr) {
if (source == null) ret with lr[0] = lr[1] = 0;
source.get(lr);
if (isNaN(lr[0])) ret;
for i over lr:
lr[i] *= gain;
}
void replaceSource(VF1<double[]> source) {
this.source = source;
}
}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: | 759 / 1490 |
| Version history: | 6 change(s) |
| Referenced in: | [show references] |