Skip to content

[Android] Audio Recording volume suddenly drops after approximately 3 seconds #404

@azrinsani

Description

@azrinsani

Package version
record: ^5.1.2

Environment

  • OS: Android 13
  • Google Pixel 4

Describe the bug

Audio Recording volume suddenly drop after recording is started for 3 seconds. So the recorded Audio will have a steady sound and suddenly a drop after about 3 seconds. This happens all the time on this device.

Future<void> startRecording() async { String fileName = '${UserConfig.current.recordedFileNamePrefix}_${DateTime.now().millisecondsSinceEpoch}.${MyRecorder.audioFileExtension}'; String audioFilePath = path.join(Utilities.tmpDir, fileName); await _audioRecorder.cancel(); monitoringStreamStarted = false; await _audioRecorder.start(const RecordConfig(encoder: AudioEncoder.wav), path: audioFilePath); }

I have also tried RecordConfig(encoder: AudioEncoder.wav, autoGain: true, androidConfig: AndroidRecordConfig(useLegacy: true)) and changing the encoder to AAC, yet the same problem occurs

Note: Other android recording apps on this phone works fine

To Reproduce

Steps to reproduce the behavior:

  1. Create a new Recorder
  2. Create a new RecordingConfig
  3. Start recording with config
  4. Stop recording
  5. Try to listen to recorded file

Expected behavior

Recorded volume should be consistent

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions