Libraryless. Click here for Pure Java version (2229L/14K).
// returns factor static double normalizeShortArrays(L<short[]> l) { int max = min(32767, absShortMax_multipleArrays(l)); if (max == 0 || max == 32767) ret 1; double factor = 32767.0/max; for (short[] a : l) for i over a: a[i] = roundToShort(a[i]*factor); ret factor; }
Began life as a copy of #1026911
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1027010 |
Snippet name: | normalizeShortArrays (does it in place) |
Eternal ID of this version: | #1027010/5 |
Text MD5: | c661be28e8e5997b0a42d250eb18f724 |
Transpilation MD5: | 27cf990c059ec959581e5837bf08c326 |
Author: | stefan |
Category: | javax / audio recognition |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-02-07 00:03:05 |
Source code size: | 298 bytes / 10 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 280 / 393 |
Version history: | 4 change(s) |
Referenced in: | [show references] |