Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

10
LINES

< > BotCompany Repo | #1016686 // stereoSamplesIterator - loops

JavaX fragment (include)

1  
static VF1<double[]> stereoSamplesIterator(final short[] samples) {
2  
  ret samples == null ? null : new VF1<double[]>() {
3  
    int sampleIndex = 0;
4  
    public void get(double[] pair) {
5  
      pair[0] = samples[sampleIndex];
6  
      pair[1] = samples[sampleIndex+1];
7  
      sampleIndex = (sampleIndex+2) % l(samples);
8  
    }
9  
  };
10  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1016686
Snippet name: stereoSamplesIterator - loops
Eternal ID of this version: #1016686/5
Text MD5: 021b110e6e6b8c3d49e1122a2e96bb2e
Author: stefan
Category: javax / sound
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-12-08 16:18:37
Source code size: 332 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 399 / 450
Version history: 4 change(s)
Referenced in: [show references]