RadioDroid icon indicating copy to clipboard operation
RadioDroid copied to clipboard

buffering

Open bigbavarian opened this issue 3 years ago • 7 comments

when i was drive long distences there allways any places where the connection is lost. so i think a way to buffer 30 sec or a minute is a good chance to fix this.

sry for my english good job, thanks for your great app.

bigbavarian avatar Aug 02 '20 05:08 bigbavarian

I'm often switching between H+, wi-fi and 4G as I walk around my neighbourhood and town, and so having big skips is quite uncomfortable and worth a longer startup time

graingert avatar Jul 21 '21 21:07 graingert

I don't think buffering would help. Because we can ask radio's server only for the current chunk, we cannot ask for chunks in advance:

    Chunk 1           2                 3              ...
|---------------|---------------|---------------|---------------|---------------|
              ^  xxxxxxxxxxxxxxx     ^
              |     DROPPED          |
          connection              restored
            dropped                      

No matter how much you buffered if your connection dropped for more than chunk length - you will notice it.

However, what we could do is more aggressive reconnect strategy by default. At the moment the defaults are unreasonably conservative.

What you could do at the moment is in Connectivity settings reducing connection and read timeouts and increasing retry timeout.

werman avatar Jul 31 '21 11:07 werman

The music I listen to on the radio is particularly resistant to pitch bending, tempo changes and skips, but not large pauses

graingert avatar Jul 31 '21 11:07 graingert

However, what we could do is more aggressive reconnect strategy by default. At the moment the defaults are unreasonably conservative.

Would it be possible to maintain multiple concurrent connections?

graingert avatar Jul 31 '21 11:07 graingert

Would it be possible to maintain multiple concurrent connections?

Maintaining them - I don't see how, issuing multiple connections with periods between them lower than their timeout and keeping the one that connect first - may help. However I think that setting connection/read timeouts to 1 second may be aggressive enough to reconnect in time.

werman avatar Jul 31 '21 11:07 werman

Ok, even with 1s timeout there is a drop, something is wrong.

werman avatar Jul 31 '21 11:07 werman

I was previously using TuneIn with a 30 second buffer

graingert avatar Jul 31 '21 11:07 graingert