diff options
author | ByteHamster <info@bytehamster.com> | 2022-01-22 18:17:11 +0100 |
---|---|---|
committer | ByteHamster <info@bytehamster.com> | 2022-01-22 19:46:08 +0100 |
commit | 3393bcdf350f60d006ce0de61d769f513490db82 (patch) | |
tree | f27b9434aa65321e8663e6719abd30b5386a9d3f /core/src | |
parent | 3b9dfb3c76a0004a5c7f7836214a1ed71a264683 (diff) | |
download | AntennaPod-3393bcdf350f60d006ce0de61d769f513490db82.zip |
Make emulator tests a bit more stable
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/main/java/de/danoeh/antennapod/core/service/playback/LocalPSMP.java | 2 | ||||
-rw-r--r-- | core/src/main/java/de/danoeh/antennapod/core/util/playback/AudioPlayer.java | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/playback/LocalPSMP.java b/core/src/main/java/de/danoeh/antennapod/core/service/playback/LocalPSMP.java index 0daa6b483..db6088d8d 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/service/playback/LocalPSMP.java +++ b/core/src/main/java/de/danoeh/antennapod/core/service/playback/LocalPSMP.java @@ -730,6 +730,7 @@ public class LocalPSMP extends PlaybackServiceMediaPlayer { } mediaPlayer.release(); mediaPlayer = null; + playerStatus = PlayerStatus.STOPPED; } isShutDown = true; executor.shutdown(); @@ -836,6 +837,7 @@ public class LocalPSMP extends PlaybackServiceMediaPlayer { } if (media == null) { mediaPlayer = null; + playerStatus = PlayerStatus.STOPPED; return; } diff --git a/core/src/main/java/de/danoeh/antennapod/core/util/playback/AudioPlayer.java b/core/src/main/java/de/danoeh/antennapod/core/util/playback/AudioPlayer.java index c948d98a3..d9f5811e2 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/util/playback/AudioPlayer.java +++ b/core/src/main/java/de/danoeh/antennapod/core/util/playback/AudioPlayer.java @@ -38,7 +38,11 @@ public class AudioPlayer extends MediaPlayer implements IPlayer { @Override public void setPlaybackParams(float speed, boolean skipSilence) { if (canSetSpeed()) { - setPlaybackSpeed(speed); + try { + setPlaybackSpeed(speed); + } catch (Exception e) { + e.printStackTrace(); + } } //Default player does not support silence skipping } |