summaryrefslogtreecommitdiff
path: root/core/src
diff options
context:
space:
mode:
authorByteHamster <info@bytehamster.com>2022-01-22 18:17:11 +0100
committerByteHamster <info@bytehamster.com>2022-01-22 19:46:08 +0100
commit3393bcdf350f60d006ce0de61d769f513490db82 (patch)
treef27b9434aa65321e8663e6719abd30b5386a9d3f /core/src
parent3b9dfb3c76a0004a5c7f7836214a1ed71a264683 (diff)
downloadAntennaPod-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.java2
-rw-r--r--core/src/main/java/de/danoeh/antennapod/core/util/playback/AudioPlayer.java6
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
}