samirkumardas / opus-to-pcm

Decode raw opus packet to PCM without using any external library in your browser.
Other
73 stars 15 forks source link

TypeScript definitions #10

Open abishek-sampath opened 5 years ago

abishek-sampath commented 5 years ago

Is there any plan to add to typescript definitions or typescript examples for this project? It will be really useful if there are any typescript definitions for the main OpustoPCM class and its related functions

Also, I ran the example server and client that was present in the repo (with some of the raw_opus sample files), and I got this error

The buffer passed to decodeAudioData contains invalid content which cannot be decoded successfully.
EncodingError: The given encoding is not supported.

I don't think I changed anything with respect to the code in the example. I just translated to the code to use TypeScript syntax wherever possible. I am not sure if the error was because of unknown typing definitions, or its because of something else.