Skip to content

RFCreations/bluespy_codecs

Repository files navigation

blueSPY Audio Codecs

The blueSPY protocol analyser software from RFCreations (download here) includes in-built decoders for the SBC, CVSD, G.722, and LC3 codecs.

This repository serves two purposes:

  1. It contains the source for some extra codecs that are included as plugins to blueSPY when you download the software. These are currently versions of AAC, aptX, and LDAC that do not contain any patented technology.

  2. To allow users to implement their own audio codecs and add them to blueSPY as plugins. This could be, for example, a decoder for the patented HE-AAC, or something completely new. See instructions for doing this below in Adding New and/or Custom Codecs.

AAC, aptX, and LDAC

As explained above, plugins for decoding AAC Low Complexity (aac-stripped), aptX and aptX HD (libfreeaptx), and LDAC (libldac) are included when you download the blueSPY software, so decoding streams in blueSPY that use these codecs will work out of the box.

If you wish to install the dynamic libraries in a location other than the default, they can be downloaded here. Click on the latest workflow run, scroll down to Artifacts and download the libraries for your OS of choice. Then move the files to an appropriate directory - listed below are the locations that blueSPY will look for audio codec plugins in Windows, MacOS, and Linux environments.

AAC Higher Quality Modes

The AAC codec plugin included in the blueSPY download is a cut down version with all patented technology removed. If you wish to use higher quality modes like HE or ELD then you can fork this repository, clone https://github.com/mstorsjo/fdk-aac, adjust CMakeLists.txt to use that instead of fdk-aac-stripped, and recompile the AAC binary. No other source changes are required.

Adding New and/or Custom Codecs

  1. Ensure you have CMake and a suitable compiler/toolchain installed (MSVC/LLVM/GCC).
  2. Open a terminal (on Windows you may need to use the Visual Studio developer prompt).
  3. Run: git clone --recurse-submodules https://github.com/RFCreations/bluespy_codecs.git && cd bluespy_codecs
  4. Add your decoder file MYCODEC.cpp. You may wish to copy the structure of one of the provided examples. There is also a template called TEMPLATE_CODEC.cpp if you would like to copy that as a starting point.
  5. Implement the four functions in bluespy_codec_interface.h (init, new_codec_stream, codec_deinit, and codec_decode). See also codec_structures.h for definitions of the data structures provided by blueSPY for use in codecs plugins.
  6. Add a new secion at the bottom of CMakeLists.txt for MYCODEC, using the provided ones as examples. Also add any submodules into .gitmodules.
  7. Run: cmake --preset release && cmake --build build/release
  8. Copy build/release/mycodec.{dll,so,dylib} to a directory as specified below.

Contact RFCreations support if you require help with this, or your codec needs some extra information.

Please consider releasing your custom codec back to RFCreations so we can include it for all of our mutual customers. We can accept pull requests via GitHub, or private source or binary versions sent to RFCreations support.

Directories that blueSPY Will Look in for Audio Codec Dynamic Libraries

  • A directory called audio_codecs which is in the same directory as the bluespy executable (or on MacOS, .../blueSPY.app/Contents/Plugins/audio_codecs). This is where you will find the AAC, aptX, and LDAC dynamic libraries included in the bluespy download.
  • Any directory whose path is the value of an environment variable on your machine called BLUESPY_AUDIO_CODEC_DIR.
  • Other default directories that blueSPY will check:
    • Windows User: C:/Users/<USER>/AppData/Roaming/RFcreations/blueSPY/audio_codecs/
    • Windows System: C:/Program Files/RFcreations/blueSPY/audio_codecs/
    • Mac: ~/Library/Application Support/RFcreations/blueSPY/audio_codecs/

Licensing

All code in this repository, excluding the submodules, is released under the Boost Software License which imposes practically no requirements on your use of the code. However, the underlying codecs have their own licenses which can be found in their respective directories, and the final binaries will be subject to the repective licenses.

About

Custom codecs for blueSPY

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •