News for hackers. Stuff that matters.
Re:Ask HN: Why isn't there a standard network audio protocol? by nixpulvis on Thursday April 14, 2022 @03:09PM (#31031847)
Another question. Why aren't my bluetooth headphones better at buffering larger amounts of data. I should be able to load a complete song without skipping with interference.
Re:Ask HN: Why isn't there a standard network audio protocol? by colechristensen on Thursday April 14, 2022 @03:48PM (#31032367)
Because you might be unhappy if there were 30 second latency on a bluetooth voice call, and there would be a whole lot of overhead in an already complex protocol to enable buffered audio instead of live audio.
Re:Ask HN: Why isn't there a standard network audio protocol? by jtsiskin on Thursday April 14, 2022 @04:11PM (#31032637)
Imagine watching a movie with this. I believe apple actually does something like this, slightly delaying the video playback so the AirPods can buffer and the video stays in sync. But this only works if the video player and headphones can communicate.
Re:Ask HN: Why isn't there a standard network audio protocol? by pjerem on Thursday April 14, 2022 @05:32PM (#31033590)
In fact, Apple aren’t doing this alone. It’s a pretty common feature of video players. I’m pretty sure even VLC supports this.
Re:Ask HN: Why isn't there a standard network audio protocol? by izacus on Thursday April 14, 2022 @03:20PM (#31031996)
Because that adds a massive amount of latency, something that is a no. 1 complaint for Bluetooth headphones.
Re:Ask HN: Why isn't there a standard network audio protocol? by lxgr on Thursday April 14, 2022 @05:43PM (#31033691)
This will change (hopefully) soon with Bluetooth LE audio!
Re:Ask HN: Why isn't there a standard network audio protocol? by chrisseaton on Thursday April 14, 2022 @03:10PM (#31031872)
The protocol doesn’t support that - it’s streaming audio.
Re:Ask HN: Why isn't there a standard network audio protocol? by marginalia_nu on Thursday April 14, 2022 @03:16PM (#31031937)
Why wouldn't a streaming audio protocol allow for that?
Re:Ask HN: Why isn't there a standard network audio protocol? by chrisseaton on Thursday April 14, 2022 @03:22PM (#31032022)
I don’t know if you understand what ‘streaming’ means? Streaming doesn’t support large buffering… because that’s not streaming.

But more broadly, not everything can be in scope. At the time of design having 10 MB and a decompressor in earbuds wasn’t realistic.

But blaming your headphones is ignorant - the headphones implement a protocol. They don’t have control over the protocol.

Re:Ask HN: Why isn't there a standard network audio protocol? by orhmeh09 on Thursday April 14, 2022 @03:31PM (#31032134)
The headphones and earbuds could easily and realistically incorporate a buffer today. How’s that being ignorant?
Re:Ask HN: Why isn't there a standard network audio protocol? by InitialLastName on Thursday April 14, 2022 @06:28PM (#31034183)
To be clearer:

Yes, the headphones could store up N seconds of audio data ahead of playback. However, the value of buffering is that if you miss a chunk of data, you can tell the sender "give me that again". Protocols that allow buffering account for that by giving the data sink a means to tell the source "send me chunk F again". Bluetooth A2DP and other streaming protocols, because they prioritize constant latency over data reliability, don't have a means to allow that; the source keeps sending new chunks even if the sink didn't receive one.

As a result, there would be no value in headphones storing up a bunch of audio before playback; if a chunk is missing, there are no means to remedy that in the protocol, so it will still be missing when you play it back.

Re:Ask HN: Why isn't there a standard network audio protocol? by kalleboo on Friday April 15, 2022 @01:15AM (#31036796)
> Bluetooth A2DP and other streaming protocols, because they prioritize constant latency over data reliability, don't have a means to allow that; the source keeps sending new chunks even if the sink didn't receive one.

That's true for the Bluetooth Headset profile (the low quality one you get on calls), but A2DP goes over Bluetooth ACL[0] which resends dropped frames.

A2DP headphones do have a short buffer on the order of a second or whatever to deal with the jitter from retransmissions (and devices like an iPhone have the logic to delay the display of video appropriately to keep the audio in sync).

Now none of this allows for a whole song to be buffered though.

[0] https://en.wikipedia.org/wiki/Asynchronous_Connection-Less

Re:Ask HN: Why isn't there a standard network audio protocol? by chrisseaton on Thursday April 14, 2022 @03:34PM (#31032182)
The protocol doesn’t support that. The headphones can do nothing about that.
Re:Ask HN: Why isn't there a standard network audio protocol? by necovek on Thursday April 14, 2022 @04:24PM (#31032800)
In theory, headphones could store music in a buffer instead of playing it, and then delay playing it by say 2 minutes (or 5 seconds or whatever). Even if existing BT profiles preferred losing quality, you could have BT headsets that pretend to be storage devices and accept file uploads and which then play them after they've been completely received. Ideally though, you'd use one of the BT profiles that already provide guaranteed lossless audio transmission (or develop one if there's none). In a sense, BT profiles are protocols within a protocol, so you can develop almost anything you want (ofc, you need devices to support those profiles too).

Of course, the experience of clicking play on a song and having it only start a number of seconds later is not something that'd sell particularly well, I guess. And then you'd have to renegotiate the BT profile if a call comes in that has to happen live. And switching back to the song will have another big delay.

Re:Ask HN: Why isn't there a standard network audio protocol? by chrisseaton on Thursday April 14, 2022 @04:39PM (#31032976)
So the upload speed per song is real-time? Come-on - this conversation has turned silly.
Re:Ask HN: Why isn't there a standard network audio protocol? by necovek on Thursday April 14, 2022 @05:42PM (#31033685)
BT 3.0 offered up to 24Mbps bandwidth, with other variants offering up to 3Mbps. CD quality music is 1.4Mbps. If you cannot come up with an error correcting scheme that will let you upload music in real time with those parameters, what parameters would you need? (And sure, these rates are hard to achieve with BT in real world because of varying distance and interference, and yes, CD quality music is not the highest quality encoding you can use, but you can achieve similar or better quality with less bandwidth too)

And let's not forget this was a discussion of buffering. A buffer of 5 minutes (50MiB) buys you 5 minutes of not having to be real-time, or to be slowly lagging behind — if that covers 3h of continuous listening time, you probably covered 99% of uses where latency is not a big deal anyway (like playing music — calls and movies are another game).

I already acknowledge practical UX problems with just relying on buffering, but it doesn't make much sense to say how it can't be done because of the protocol either.

Re:Ask HN: Why isn't there a standard network audio protocol? by chrisseaton on Thursday April 14, 2022 @05:52PM (#31033768)
But the protocol just doesn't support sending audio faster than it's supposed to be played. The sender doesn't know what to send to do what you want. There's no mechanism to do what you want for the headphones.
Re:Ask HN: Why isn't there a standard network audio protocol? by Dylan16807 on Thursday April 14, 2022 @09:12PM (#31035611)
Sure, the current protocol doesn't support it.

But wanting a better protocol isn't 'silly'.

Re:Ask HN: Why isn't there a standard network audio protocol? by orhmeh09 on Thursday April 14, 2022 @04:23PM (#31032788)
Why can’t the headphones buffer the sound for a second? Why would it need protocol support? I’m thinking something like anti-disk-skipping on portable CD players.
Re:Ask HN: Why isn't there a standard network audio protocol? by PeterisP on Sunday April 24, 2022 @07:52PM (#31149364)
If it's actually streaming, the buffer at headphones wouldn't help anything since any missed data would not get resent anyway (since the sender wouldn't keep a buffer and would not have any data to re-send) and would still cause a skip.
Re:Ask HN: Why isn't there a standard network audio protocol? by kalleboo on Friday April 15, 2022 @01:18AM (#31036808)
They already do keep a buffer for a second or so
Re:Ask HN: Why isn't there a standard network audio protocol? by chrisseaton on Thursday April 14, 2022 @04:35PM (#31032933)
Was a full song, now it’s a second?
Re:Ask HN: Why isn't there a standard network audio protocol? by orhmeh09 on Thursday April 14, 2022 @04:47PM (#31033066)
I only suggested a buffer, not one of an entire song length, so maybe you’ve mistaken me for someone. What I’m trying to figure out is why we can’t apply the same concept as in the anti skipping technology to Bluetooth cutouts.
Re:Ask HN: Why isn't there a standard network audio protocol? by Dylan16807 on Thursday April 14, 2022 @09:06PM (#31035568)
> I don’t know if you understand what ‘streaming’ means? Streaming doesn’t support large buffering… because that’s not streaming.

That's not how those words work.

Twitch is streaming, right? Under certain flaky playback conditions it can buffer a full minute. Which is 50 megabytes at full quality.

Re:Ask HN: Why isn't there a standard network audio protocol? by marginalia_nu on Thursday April 14, 2022 @04:22PM (#31032768)
> But blaming your headphones is ignorant - the headphones implement a protocol. They don’t have control over the protocol.

If the headphones are implementing a protocol that isn't suitable for purpose, there is very good reason to blame the headphones. What's the point in having headphones if you need to be in a Faraday cage to use them?

Re:Ask HN: Why isn't there a standard network audio protocol? by chrisseaton on Thursday April 14, 2022 @04:33PM (#31032911)
If you buy Bluetooth headphones and complain they don’t buffer full songs then that’s your problem, not the headphones.

> What's the point in having headphones if you need to be in a Faraday cage to use them?

Surely it’s the opposite? They don’t work in a Faraday cage, because they’re streaming and need to be connected.

Re:Ask HN: Why isn't there a standard network audio protocol? by marginalia_nu on Thursday April 14, 2022 @05:17PM (#31033427)
> If you buy Bluetooth headphones and complain they don’t buffer full songs then that’s your problem, not the headphones.

What is the use case for headphones that cut out every couple of seconds?

> Surely it’s the opposite? They don’t work in a Faraday cage, because they’re streaming and need to be connected.

In this case the broadcast source would be in the Faraday cage along with the listener.