Closed chrisguttandin closed 9 months ago
It's ignored because there's a single parameter. It's a VST-SDK-style parameter change: each parameter change is a float, and then an index that tells you which parameter has changed. In a real audio effect, you could have a few params, and that would then be useful.
Ah, I see. That makes sense. Thanks a lot for your answer.
I noticed that there is an index associated with each value inside
ParameterWriter
andParameterReader
. I was wondering what it should be used for.ParameterWriter.enqueue_change()
takes an index as the first argument andParameterReader.dequeue_change()
populates the given object with that index.The
ParameterWriter
andParameterReader
are used in the main-thread-to-audioworklet example. But the index is always set to0
on the main thead.https://github.com/padenot/ringbuf.js/blob/016d963826a63aa715ae0e2d6ccd34f44c093c11/public/example/main-thread-to-audioworklet/app.js#L51
And it's initialized to
0
in the processor, too.https://github.com/padenot/ringbuf.js/blob/016d963826a63aa715ae0e2d6ccd34f44c093c11/public/example/main-thread-to-audioworklet/processor.js#L12
It seems to be ignored when it reads the new value.
https://github.com/padenot/ringbuf.js/blob/016d963826a63aa715ae0e2d6ccd34f44c093c11/public/example/main-thread-to-audioworklet/processor.js#L24-L26
I can't figure out what it is used for.