Contribute
Please do (just open an issue or send a PR).
I am currently beginning with 3 seconds storage in a WebAssembly.Memory instance and calling grow() when data arrives in a ReadableStream the form of Uint8Array from WebTransport.incomingUnidirectionalStreams.getReader() (Uint8Array(512) => Uint16Array(Uint8Array.buffer) => Float32Array(128)) for AudioWorkletprocess().
It's a ring buffer, so yes. The existing example is essentially that, writing a sine wave continuously to the buffer from the main thread and reading from the worklet thread.
I am currently beginning with 3 seconds storage in a
WebAssembly.Memory
instance and callinggrow()
when data arrives in aReadableStream
the form ofUint8Array
fromWebTransport.incomingUnidirectionalStreams.getReader()
(Uint8Array(512)
=>Uint16Array(Uint8Array.buffer)
=>Float32Array(128)
) forAudioWorklet
process()
.Ideally I want to begin with the same 3 seconds of memory allocation https://github.com/guest271314/webtransport/blob/4de2842fed22b98cc8c7fd813b27219aa5f1b666/webTransportAudioWorkletWebAssemblyMemoryGrow.js#L8 (if necessary N seconds or N minutes of storage can be allocated) and overwrite the same 3 seconds when the last frame of initial 3 seconds is set at
outputs
to implement an infinite stream without the current approach of writing tomaximum
ofWebAssembly.Memory
(SharedArrayBuffer
), for an infinite stream, a proof-of-concept radio station.Does ringbuf.js provide the means for the above use case?
If yes, can an example be published in this repository?