PageSourceSearch

https://ip.fi/websid/sid-worklet.js

js ip.fi collected 2026-10-02 06:22:44 UTC 1,300 bytes, 11 lines download raw bytes

1/*!
2 sid-worklet-body.js: AudioWorklet processor — reads from SharedArrayBuffer ring
3 filled by sid-wasm-worker-body.js (the dedicated WASM Worker).
4
5 Derived from tinyrsid_adapter.js by Juergen Wothke (version 1.1).
6 Original Copyright (C) 2020-2023 Juergen Wothke
7
8 LICENSE
9 This software is licensed under a CC BY-NC-SA
10 (http://creativecommons.org/licenses/by-nc-sa/4.0/).
11*/class SIDWorkletProcessor extends AudioWorkletProcessor{constructor(){super(),this._ctrl=null,this._sabL=null,this._sabR=null,this._RING=0,this.port.onmessage=({data:i})=>{i.type==="sab"&&(this._RING=i.ring,this._ctrl=new Int32Array(i.ctrl),this._sabL=new Float32Array(i.left),this._sabR=new Float32Array(i.right))}}process(i,n){const o=n[0];if(!o?.length)return!0;const s=o[0],t=o[1]??o[0],l=s.length;if(!this._sabL)return s.fill(0),t!==s&&t.fill(0),!0;const e=this._RING,r=Atomics.load(this._ctrl,0);if((Atomics.load(this._ctrl,1)-r+e&e-1)<l)return s.fill(0),t!==s&&t.fill(0),!0;const a=r+l;if(a<=e)s.set(this._sabL.subarray(r,a)),t.set(this._sabR.subarray(r,a));else{const c=e-r;s.set(this._sabL.subarray(r),0),s.set(this._sabL.subarray(0,l-c),c),t.set(this._sabR.subarray(r),0),t.set(this._sabR.subarray(0,l-c),c)}return Atomics.store(this._ctrl,0,a&e-1),!0}}registerProcessor("sid-processor",SIDWorkletProcessor);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.