Skip to content

Commit

Permalink
Merge pull request #201 from AShiningRay/only-stop-midi-when-playing
Browse files Browse the repository at this point in the history
PlatformPlayer: Only stop media playback if it is running
  • Loading branch information
recompileorg authored Feb 16, 2024
2 parents 896146a + e6a96db commit 8b9bc8a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/org/recompile/mobile/PlatformPlayer.java
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ public void start()

public void stop()
{
if(!isRunning()) { return; }
midi.stop();
state = Player.PREFETCHED;
tick = midi.getTickPosition();
Expand Down Expand Up @@ -382,6 +383,7 @@ public void start()

public void stop()
{
if(!isRunning()) { return; }
wavClip.stop();
time = wavClip.getMicrosecondPosition();
state = Player.PREFETCHED;
Expand Down

0 comments on commit 8b9bc8a

Please sign in to comment.