Skip to content

Latest commit

 

History

History
62 lines (47 loc) · 1.2 KB

README.md

File metadata and controls

62 lines (47 loc) · 1.2 KB

libSilkCodec

Cross-platform silk codec wrap library depends on ploverlake/silk.

Clone & Build

Linux/Unix like

  # clone
  $ git clone https://github.com/KonataDev/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/KonataDev/libSilkCodec --recurse-submodules
  > cd libSilkCodec

  # make it
  > cmake .
  > msbuild SilkCodec.sln

  # or
  # double click the `build.bat`

Example

  // 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);
  }

Todo

  • Callback with userdata
  • Static library

Credits

License

licensed under MIT with ❤.