예제 #1
0
 @Override
 protected void onPause() {
   super.onPause();
   if (pdman != null) pdman.onPause();
   if (wl != null && wl.isHeld()) wl.release();
   if (frag != null) frag.onPause();
 }
예제 #2
0
 public void runSequencer(boolean setup, boolean fragmentTransaction) {
   // Log.d("PDActivity", "Running sequencer");
   hideBoth();
   if (frag != null) {
     // Log.d("PDActivity", "Backgrounding current");
     frag.background();
   }
   frag = sequencer;
   if (setup) {
     // Log.d("PDActivity", "Setting up sequencer");
     frag.setup();
   }
   if (fragmentTransaction) {
     FragmentManager man = this.getFragmentManager();
     FragmentTransaction trans = man.beginTransaction();
     removeTheremin(trans);
     addSequencer(trans);
     trans.commit();
   }
 }
예제 #3
0
  @Override
  public void setup() {
    hint(DISABLE_DEPTH_TEST);
    hint(DISABLE_OPENGL_ERRORS);
    hint(PApplet.DISABLE_OPTIMIZED_STROKE);
    hint(PApplet.DISABLE_DEPTH_MASK);
    hint(PApplet.DISABLE_DEPTH_SORT);
    frameRate(60);

    mtManager = new MTManager();
    mtManager.addTouchListener(this);

    asyncSetup.execute(new Void[0]);
    debug();
    if (frag != null) frag.setup();
  }
예제 #4
0
  @Override
  protected void onResume() {
    super.onResume();
    PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE);
    wl = pm.newWakeLock(PowerManager.SCREEN_DIM_WAKE_LOCK, "PlasmaSoundHDLock");
    wl.acquire();
    if (loadingview == null)
      loadingview = this.findViewById(com.rj.processing.plasmasound.R.id.loadingview);
    loadingview.setVisibility(View.VISIBLE);
    if (pdready == true) {
      pdready = false;
      if (pdman != null) pdman.onResume(readyrunnable);
    }
    readSettings();

    checkAndRemindThemToGiveMeAGoodRating();
    checkAndGiveThemATutorial();
    if (frag != null) frag.onResume();
  }
예제 #5
0
 @Override
 public void presetChanged(JSONObject preset) {
   if (frag != null) frag.presetChanged(preset);
 }
예제 #6
0
 @Override
 public void draw() {
   if (frag != null) frag.draw();
 }
예제 #7
0
 @Override
 public void touchUp(final Cursor c) {
   if (frag != null) frag.touchUp(c);
 }
예제 #8
0
 /** override to select a custom menu * */
 private int getMenu() {
   if (frag != null) return frag.getMenu();
   else return com.rj.processing.plasmasound.R.menu.main_menu;
 }