1 | svoid audio_makeSampleFromSources(L<VF1<double[]>> sources, double[] pair, double gain, VF1<VF1<double[]>> removeSource) { |
2 | double l = 0, r = 0; |
3 | int len = syncSize(sources); |
4 | for (int i = 0; i < len; i++) { // synchro-safe, garbage-free iteration |
5 | VF1<double[]> source = syncGet(sources, i); |
6 | continue if source == null; |
7 | callF(source, pair); |
8 | if (isNaN(pair[0])) continue with callF(removeSource, source); |
9 | l += pair[0]; |
10 | r += pair[1]; |
11 | } |
12 | pair[0] = l*gain; pair[1] = r*gain; |
13 | } |
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: | #1018246 |
Snippet name: | audio_makeSampleFromSources |
Eternal ID of this version: | #1018246/6 |
Text MD5: | 4912d2e890c02931982def26a34b4b09 |
Author: | stefan |
Category: | javax / audio |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-10-12 16:20:11 |
Source code size: | 514 bytes / 13 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 342 / 389 |
Version history: | 5 change(s) |
Referenced in: | [show references] |