SimpleMobileTools / Simple-Music-Player

A clean music player with a customizable widget, stylish interface and no ads.
https://www.simplemobiletools.com
GNU General Public License v3.0
1.28k stars 406 forks source link

Replace gapless playback with skip silence #593

Closed naveensingh closed 1 year ago

naveensingh commented 1 year ago

Since exoplayer transitions between media items as seamlessly as possible, we don't need a switch for it (it works as well as the previous MediaPlayer.setNextMediaPlayer implementation). The skip silence feature trims any silence in the audio stream, not just at the start/end hence putting gapless playback there is a little misleading.

If we don't want to add such a feature, we can remove the preference and category.

Sidenote: True gapless playback (absolutely zero gaps) is possible in exoplayer but we don't really want to complicate things using concatenated media sources.

tibbi commented 1 year ago

from the users perspective Skip silence makes no sense, lets keep the old string even if you change the functionality

naveensingh commented 1 year ago

Yes, that was the plan. I added skip silence as an extension of gapless playback but then I realized this problem: The skip silence feature trims any silence in the audio stream, not just at the start/end

That means when playing some music with a tune like SILENCE_DRUM_SILENCE_DRUM_SILENCE, the silent part is always skipped (including the one in the middle) and that's not a feature of gapless playback. I wasn't actively researching or trying to tweak it but there is a related open issue: https://github.com/google/ExoPlayer/issues/7423

We have the following options then:

naveensingh commented 1 year ago

The skip silence feature trims any silence in the audio stream, not just at the start/end

Please ignore my previous comment, I'm gonna fix this instead of renaming the preference

naveensingh commented 1 year ago

New PR here: https://github.com/SimpleMobileTools/Simple-Music-Player/pull/595 I'll close this one.

naveensingh commented 1 year ago

Closed in favor of #595