GoogleChromeLabs / web-audio-samples

Web Audio API samples by Chrome Web Audio Team
https://bit.ly/web-audio-samples
Apache License 2.0
686 stars 196 forks source link

Improve RingBuffer #347

Closed hoch closed 1 month ago

hoch commented 11 months ago

A comment from @mjwilson-google:

The way we're reading or writing the samples is also kinda strange; we could probably just be updating the index directly instead of making a new temporary every iteration. But that at least looks like it's correct, just inefficient. If we updated the index directly each iteration we wouldn't need to do the correction after the loop at all.

I say we should prioritize improving our AudioWorklet examples because it is often used/referred by developers.

mjwilson-google commented 11 months ago

This was referencing https://github.com/GoogleChromeLabs/web-audio-samples/blob/main/src/audio-worklet/design-pattern/lib/wasm-audio-helper.js but it seems like we have some other ring buffer implementations as well that might be worth looking at too.

Daksh-10 commented 7 months ago

@hoch @mjwilson-google I worked on this issue and created a pull request #352

hoch commented 6 months ago

This is a tracking issue for improving the RingBuffer. The PR above can be considered one task that we completed.

hoch commented 2 months ago

@professorabhay is working on this: https://github.com/GoogleChromeLabs/web-audio-samples/issues?q=is%3Aopen+author%3Aprofessorabhay