Git Product home page Git Product logo

libopenaptx's Introduction

This is Open Source implementation of Audio Processing Technology codec (aptX)
derived from ffmpeg 4.0 project and licensed under LGPLv2.1+. This codec is
mainly used in Bluetooth A2DP profile.

It provides dynamic linked shared library libopenaptx.so and simple command line
utilities openaptxenc and openaptxdec for encoding and decoding operations.
Documentation for shared library is provided in C header file openaptx.h.

There is support for aptX and aptX HD codec variants. Both variants operates on
a raw 24 bit signed stereo audio samples. aptX provides fixed compress ratio 6:1
and aptX HD fixed compress ratio 4:1.

For building and installing into system simply run: make install. For building
without installing run: LD_RUN_PATH='$ORIGIN' make. For producing windows builds
run: make SOFILENAME=openaptx0.dll.

It is suggested to compile library with -O3 optimizations (enabled by default
when env variable CFLAGS is not set) and -mavx2 switch (not enabled by default,
needs CPU with AVX2: Intel Haswell or AMD Excavator) as it provides significant
boost to the performance.

Usage of command line utilities together with sox for resampling or playing:

To convert Wave audio file sample.wav into aptX audio file sample.aptx run:

$ sox sample.wav -t raw -r 44.1k -L -e s -b 24 -c 2 - | openaptxenc > sample.aptx

To convert aptX audio file sample.aptx into Wave audio file sample.wav run:

$ openaptxdec < sample.aptx | sox -t raw -r 44.1k -L -e s -b 24 -c 2 - sample.wav

To convert MP3 audio file sample.mp3 into aptX HD audio file sample.aptxhd run:

$ sox sample.mp3 -t raw -r 44.1k -L -e s -b 24 -c 2 - | openaptxenc --hd > sample.aptxhd

To play aptX HD audio file sample.aptxhd run:

$ openaptxdec --hd < sample.aptxhd | play -t raw -r 44.1k -L -e s -b 24 -c 2 -

libopenaptx's People

Contributors

odyx avatar pali avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.