diff --git a/TODO.md b/TODO.md index d2972fa..1b20f40 100644 --- a/TODO.md +++ b/TODO.md @@ -1,5 +1,10 @@ ## TODO +* PlaybackEngine - Buffer overrun on output for channel (1.000000) + - we are feeding too much data into 'stretcher' + +* E attributionTag not declared in manifest of at.lockstep + * analyze the (secondly or so) noise beeps in the mp3 playback - introduced with this commit - is it librubberband, my failure to feed it properly (buffer exhaustion), or sth else? diff --git a/app/src/main/java/at/lockstep/app/LstForegroundService.java b/app/src/main/java/at/lockstep/app/LstForegroundService.java index ff84897..7aed02f 100644 --- a/app/src/main/java/at/lockstep/app/LstForegroundService.java +++ b/app/src/main/java/at/lockstep/app/LstForegroundService.java @@ -63,6 +63,8 @@ public class LstForegroundService extends Service implements SensorEventListener public void onCreate() { super.onCreate(); + Log.i("LstForegroundService", "onCreate()"); + int resid = R.raw.track_beat; PlaybackEngine.create(this, resid); stepDetector = new StepDetector(PlaybackEngine.getEngineHandle()); @@ -89,6 +91,8 @@ public class LstForegroundService extends Service implements SensorEventListener if (intent != null) { String action = intent.getAction(); if (ACTION_START.equals(action)) { + Log.i("LstForegroundService", "onStartCommand() ACTION_START"); + String contentUri = intent.getStringExtra("content_uri"); try { if(contentUri != null) { @@ -101,6 +105,7 @@ public class LstForegroundService extends Service implements SensorEventListener } startCollection(contentUri); } else if (ACTION_STOP.equals(action)) { + Log.i("LstForegroundService", "ACTION_STOP"); stopCollectionAndSelf(); } } @@ -200,6 +205,7 @@ public class LstForegroundService extends Service implements SensorEventListener @Nullable @Override public IBinder onBind(Intent intent) { + Log.i("LstForegroundService", "onBind()"); return binder; } diff --git a/app/src/main/java/at/lockstep/app/MainActivity.java b/app/src/main/java/at/lockstep/app/MainActivity.java index 83563c9..85503cd 100644 --- a/app/src/main/java/at/lockstep/app/MainActivity.java +++ b/app/src/main/java/at/lockstep/app/MainActivity.java @@ -118,6 +118,16 @@ public class MainActivity extends AppCompatActivity implements LstForegroundServ protected void onStop() { super.onStop(); unbindService(conn); + Log.i("MainActivity", "onStop()"); + } + + @Override + protected void onDestroy() { + super.onDestroy(); + Log.i("MainActivity", "onDestroy()"); + + // TODO: since the Service keeps running, we must signal oboe to stop playing + // TODO: signal the pause to the C++ lib } private boolean isForeground = false; @@ -125,10 +135,9 @@ public class MainActivity extends AppCompatActivity implements LstForegroundServ protected void onPause() { super.onPause(); isForeground = false; - // TODO: since the Service keeps running, we must signal oboe to stop playing - // TODO: signal the pause to the C++ lib // // telltale signs: logcat: "PlaybackEngine - Buffer overrun on output for channel (0.000000)" or (1.000000) + Log.i("MainActivity", "onPause()"); } @Override protected void onResume() {