llfbandit / record

Audio recorder from microphone to a given file path. No external dependencies, MediaRecorder is used for Android an AVAudioRecorder for iOS.
https://pub.dev/packages/record
233 stars 196 forks source link

It would be very useful for development if the data size of the recording stream could be modified #371

Open TheWash7 opened 2 months ago

TheWash7 commented 2 months ago

When I turn on the recording stream, with the sample rate set to 48000 and the encodert set to pcm16bits.The listening Uint8List DATA duration is fixed at 160ms and I can't modify it, which prevents my programme from doing some fine manipulation of the audio data. If it is possible to modify the size of the audio buffer, this would be very useful for program development.

final stream = await audiorecorder.startStream(
          const RecordConfig(
              encoder: AudioEncoder.pcm16bits,
              sampleRate: 48000,
              numChannels: 1),
        );

        stream.listen(
          (data) {
            sink.add(data);
          },