Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
d3alek committed Nov 20, 2013
1 parent f8ec447 commit 8f551b5
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/com/twobigears/circlesynth/SynthCircle.java
Expand Up @@ -1137,6 +1137,8 @@ public void updateCircles(float mX, float mY) {
int checkdelete;
int fxcheckdelete;

private static float mSavedPlayState = 0;

/**
* This is where the magic happens. All touch events are sent here, and then
* worked on accordingly.
Expand Down Expand Up @@ -1329,8 +1331,21 @@ public void bpmChanged(int t) {
PdBase.sendFloat("pd_bpm", bpm);
}

@Override
protected void onPause() {
PdBase.sendFloat("pd_playToggle", 0);
if (toolbar.playToggleB.isEnabled) {
mSavedPlayState = 1;
}
else {
mSavedPlayState = 0;
}
super.onPause();
}

@Override
protected void onResume() {
PdBase.sendFloat("pd_playToggle", mSavedPlayState);
super.onResume();
}

Expand Down

0 comments on commit 8f551b5

Please sign in to comment.