chore: more debug output of states
This commit is contained in:
5
TODO.md
5
TODO.md
@@ -1,5 +1,10 @@
|
|||||||
## TODO
|
## 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
|
* analyze the (secondly or so) noise beeps in the mp3 playback
|
||||||
- introduced with this commit
|
- introduced with this commit
|
||||||
- is it librubberband, my failure to feed it properly (buffer exhaustion), or sth else?
|
- is it librubberband, my failure to feed it properly (buffer exhaustion), or sth else?
|
||||||
|
|||||||
@@ -63,6 +63,8 @@ public class LstForegroundService extends Service implements SensorEventListener
|
|||||||
public void onCreate() {
|
public void onCreate() {
|
||||||
super.onCreate();
|
super.onCreate();
|
||||||
|
|
||||||
|
Log.i("LstForegroundService", "onCreate()");
|
||||||
|
|
||||||
int resid = R.raw.track_beat;
|
int resid = R.raw.track_beat;
|
||||||
PlaybackEngine.create(this, resid);
|
PlaybackEngine.create(this, resid);
|
||||||
stepDetector = new StepDetector(PlaybackEngine.getEngineHandle());
|
stepDetector = new StepDetector(PlaybackEngine.getEngineHandle());
|
||||||
@@ -89,6 +91,8 @@ public class LstForegroundService extends Service implements SensorEventListener
|
|||||||
if (intent != null) {
|
if (intent != null) {
|
||||||
String action = intent.getAction();
|
String action = intent.getAction();
|
||||||
if (ACTION_START.equals(action)) {
|
if (ACTION_START.equals(action)) {
|
||||||
|
Log.i("LstForegroundService", "onStartCommand() ACTION_START");
|
||||||
|
|
||||||
String contentUri = intent.getStringExtra("content_uri");
|
String contentUri = intent.getStringExtra("content_uri");
|
||||||
try {
|
try {
|
||||||
if(contentUri != null) {
|
if(contentUri != null) {
|
||||||
@@ -101,6 +105,7 @@ public class LstForegroundService extends Service implements SensorEventListener
|
|||||||
}
|
}
|
||||||
startCollection(contentUri);
|
startCollection(contentUri);
|
||||||
} else if (ACTION_STOP.equals(action)) {
|
} else if (ACTION_STOP.equals(action)) {
|
||||||
|
Log.i("LstForegroundService", "ACTION_STOP");
|
||||||
stopCollectionAndSelf();
|
stopCollectionAndSelf();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -200,6 +205,7 @@ public class LstForegroundService extends Service implements SensorEventListener
|
|||||||
@Nullable
|
@Nullable
|
||||||
@Override
|
@Override
|
||||||
public IBinder onBind(Intent intent) {
|
public IBinder onBind(Intent intent) {
|
||||||
|
Log.i("LstForegroundService", "onBind()");
|
||||||
return binder;
|
return binder;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -118,6 +118,16 @@ public class MainActivity extends AppCompatActivity implements LstForegroundServ
|
|||||||
protected void onStop() {
|
protected void onStop() {
|
||||||
super.onStop();
|
super.onStop();
|
||||||
unbindService(conn);
|
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;
|
private boolean isForeground = false;
|
||||||
@@ -125,10 +135,9 @@ public class MainActivity extends AppCompatActivity implements LstForegroundServ
|
|||||||
protected void onPause() {
|
protected void onPause() {
|
||||||
super.onPause();
|
super.onPause();
|
||||||
isForeground = false;
|
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)
|
// telltale signs: logcat: "PlaybackEngine - Buffer overrun on output for channel (0.000000)" or (1.000000)
|
||||||
|
Log.i("MainActivity", "onPause()");
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
protected void onResume() {
|
protected void onResume() {
|
||||||
|
|||||||
Reference in New Issue
Block a user