Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Choppy audio after using bluetooth for a while #245

Open
AntiSol opened this issue Nov 4, 2024 · 6 comments
Open

[Bug] Choppy audio after using bluetooth for a while #245

AntiSol opened this issue Nov 4, 2024 · 6 comments
Labels
Bug Bugs. Crashes or something isn't working Need More Info More information are required to solve this issue

Comments

@AntiSol
Copy link

AntiSol commented Nov 4, 2024

Bug Summary

Hello,

Yesterday I was out riding my motorbike using my bluetooth helmet with photograph to listen to audio. I noticed that after a while (more than a couple of songs but less than a whole album) the audio would become very choppy.

If I stopped playback and started it again, playback would be normal, but then it would fairly quickly become choppy again. The amount of time it took to get choppy seemed to get shorter and shorter - initially I was able to listen to a whole song, but before too long I would stop playback and then start playback again only for the audio to become choppy within a few (<30) seconds.

After this, the app seems to have crashed. Unfortunately since I was on my bike I couldn't see the screen and I can only provide very limited detail. I tried stopping and restarting playback a bunch of times and also seeking back and forwards but had no audio at all. When I stopped and looked at my device, the app wasn't running and the widget on the homescreen was just black.

I'm sorry about the limited detail but as I say I was out on my bike and couldn't see the screen or spend any time debugging. I'd encourage you to try listening for an extended period on a set of bluetooth headphones to see if you see a similar problem. For what it's worth, my helmet is a Sena Stryker bluetooth helmet which presents itself to the device as a regular bluetooth headset. I've never had any problem with it playing audio with other devices/software (and yesterday after experiencing issues I switched to different audio software and was able to listen to music for about 90 mins with no issues at all)

Steps to reproduce the bug

I am not sure whether this will reliably reproduce the issue, but I have tried it once and had the issue once:

  • connect a bluetooth headset (or motorcycle helmet)
  • try to listen to a play queue with ~3 albums in it
  • stop and start music when audio becomes choppy. do this perhaps a dozen times. note that it gets worse and then crashes

Environment

Android 10, I probably posted more info on my other bug reports (or happy to provide if relevant, just ask)
phonograph dev preview build (testing fixes for other bugs)

App version:     1.8.5-dev3 (with fixes for other bugs)
Android version: 10 (API 29)
Architecture:    arm64-v8a, armeabi-v7a, armeabi
Soc:             mt6771/g61v71c2k_dfl_eea 
Device brand:    Unihertz (by A-gold)
Device model:    Titan_EEA/Titan (code Titan)
Build version:   Titan_EEA_20221117
                 (root.20221117.200449)
Language:        en
Memory:          2135/5764 
Screen:          1436x1432 (dpi 400)
Permissions:     Storage(READ WRITE)

Screenshots or Screen recordings

No response

Other helpful information

No response

@AntiSol AntiSol added the Bug Bugs. Crashes or something isn't working label Nov 4, 2024
@chr56
Copy link
Owner

chr56 commented Nov 4, 2024

I wonder whether this is a problem of hardware or operate system or not.

@AntiSol
Copy link
Author

AntiSol commented Nov 4, 2024

I'm extremely dubious about that - as mentioned, after having this issue I switched to a different audio player and proceeded to listen to audio with zero problems for over 90 minutes.

@chr56
Copy link
Owner

chr56 commented Nov 4, 2024

I see. This is tricky.

@AntiSol
Copy link
Author

AntiSol commented Nov 4, 2024

yeah I bet it is. Sorry!
have you tried listening via a BT headset for an extended period?

@chr56
Copy link
Owner

chr56 commented Nov 4, 2024

I use Bluetooth headset as well. Also I listen for hours once before.

