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

Allow reuse of decoder for subsequent files #7

Open
anthumchris opened this issue Dec 24, 2019 · 0 comments
Open

Allow reuse of decoder for subsequent files #7

anthumchris opened this issue Dec 24, 2019 · 0 comments
Assignees

Comments

@anthumchris
Copy link
Owner

Allow for the use case where the same decoder is used to play/decode multiple files, similar to a streaming music player like Spotify or iTunes. The decoder should be able to be "reset" and re-used for new/subsequent files, avoiding re-instantiation of the WebAssembly module and any potential side-effects.

Currently, the decode buffer would contain un-decoded Ogg bytes form the previous file if reused. An observed side note: when tested, the decoder still works (due to Opus' recoverability from loss) and recovers from re-starting the decoding of the same file, but this probably won't succeed work for files that contain different bitrates and headers.

A formal reset method would allow a new file's header page to be read and would clear any bytes from previous files.

@anthumchris anthumchris self-assigned this Dec 24, 2019
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