Closed erdnx closed 6 days ago
This can be catched by doing a check for incoming data
void addAudioData(Uint8List audioData) {
_buffer.add(audioData);
_resetInactivityTimer();
}
void _resetInactivityTimer() {
_inactivityTimer?.cancel();
// pausing?
_inactivityTimer = Timer(Duration(milliseconds: inactivityTimeout), () {
getIt<RecorderBloc>()
.add(SpawnRecorderError(RecorderError.bluetoothError));
});
}
-> on alarm u can just pause, and resume, by user input -> audio source change (eg. bluetooth) pauses, but resume doesnt work (probably would have to create new recorder)
5.1.2
Environment
Describe the bug
When an interruption occurs (alarm, phone call, etc.), the internal recorder pauses, but this package's recorder assumes it is still recording. When you pause and resume recording, it actually continues to record. The problem is that the package's recorder reports the wrong state. It reports that it is recording while it is actually paused.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
When an interruption happen, it may be alarm, phone call or other media action, recorder should be aware what is the actual state of recorder.