Open anonym24 opened 7 years ago
@anonym24 Hi. Thank you for the issue report.
I have tweaked some parameters and try the following branch code 😉
Yeah I see the difference (I compiled one project with current library and one with library from feature/improve_play_pause_response)
In previous library the biggest delay before pause had HybridMediaPlayerFactory (OpenSLMediaPlayerFactory was faster). Now I see that with the latest modified library it became much better (Standard MediaPlayer still has the fastest response)
switch (type) {
case MediaPlayerStateStore.PLAYER_IMPL_TYPE_STANDARD:
mFactory = new StandardMediaPlayerFactory(mContext);
break;
case MediaPlayerStateStore.PLAYER_IMPL_TYPE_OPENSL:
mFactory = new OpenSLMediaPlayerFactory(mContext) {
@Override
protected int getMediaPlayerOptions () {
return 0;
}
};
break;
case MediaPlayerStateStore.PLAYER_IMPL_TYPE_HYBRID:
//mFactory = new HybridMediaPlayerFactory(mContext);
mFactory = new HybridMediaPlayerFactory(mContext) {
@Override
protected int getMediaPlayerOptions () {
return 0;
}
};
break;
}
Thanks!
Are you going to push this change to new version?
Pause/resume working not instantly when I press pause/resume button. So for example it has a little delay before it pauses after I pressed my pause button. No such delay with default Android MediaPlayer, also apps like PowerAmp, AIMP don't have this problem.
I already use this solution to disable smooth fading, but this is quite another problem when it just works not fast as wanted