Automattic / pocket-casts-android

Pocket Casts Android 🎧
Mozilla Public License 2.0
2.54k stars 210 forks source link

Wear OS audio stutters randomly during playback #1113

Open notamaiar opened 1 year ago

notamaiar commented 1 year ago

Description

I've found two main issues with the Wear OS app.

  1. Often, though my earbuds are paired to the watch per the Bluetooth settings, I'll hit Play on the Pocket Casts app but no sound comes through. Sometimes this is persistent (I'll wait up to 30 seconds and I hear no sound), and sometimes it resolves itself after 10 seconds or so.
  2. During playback, the audio will suddenly start skipping and stuttering - or more accurately, it seems like it's pausing without being told to pause, and despite the controls showing that it's still in "Play." I'm sure it's not actually just skipping audio, because it will go silent in the middle of a sentence and then start up again in the same spot 10-30 seconds later. Sometimes it will do this a dozen times in a row, sometimes I'll go all day and have no problems. It's hard to predict, but this doesn't happen with other on-watch audio apps like YouTube Music, so I don't think it's solely a Bluetooth issue.

Step-by-step reproduction instructions

  1. hit "play" on a podcast episode
  2. get asked to pair with Bluetooth (or not, if Bluetooth headphones are already paired)
  3. no sound

Screenshots or screen recording

No response

Did you search for existing bug reports?

Device, Operating system, and Pocket Casts app version

Google Pixel 6 with Android 13 TQ3A.230605.010, Pocket Casts for Wear OS 7.41-rc-3w.

mchowning commented 1 year ago

👋 @notamaiar ! That sounds frustrating. Does this happen when you have downloaded the episode? You can download episodes from the episode details screen.

notamaiar commented 1 year ago

Unfortunately, yes. The first play of a downloaded episode was fine, but when paused or skipped I got a big delay. I tried swapping my earbuds pair to my phone and back again, as I do that regularly, and when I swapped the pair back to the watch, hitting play gave me no sound. I had to manually unpair and restart the app to get sound again.

Also, after downloading the episode I saw two new weird behaviours:

mchowning commented 1 year ago

Would you be willing to contact support with your watch app logs @notamaiar ? You do that by going to SettingsHelp & feedback on the watch (it's important that you do this from your watch and not using the phone app so that the logs from the watch and not the phone get sent).

notamaiar commented 1 year ago

No problem: done.

mchowning commented 1 year ago

Thanks! 🙇

Internal ref: 6456300-zen

mchowning commented 1 year ago

I think there are a couple going on here.

1. Downloading over Bluetooth

There was a bug that was not allowing downloads over Bluetooth. That should be fixed by #1114 . This meant that if you started downloading an episode on wifi, but then lost your wifi connection, the download would stop even though a Bluetooth connection was still available. Similarly, if you tried to start downloading an episode with only a Bluetooth connection, the episode would not download until a wifi or cellular connection was available.

Even though the download wouldn't happen over Bluetooth, the episode would still appear under downloads because it was queued, it just wouldn't have the green checkmark next to it to indicate that it had been fully downloaded.

2. Bluetooth is really slow. It's especially noticeable when you start playing a podcast

Even under the best of circumstances bluetoothl is really slow, and that only gets worse when there is interference in the signal. It also varies a fair bit depending on the podcast (in my testing at least). For the three podcasts I randomly picked to test (Bird notes, La soiree est (encore) jeune, and Short Tales), the average time from tapping play until hearing audio was 15, 25, and 40 seconds respectively.

We can change how many seconds of audio must be buffered before playback begins, but the default of 2.5 seconds is already pretty low, and lowering it would probably just lead to more stuttering after playback started. I went ahead and tested lowering it to 1 second though, just to see how much of a difference it might make, and it only reduced the time from tapping play to hearing audio by about 3% on average, so this doesn't seem to be a promising fix.

We are reducing the buffer size on the watch, which should generally help performance, but I don't think it's going to help playback start more quickly.

@ashiagr has suggested adding some kind of loading spinner to the Now Playing screen and that seems like a good idea.