Cross-platform silk codec wrap library depends on ploverlake/silk.
Linux/Unix like
# clone
$ git clone https://github.com/LagrangeDev/libSilkCodec --recurse-submodules
$ cd libSilkCodec
# just make it
$ cmake . && make -j8
# or
$ chmod +x build.sh
$ ./build.sh
Windows
# make sure you have
# installed the Visual Studio
# clone
> git clone https://github.com/LagrangeDev/libSilkCodec --recurse-submodules
> cd libSilkCodec
# make it
> cmake .
> msbuild SilkCodec.sln
# or
# double click the `build.bat`
// Decode silk to pcm
ret = silkDecode(data, dataLen, 24000, codecCallback, NULL);
if(!ret) return 0xDEADC0DE;
// Encode pcm to silk
ret = silkEncode(data, dataLen, 24000, codecCallback, NULL);
if(!ret) return 0xDEADC0DE;
// Decode or Encode callback
void codecCallback(void* userdata, unsigned char* p, int len) {
writeData(p, len);
}
- Callback with userdata
- Static library
- ploverlake/silk offer the original SILK source code.
licensed under MIT with ❤.