Skip to content

Allow reuse of decoder for subsequent files #7

Open

Description

@anthumchris

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.

Activity

  1. self-assigned this
    on Dec 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions