| 1 |
### This project is in maintenance mode! |
| 2 |
|
| 3 |
I forked this from libopenaptx 0.2.0 after a problematic licensing change |
| 4 |
upstream in 0.2.1. This project is in maintenance mode. |
| 5 |
|
| 6 |
### libfreeaptx |
| 7 |
|
| 8 |
This is Open Source implementation of Audio Processing Technology codec (aptX) |
| 9 |
derived from ffmpeg 4.0 project and licensed under LGPLv2.1+. This codec is |
| 10 |
mainly used in Bluetooth A2DP profile. |
| 11 |
|
| 12 |
It provides dynamic linked shared library libfreeaptx.so and simple command line |
| 13 |
utilities freeaptxenc and freeaptxdec for encoding and decoding operations. |
| 14 |
Documentation for shared library is provided in C header file freeaptx.h. |
| 15 |
|
| 16 |
There is support for aptX and aptX HD codec variants. Both variants operates on |
| 17 |
a raw 24 bit signed stereo audio samples. aptX provides fixed compress ratio 6:1 |
| 18 |
and aptX HD fixed compress ratio 4:1. |
| 19 |
|
| 20 |
For building and installing into system simply run: make install. For building |
| 21 |
without installing run: LD_RUN_PATH='$ORIGIN' make. For producing windows builds |
| 22 |
run: make SOFILENAME=freeaptx0.dll. |
| 23 |
|
| 24 |
It is suggested to compile library with -O3 optimizations (enabled by default |
| 25 |
when env variable CFLAGS is not set) and -mavx2 switch (not enabled by default, |
| 26 |
needs CPU with AVX2: Intel Haswell or AMD Excavator) as it provides significant |
| 27 |
boost to the performance. |
| 28 |
|
| 29 |
Usage of command line utilities together with sox for resampling or playing: |
| 30 |
|
| 31 |
To convert Wave audio file sample.wav into aptX audio file sample.aptx run: |
| 32 |
|
| 33 |
$ sox sample.wav -t raw -r 44.1k -L -e s -b 24 -c 2 - | freeaptxenc > sample.aptx |
| 34 |
|
| 35 |
To convert aptX audio file sample.aptx into Wave audio file sample.wav run: |
| 36 |
|
| 37 |
$ freeaptxdec < sample.aptx | sox -t raw -r 44.1k -L -e s -b 24 -c 2 - sample.wav |
| 38 |
|
| 39 |
To convert MP3 audio file sample.mp3 into aptX HD audio file sample.aptxhd run: |
| 40 |
|
| 41 |
$ sox sample.mp3 -t raw -r 44.1k -L -e s -b 24 -c 2 - | freeaptxenc --hd > sample.aptxhd |
| 42 |
|
| 43 |
To play aptX HD audio file sample.aptxhd run: |
| 44 |
|
| 45 |
$ freeaptxdec --hd < sample.aptxhd | play -t raw -r 44.1k -L -e s -b 24 -c 2 - |