discordjs / opus

Native opus bindings for node
MIT License
191 stars 55 forks source link

resample #18

Open vinnitu opened 4 years ago

vinnitu commented 4 years ago

Hi!

in sources we have deps/opus/silk/resampler.c can we wrap this functional to external usage?

I need to get pcm 8000 sample rate after decode opus (even it was 16000 or 24000 berore encoding) and search for solution. It would be great if libopus can do it without external library

xnorpx commented 4 years ago

https://opus-codec.org/docs/opus_api-1.3.1/group__opus__decoder.html#ga753f6fe0b699c81cfd47d70c8e15a0bd

You should be able to create the decoder with fs 8k sample rate to get 8k pcm out.