windows: add LHDC V5/aptX sink and low-latency audio path - #743
Conversation
|
Hi. Thanks for your PR. It contains a number of independent changes. From a first glance: change to Intel chipset support, adds git submodules for LHDC v5 and PortAudio, support for LHDC v5, support for aptX, changes to PortAudio driver, some changes for Windows. Let's see. So far, we don't use git submodules (to make it easier as well as keep closer control of them) and I'd rather not add additional audio codecs to the BTstack sources directly. Detecting libraries via PkgConfig is fine, though. Could you split this into multiple single topic PRs for manual review & discussion? Btw. please base these on the 'develop' branch instead of 'master'. I'm not sure what's a good way to support custom codecs like AAC, aptX, LDAC, LHCD.. without increasing the size of the a2dp_sink_demo too much. We recently discussed if we should switch to "btstack_run_loop_execute_on_main_thread" to trigger refill by the application instead of using a timer. It looks like this would help you here, too. Btw. what's your goal here? Did you just wanted to high-quality audio playback on your Windows laptop from your Android phone? |
Sure thing.
Yes exactly. I was also working on reverse engineering the codecs to bring them to AOSP and I didn't really have a headset that supports them for testing so I implemented them here (so I can test directly on my PC) and thought other people might find it useful. |
Summary
Adds a Windows WinUSB A2DP sink demo with SBC, LHDC V5, and optional aptX Classic/aptX HD decoding, together with the PortAudio changes needed for stable low-latency playback at high sample rates.
Highlights
openaptx0.dlldecoder backend is available; no aptX decoder code/binary is bundled[tag, sequence]subpacket prefixes per 20 ms A2DP payloadValidation
Tested on Windows 11 with an Intel Bluetooth controller and an Android 16 Xiaomi onyx source:
The external aptX backend is intentionally not included because libopenaptx is GPLv3; the sink omits aptX endpoints when the DLL is unavailable.