Closed jimvella closed 1 year ago
Thanks for entering this issue. I think I see what the problem is. The DecoderState
instance needs to be dereferenced when the first file is done decoding so it can create a new instance for the next decode
and decodeFile
invocation. I'll get a fix out later today for this.
It turned out to be a bit more than what I originally thought. I've released ogg-opus-decoder/1.6.7
that fixes this issue. Thanks again for reporting it!
Thanks for making this library available. I'm having trouble using https://github.com/eshaz/wasm-audio-decoders/tree/master/src/ogg-opus-decoder for streaming. It's producing the first decoded result, but then subsequent calls result in 'TypeError: Cannot convert undefined to a BigInt' at https://github.com/eshaz/wasm-audio-decoders/blob/5e64d49844c4f2ea99927093c595b0df0e55744e/src/ogg-opus-decoder/src/OggOpusDecoder.js#L70
Maybe its just a matter of copying the _preSkip value in the DecoderState constructor? https://github.com/eshaz/wasm-audio-decoders/blob/5e64d49844c4f2ea99927093c595b0df0e55744e/src/ogg-opus-decoder/src/OggOpusDecoder.js#L16