-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Intermittent Distorted Audio #571
Comments
Sorry but v3.0.0 was never released on F-Droid 🤨 |
Apologies, I did download the APK from the GitHub releases. Strangely, it doesnt seem to be having audio issues at the moment. Ill reopen this issue if it returns. |
Please re-open as I am having the exact same issue: audio is distorted when left playing in the background and the screen turns off. I am using Spotube 3.1.1 from F-droid. I double checked the app battery settings and it is set to "unrestricted". My OS is Android OSP 13 (GrapheneOS) on a Google Pixel 6 Pro. |
Not sure if this is related to updating to Android 14 or not but updating to 3.2.0 seems to bring this issue back. 3.1.x was working fine for me until now. Anyone else having the same issue? |
I just tried both 3.1.2 and 3.2.0 and neither works for me. After a minute of being idle, the sound starts glitching. The only "workaround" I've found is to run some other program that keeps the CPU from going into a low power state. |
By the way, harmonoid does not have this problem on my phone. |
I have this issue on a Pixel 6a / Android 14 using both the current version on the Google store (3.2.0) and the current version on F-Droid. |
@jriano Are you running the Google version of Android or something like GrapheneOS? |
I am using the Google version of Android.
…On Sat, Nov 4, 2023, 22:19 hackerb9 ***@***.***> wrote:
I have this issue on a Pixel 6a / Android 14
@jriano <https://github.com/jriano> Are you running the Google version of
Android or something like GrapheneOS?
—
Reply to this email directly, view it on GitHub
<#571 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAD364YSZT3DRCXVB33YUR3YC3ZSRAVCNFSM6AAAAAA2GLAH2OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJTGYYTCMBWGE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Thanks. So now we know that the problem occurs on Pixel 6 devices regardless of OS. Additionally, another app which uses the same Flutter library for playing sound (Harmonoid) does not have the same issue, so the bug is almost certainly in Spotube. |
I have a same issue on those environments:
Both have a same version of Spotube (3.4.0) and installed via Google Play appstore, and battery optimization is off for the app. Currently I'm listening music via Bluetooth earbud (Galaxy Buds 2 Pro) and maybe this can be a reason...? I'm going to use the app via wired earphones today to find out whether wireless earphones makes the problem. |
Strangely, I've noticed recently that this only happens without any Bluetooth devices connected, and audio is playing directly through the phones speakers. Having tested audio on two bluetooth headsets for a couple hours, there has been no distorted audio through them. |
I am also experimenting intermittent distorted audio on my Pixel 6, running Android 14 (Official Build UQ1A.240105.002), specifically when playing content directly through the phone speakers (no distortions occur when using Bluetooth audio devices). I've tried to troubleshoot the issue, but unfortunately, I have been successful. Here's a list of what I've tried so far in case it can provide any insights for debugging:
|
…s off. Not familiar with libmpv, but seems to favor audiotrack audio output over opensles. KRTirtho#571
I looked into this issue and into Harmonoid as suggested by @hackerb9. Here's what I found. Please correct me on any inaccuracy. Both Harmonoid and Spotube use ryanheise/audio_service, but that's only for the background service and lock screen visual. The audio stack are different, at least in Spotube 3.4.
Maybe we could detect available audio sinks from libmpv and offer the selection in the settings? I didn't look into that. My change seems fairly safe as OpenSL ES is the fallback if AudioTrack is not available, but it would be nice if someone else with the issue could test on their device. I'll post video of the issue and the fix when I can. By the way, when the audio issue occurs, logcat gets spam with a bunch of: |
Here are videos for reference. Sorry for the quality, the issue was not reproducible unless using the speaker Pixel6.Issue.mp4Pixel6.Fix.small.mp4 |
Sorry for the really late reply 😓
I used just_audio before, but the desktop support for it wasn't good enough. So I partially started using media_kit for Spotube and eventually media_kit was stable enough for Mobile too, and it generally works better now. (Initially, Spotube was in fact using mpv's IPC to play music in desktop through mpv_dart). So I removed just_audio for all platforms and currently have no plans to add it back |
…ion id (#1221 & #1247) * this change fixes the garbled audio on my Pixel 6a while the screen is off. Not familiar with libmpv, but seems to favor audiotrack audio output over opensles. #571 * get audio session id, send it to AudioTrack in libmpv, broadcast it to other apps. Fixes #1221 --------- Co-authored-by: Kingkor Roy Tirtho <[email protected]>
The PR made by @olivier2 has been merged and should be available in nightly (10-20mins after this comment). |
It's not working for me: only black screen after accepted music and audio files on Android 14 Pixel 6 Pro. Thanks!! |
I have the same with the nightly. Black screen after permission dialog box. |
Didn't feel right to open an issue for a nightly build, so started this discussion with the content of the spotube log. |
Hi, I've installed the latest nightly build (~ e6a20b5 ) and it seems that this audio issue has gone so far in my environments:
Thank you @olivier2 so much!
|
Thanks and good job !! Sound trouble also gone for me with this nightly. Pixel 6 Pro. |
Closing it as it's fixed. Thanksto @olivier2 |
…ion id (#1221 & #1247) * this change fixes the garbled audio on my Pixel 6a while the screen is off. Not familiar with libmpv, but seems to favor audiotrack audio output over opensles. KRTirtho/spotube#571 * get audio session id, send it to AudioTrack in libmpv, broadcast it to other apps. Fixes KRTirtho/spotube#1221 --------- Co-authored-by: Kingkor Roy Tirtho <[email protected]>
Is there an existing issue for this?
Current Behavior
When screen backlight times out and locks screen automatically and audio continues to play in tbe background, audio distorts at random times throughout. Even with other songs in the playlist.
E.g. suddenly voices and instruments turn high pitched and back to normal.
Expected Behavior
Audio to play with no issues when screen timeout expires and phone locks automatically.
Steps to reproduce
Operating System
Android (GrapheneOS)
Spotube version
3.0.0
Installation source
F-Droid (Android)
Additional information
GrapheneOS build version:
TQ3A.230705.001.2023070500
The text was updated successfully, but these errors were encountered: