startRecordingFd method

  1. @override
int startRecordingFd(
  1. int fd
)
override

Same as startRecording, but writes through an already-open file descriptor instead of a path — for destinations with no plain filesystem path available, e.g. Android's public Downloads folder via MediaStore (see core_rtlsdr's RecordingController.startRecordingToDownloads).

Implementation

@override
int startRecordingFd(int fd) {
  final status = _consumeStatus();
  if (status == 0) {
    _recording = true;
    recordingFd = fd;
  }
  return status;
}