eshaz/wasm-audio-decoders

Undefined _preSkip when streaming with ogg-opus-decoder

jimvella opened this issue · 2 comments

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

Maybe its just a matter of copying the _preSkip value in the DecoderState constructor?

eshaz commented

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.

eshaz commented

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!