After calling audioSink renderToEndOfStream, the sound immediately stops
After calling audioSink renderToEndOfStream, the sound immediately stops in vivo Y300i. can I delay call renderToEndOfStream.
@Override
protected void renderToEndOfStream() throws ExoPlaybackException {
try {
if (!audioSink.hasPendingData()) {
audioSink.playToEndOfStream();
}
} catch (AudioSink.WriteException e) {
throw createRendererException(
e, e.format, e.isRecoverable, PlaybackException.ERROR_CODE_AUDIO_TRACK_WRITE_FAILED);
}
}
Can I add hasPendingData judgment.
@lsgfly
If you could please provide complete information as requested in the issue template. The issue template can
be found here. If you're unable to share bug reports or test content publicly, please send them to [email protected] with the subject Issue #2897. Please also update this issue to indicate you've done this.
ExoPlayer by default sets up the AudioTrack in STREAM_MODE and so calling stop() on the audioTrack will stop playing audio after the last buffer that was written has been played. It should not stop immediately.
With the information in the template, we can understand which version of ExoPlayer you are using, whether you are able to reproduce this using the demo application, etc. A bug report would be very helpful in reporting logs showcasing the potential issue.
Please update this ticket when you have provided the requested information.
Hey @lsgfly. We need more information to resolve this issue but there hasn't been an update in 14 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
Since there haven't been any recent updates here, I am going to close this issue.
@lsgfly if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.