Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What's the best way to integrate with a buffer? such as the web audio's AudioBuffer #724

Open
cxg666 opened this issue Apr 28, 2024 · 0 comments

Comments

@cxg666
Copy link

cxg666 commented Apr 28, 2024

Some points:

  1. The buffer is generated from .rs, and returned to v8 js. For example audioContext.decodeAudio() gets a AudioBuffer;
  2. The buffer can be used multi times, Such as it can be assigned by audioBufferSourceNode.setBuffer(); more than once.

What I am thinking is store the buffer to resourceTable, and js object hold the resourceId, then can avoid data copy from js & rs,

When can I know to release the buffer? What's the best way to achieve this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant