docs: some more debug prints, for cleanup diag
This commit is contained in:
@@ -184,6 +184,8 @@ void PlaybackEngine::mapChannels(int *channel_map, int num_ch_in, int num_ch_out
|
|||||||
}
|
}
|
||||||
|
|
||||||
void PlaybackEngine::musicFeedThread() {
|
void PlaybackEngine::musicFeedThread() {
|
||||||
|
LOGI("starting musicFeedThread()");
|
||||||
|
|
||||||
// strecher num channels: same as output num channels
|
// strecher num channels: same as output num channels
|
||||||
// (this is because we play silence even without any input file, so we cannot set stretcher
|
// (this is because we play silence even without any input file, so we cannot set stretcher
|
||||||
// channel count for the music file's channel count)
|
// channel count for the music file's channel count)
|
||||||
@@ -299,15 +301,19 @@ void PlaybackEngine::musicFeedThread() {
|
|||||||
stretcher.process(buf_ptr, num_decoded_samples, false);
|
stretcher.process(buf_ptr, num_decoded_samples, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LOGI("musicFeedThread() exiting ...");
|
||||||
|
|
||||||
free(buf);
|
free(buf);
|
||||||
free(buf_ptr);
|
free(buf_ptr);
|
||||||
free(cbuf);
|
free(cbuf);
|
||||||
free(channel_map);
|
free(channel_map);
|
||||||
|
|
||||||
|
LOGI("musicFeedThread() exited.");
|
||||||
}
|
}
|
||||||
|
|
||||||
PlaybackEngine::~PlaybackEngine() {
|
PlaybackEngine::~PlaybackEngine() {
|
||||||
closeRubberBand();
|
|
||||||
LOGI("~PlaybackEngine()");
|
LOGI("~PlaybackEngine()");
|
||||||
|
closeRubberBand();
|
||||||
mPlayer->stopAudio();
|
mPlayer->stopAudio();
|
||||||
delete mPlayer;
|
delete mPlayer;
|
||||||
mPlayer = nullptr;
|
mPlayer = nullptr;
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import android.os.Build;
|
|||||||
import android.os.IBinder;
|
import android.os.IBinder;
|
||||||
import android.os.ParcelFileDescriptor;
|
import android.os.ParcelFileDescriptor;
|
||||||
import android.os.PowerManager;
|
import android.os.PowerManager;
|
||||||
|
import android.util.Log;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
@@ -128,7 +129,7 @@ public class LstForegroundService extends Service implements SensorEventListener
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
startForeground(NOTIFICATION_ID, buildNotification("Collecting sensor data"));
|
startForeground(NOTIFICATION_ID, buildNotification("Lockstep is reading your steps ..."));
|
||||||
|
|
||||||
if (wakeLock != null && !wakeLock.isHeld()) {
|
if (wakeLock != null && !wakeLock.isHeld()) {
|
||||||
// TODO: provide a timeout reasonable for a run
|
// TODO: provide a timeout reasonable for a run
|
||||||
@@ -174,6 +175,8 @@ public class LstForegroundService extends Service implements SensorEventListener
|
|||||||
// TODO: check threading to see if these run in separate threads - if so, deleting PlaybackEngine will leave a dangling pointer in StepDetector.
|
// TODO: check threading to see if these run in separate threads - if so, deleting PlaybackEngine will leave a dangling pointer in StepDetector.
|
||||||
// 2026-03-04 01:26:11.741 12507-12507 libc at.lockstep A Fatal signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0xb4000071d3a79000 in tid 12507 (at.lockstep), pid 12507 (at.lockstep)
|
// 2026-03-04 01:26:11.741 12507-12507 libc at.lockstep A Fatal signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0xb4000071d3a79000 in tid 12507 (at.lockstep), pid 12507 (at.lockstep)
|
||||||
|
|
||||||
|
Log.d("LstForegroundService", "onDestroy(), calling PlaybackEngine.delete()");
|
||||||
|
|
||||||
if(stepDetector != null) {
|
if(stepDetector != null) {
|
||||||
stepDetector.close();
|
stepDetector.close();
|
||||||
PlaybackEngine.delete();
|
PlaybackEngine.delete();
|
||||||
|
|||||||
Reference in New Issue
Block a user