For problems of Choppy audio, I can barely see three possible reasons:

  1. Bluetooth transmission degression (most possible reason)
    For some reasons, the Bluetooth connection become unstable, like leaving device too far, or interference with other radio signals, making some loss of data transmission (chopped audio). For your circumstance, did you pass some "large radio transmitters" or else when you riding?
  2. Performance regression
    For some reasons, performance of processing (including demux audio files, decode compressed audio, transmits to audio output device etc.) gets regression, making it "lagged" when listening. This could be caused by various reasons, e.g. sudden device performance drops (e.g. over-heated, causing processor performance regression). What's your device's status?
  3. Other random reasons
    From hardware to software, any random fault, rare and hard to reproduce, could be happened. (maybe yours it is!)

I meet the choppy BT audio only when I leaving device too far, so long.

Besides, currently Phonograph Plus put entire process of audio demuxing&decoding&playing etc, to Android OS to handle (There is some plans of doing it by own, but to be completed looks very far from now. And it is little off-topic). So this is maybe not Phonograph Plus's fault at all.


I firstly need more concrete evidences that this is not rare and could be reproducible or frequently occur, and other concrete evidences that other player may or may never meet this problem. Also, more information.


By the way, I am busy this week for other stuffs beyond, and maybe entire month.
This issue is in a lower priority. And I may not handle or reply instantly. :)

@chr56 chr56 added the Need More Info More information are required to solve this issue label Nov 4, 2024
@AntiSol
Copy link
Author

AntiSol commented Nov 5, 2024

For some reasons, performance of processing (including demux audio files, decode compressed audio, transmits to audio output device etc.) gets regression, making it "lagged" when listening. This could be caused by various reasons, e.g. sudden device performance drops (e.g. over-heated, causing processor performance regression). What's your device's status?

I was going to suggest that high CPU usage could also cause choppy audio. When this happens for me, I am:

  • running OsmAnd+, which is rendering maps from OSM data and also recording GPS tracks
  • also playing audio with phonogaph plus via bluetooth
  • but: remember that my library is about 10k songs, and due to this i see some significant performance issues with phonograph, e.g I mentioned album art being very slow to load or not loading at all.

However:

  • the device was otherwise working fine
  • I have done this on my old (10+ years old) phone for years (albeit with a smaller audio library of only about 5k songs, and using the built-in lineageos music player) with no problem. Also I switched to using auxio and the problem instantly and permanently went away. I'd be curious to hear an explanation of how that could be that doesn't involve some issue with phonograph.

did you pass some "large radio transmitters" or else when you riding?

No. This happened gradually over the course of about 50km. It seems to me you have not noted some of the nuance of my description of the problem:

  • this started after listening for some time (less than a whole album, more than 1 song)
  • stopping and restarting playback (NOT disconnecting and reconnecting the headset) resolved the issue temporarily
  • this got progressively worse and worse, to the point that stopping and restarting playback only solved it for ~10 seconds
  • then the app crashed
  • Perhaps most importantly, switching to a different player (auxio) resolved the issue immediately and permanently, and I used that software to listen to music for over 90 mins

I firstly need more concrete evidences that this is not rare and could be reproducible or frequently occur

I told you that I've tried using phonograph once via BT, and 100% of those times this issue occurred.

and other concrete evidences that other player may or may never meet this problem

I told you (multiple times now) that switching to another player fixed it. I don't know how much more concrete evidence that the issue lies with phonogaph you could want.

I'm not likely to be able to help very much to reproduce the issue because of the nature of my usage - I need reliable audio while I'm riding, and I can't do anything to configure my device while I'm moving - if I have to open the app or switch to another program it means finding a safe place to stop, stopping, taking off my gloves, taking out my phone, etc - quite inconvenient when I'm travelling somewhere. never takes less than about 5 minutes. It was very inconvenient when the app crashed and I couldn't listen to music. So I am most likely to simply use a different audio player. Maybe I can try if I'm going to be out somewhere on a shorter ride, but music is important to me when I ride.

I'd suggest trying to listen via buetooth more, perhaps while also having the cpu at high usage and/or in combination with a large library to see if you can replicate it. Meanwhile I'll likely have to switch to a different player for my regular usage :'(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Bugs. Crashes or something isn't working Need More Info More information are required to solve this issue
Projects
None yet
Development

No branches or pull requests

2 participants