Description
openedon Dec 7, 2022
As the title suggests, I am puzzled by the phenomenon that when the video is paused in the last 8 seconds of the video, the video stops, but the audio continues to play.
This is caused by using the following function and setting the parameter to True
DefaultRenderersFactory(context).setEnableAudioTrackPlaybackParams(true)
Will not occur if setEnableAudioTrackPlaybackParams
is given false
I want to avoid settingEnableAudioTrackPlaybackParams
to false because it slows down the playback speed switching.
Is there any way to keep setEnableAudioTrackPlaybackParams
true and still have the audio stop playing correctly?
I have followed the behavior and I think the problem is that audioTrack.pause()
is not called in the following implementation
file:DefaultAudioSink.java
@Override
public void pause() {
playing = false;
if (isAudioTrackInitialized() && audioTrackPositionTracker.pause()) {
audioTrack.pause();
}
}
audioTrackPositionTracker.pause
returns false
I apologize if I offended you because I use a translation website.