Closed naveensingh closed 1 year ago
this also ends songs quicker if there is no music in the end, not sure if thats the expected behaviour? Like a song long 5:12 ends at 5:09 if nothing plays already.
I think the previous way of gapless playback is the expected one
this also ends songs quicker if there is no music in the end, not sure if thats the expected behaviour? Like a song long 5:12 ends at 5:09 if nothing plays already.
that's why it's called skip silence :)
I think the previous way of gapless playback is the expected one
That part works as expected and is enabled by default, We can not really disable this seamless transition between tracks without adding some delay for delay's sake. Skip silence is optional and not required for gapless playback. That's what this comment was all about. Whether we still wanna keep the switch or repurpose it since it is redundant now.
lets disable skipping silence, keep just the old gapless playback. Not sure if this PR is needed for it at all then.
right but what about the preference? What's it gonna do now?
work just as previously, it doesnt need change
I think I need to clarify this further:
How gapless playback worked before:
With the Android media player, it took like a second or two before the next track could start so it wasn't very seamless. When people requested gapless playback, I used two media player instances and called firstMediaPlayer.setNextMediaPlayer(nextMediaPlayer)
to transition to the next track as seamlessly as possible. This allowed seamless transition between tracks. But I'd seen reports in other apps that setNextMediaPlayer()
is not very reliable, so I disabled it by default and added a preference named Gapless playback that users can enable if they want to.
How it works now:
With media3 changes, the MediaPlayer was replaced with google's ExoPlayer, and ExoPlayer transitions between tracks as seamlessly as possible. There is no on/off button for gapless playback now and the preference is now redundant.
Note: This seamless transition is not truly gapless, it wasn't that truly gapless before either. True gapless playback will require more work/research.
you had some sample audio files before that connect to each other, are you using it for testing?
yes, this time I tested using a sine wave tone split into multiple parts, it works better for testing. Here it is: tone.zip
I always notice a slight crack/pop noise during the transition on the phone speaker but not on Bluetooth, in both media player and exoplayer versions. It's not noticeable when playing actual gapless albums like the dark side of the moon
ok, lets use the new skip silence then, but keep the old string. Will see what feedback we get.
ok then I'll close the other https://github.com/SimpleMobileTools/Simple-Music-Player/pull/593 PR, This one should be merged though so that we only trim silence at the start/end
alright thanks, that should be good
This ensures we don't skip any short pauses in the middle of a track.