startRecording method

Future<bool> startRecording({
  1. int? sampleRate,
  2. int? channels,
  3. int? bitDepth,
  4. String? title,
})

Starts recording the audio that's currently playing.

Optional parameters:

  • sampleRate: Sample rate in Hz (default: 44100)
  • channels: Number of audio channels (default: 2)
  • bitDepth: Bit depth (default: 16)
  • title: Optional title for the recording

Returns true if recording started successfully, false otherwise.

Implementation

Future<bool> startRecording({
  int? sampleRate,
  int? channels,
  int? bitDepth,
  String? title,
}) {
  return MymediaPlatform.instance.startRecording(
    sampleRate: sampleRate,
    channels: channels,
    bitDepth: bitDepth,
    title: title,
  );
}