Last time I worked with aptx directly was in the CSR days, but they used to have a library they'd provide in binary form only for your specific platform and compiler settings. It was fuck-off expensive ($1+/device + certification), so the easier way to do things was just to buy their silicon which had the IP "for free". A couple years back someone put a decoder of dubious legality into FFMPEG [1], though. The code was subsequently migrated into bluez as well.
[1] https://ffmpeg.org/doxygen/trunk/aptx_8c_source.html