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

Audio is silent after each song change #1081

Open
btouellette opened this issue Nov 16, 2021 · 9 comments
Open

Audio is silent after each song change #1081

btouellette opened this issue Nov 16, 2021 · 9 comments

Comments

@btouellette
Copy link

Audio is silent after each song change. Audio resumes if I seek within the song but only until the next song change at which point it goes silent again.

Android SDK: 31
Device Model: Pixel 6
Device Name: Google oriole
ROM: SD1A.210817.036
Build Number: 205

@sserenade
Copy link

Same here on a Pixel 6 Pro. Android 12.

dSub version: 5.5.2

logs don't seem too useful, I get a "failed to save in media store" issue that may be unrelated. dSub has all permissions it asks for.

2021-11-20 17:10:26.564 22657-22747/github.daneren2005.dsub W/DownloadFile: Failed to save in media store
    java.lang.UnsupportedOperationException: Unknown or unsupported URL: content://media/external/audio/albumart/-1085193394
        at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:174)
        at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:142)
        at android.content.ContentProviderProxy.query(ContentProviderNative.java:481)
        at android.content.ContentResolver.query(ContentResolver.java:1219)
        at android.content.ContentResolver.query(ContentResolver.java:1151)
        at android.content.ContentResolver.query(ContentResolver.java:1107)
        at github.daneren2005.dsub.service.MediaStoreService.insertAlbumArt(MediaStoreService.java:172)
        at github.daneren2005.dsub.service.MediaStoreService.saveInMediaStore(MediaStoreService.java:85)
        at github.daneren2005.dsub.service.DownloadFile.saveToStore(DownloadFile.java:365)
        at github.daneren2005.dsub.service.DownloadFile.access$1400(DownloadFile.java:43)
        at github.daneren2005.dsub.service.DownloadFile$DownloadTask.doInBackground(DownloadFile.java:504)
        at github.daneren2005.dsub.service.DownloadFile$DownloadTask.doInBackground(DownloadFile.java:410)
        at github.daneren2005.dsub.util.BackgroundTask$Task.execute(BackgroundTask.java:208)
        at github.daneren2005.dsub.util.BackgroundTask$Task.access$300(BackgroundTask.java:194)
        at github.daneren2005.dsub.util.BackgroundTask$TaskRunnable.run(BackgroundTask.java:319)
        at java.lang.Thread.run(Thread.java:920)

If I let the app keep playing, the next song is shown, and the "time playing" on the left can exceed the total song time on the right. The song doesn't change for me automatically after the first. Manually skipping restarts audio.

@sserenade
Copy link

I did a bit more debugging, and while I'm unable to pinpoint what's wrong, in my case it seems to involve pre-caching upcoming tracks and potentially server-side transcoding. So, disclaimer, these results seem oddly inconsistent in my testing and might be difficult to replicate.

  1. In my experience, this only seems to affect files that aren't transcoded by the server. For example, .flac files are unaffected because they are transcoded to mp3 320.
  2. If I set "Songs to preload" to a non-zero value, it results in this bug. If I set it to 0, the bug doesn't happen.
  3. Separately, if I force .mp3 files to get run through ffmpeg on the server, no matter how many I cache, the bug doesn't happen.

Given all this, it's also very odd that it seems to have manifested on Android 12 for me. This did not happen on 11.

Doing a mediainfo diff on an .mp3 that has been run through ffmpeg, it looks like some metadata is added, perhaps this "fixes" the file in some way that helps with playing it?

My server is Airsonic 10.6.2-RELEASE.

@resinbeard
Copy link

resinbeard commented Nov 26, 2021

also seeing this on my navidrome server version 0.43.0 (d9f26826), pixel 6 pro

i noticed:
moving the playhead with my finger is enough to get audio back

@nemogoc
Copy link

nemogoc commented Dec 16, 2021

Also seeing this on a pixel 6 with stock subsonic server

@groumfi
Copy link

groumfi commented Feb 16, 2022

Also occur on my Blackview Tab 6 Android 11 but only when using bluetooth
Setting "Songs to preload" to 0 as suggested by sserenade is valid workaround
However, once all songs are loaded (after being played), if I play again, the issue is back
Strange thing is that it does not happen when in offline mode...
Last, I've tried to downgrade Dsub to many previous versions (down to 4.x) and issue is still present
Does not occur on my Samsung Note Android 10
Does not occur with Subsonic official client or Substreamer or Ultrasonic

@SoSquidTaste
Copy link

Chiming in that I just observed this on a Pixel 6 running the latest Android 12L Beta build

@g4njawizard
Copy link

Same here with Pixel 6 Pro & Navidrome.
I usually have my Server offline to safe power and cache all Songs on my phone. This does not occur on my GF's Samsung Galaxy S10+ using my Navidrome Server or cached offline files.
Odd is also that when I close Dsub, it doesn't stop playing. I have to "Force Shutdown" the App.
@sserenade 's workaround with "disable preload" didn't work for me. I still get random silence when shuffling thru my playlists.

@NewEvolution
Copy link

NewEvolution commented Aug 31, 2022

Another confirmation on Pixel 6/Navidrome.

Of note that I haven't seen mentioned - hitting the "previous" button to restart the song, either in-app or on a connected Bluetooth device, causes playback to resume until the next song change.

e: Newer issue #1122 suggested Settings > playback > Gapless Playback > uncheck it
This & a subsequent relaunch of the app resolved the issue for me.

@kindlydodo
Copy link

Same problem here. The workaround (unselect Gapless Playback) did not work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants