chore: more debug output of states

This commit is contained in:
2026-03-22 23:58:40 +01:00
parent 45b1003c9a
commit 3fe10a914a
3 changed files with 22 additions and 2 deletions

View File

@@ -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?

View File

@@ -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;
}

View File

@@ -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() {