Skip to content

Commit

Permalink
catch exceptions thrown at setting playback speed
Browse files Browse the repository at this point in the history
  • Loading branch information
tibbi committed Mar 8, 2021
1 parent 12ed227 commit ece6090
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,10 @@ class MusicService : Service(), MediaPlayer.OnPreparedListener, MediaPlayer.OnEr
if (isMarshmallowPlus() && mPlayer != null) {
mPlaybackSpeed = config.playbackSpeed
if (mPlayer!!.isPlaying) {
mPlayer!!.playbackParams = mPlayer!!.playbackParams.setSpeed(config.playbackSpeed)
try {
mPlayer!!.playbackParams = mPlayer!!.playbackParams.setSpeed(config.playbackSpeed)
} catch (ignored: Exception) {
}
}
}
}
Expand Down

0 comments on commit ece6090

Please sign in to comment.