melchor629 / node-flac-bindings

Nodejs bindings to libFLAC
ISC License
17 stars 1 forks source link

StreamDecoder : _le_chunks_ undefined #1

Closed soufi closed 7 years ago

soufi commented 7 years ago

Hi there,

I am using this library to decode a flac stream recovered from a WebSocket.

When I pipe the flac stream into the decoder. I have the following error :

/node_modules/flac-bindings/lib/decoder.js:79 this._le_chunks[0].copy(buffer); ^

TypeError: Cannot read property '0' of undefined

The flac stream was originally encoded using this module. Do you have any idea on how to resolve this ?

melchor629 commented 7 years ago

Thanks for reporting the error. I have to say that this class, StreamDecoder, has not been tested, so it was really incomplete and bugged. Now it should work pretty well. I will push the changes to npm. If you cannot make the StreamDecoder work, feel free to comment the issue and I will reopen it.