Audio being played has to be transcoded when using bluetooth audio devices
I've been trying to get my bluetooth earbuds working without a bluetooth card for a while now. After some testing, I found specific apps which don't cause transcoding (Youtube, some games, etc) and some that do (This app, some games, music players)
The latency I roughly tested with a youtube video has pretty much no delay but using this app has a is really noticeable delay which I'm roughly estimating at 100ms+. I don't know how to test this more precisely, but its 100% noticable
Is there some possible way to have this be avoided in some way? Like maybe handing transcoding to AAC within the app? Using AAC alone seems to stop all transcoding nonsense and give decent results
Can you describe the "transcoding"? The app consumes uncompressed PCM and so there is no decoding on the app end. PulseAudio and the Windows server should simply be sending uncompressed PCM from the raw source and so there is no encoding on that end.
The delay is probably most likely due to inefficiences in the app buffering up large amounts of uncompressed data to send to Android for rendering. To test this, you can try lowering the bitrate of the PCM data.
If anything, my guess is that it's better to try and let Android handle the decoding.
But implementing an additional code in the app is not in the future plans.
Uncompressed PCM has to be transcoded into AAC, SBC, AptX, LDAC, etc etc. when using bluetooth headphones.
This creates a really noticable latency vs using phone speakers.
I was able to get a bluetooth pcie card on my PC to truly sanity check this and yeah, using this app gives significantly worse latency.
I also tried Audioshare and it had the same problem however the proprietary Audiorelay didn't.
I first assumed that having the app handle the transcoding into AAC would be faster but that seems a bit silly now. So probably my next question is if there's a way to stream AAC instead, being encoded by the host (PC) instead?
Am using Linux btw, not windows, would be nice to use over there too though
using this app gives significantly worse latency
Yeah, I think the major contributor is the buffering.
I also wonder if UDP would help here.
So probably my next question is if there's a way to stream AAC instead, being encoded by the host (PC) instead?
The reason I initially chose uncompressed PCM was because I thought it'd be faster since there is no encode/decode in the audio path. And for Linux, pulseaudio provides a direct PCM stream and for Windows, it was straightword to build the audio server.
There are currently no plans to support additional codecs.
It'd be interesting to investigate how flow control would work in this case. Maybe consuming as fast as possible is good enough and codecs can recover if there's data missing.
Am using Linux btw, not windows, would be nice to use over there too though
Use Pulseaudio. There should be instructions in the readme.