Skip to content

Android record background with PCM is not working #594

@skeyboy

Description

@skeyboy

Package version

6.2.0
Environment

  • OS: android
  • Flutter app

Describe the bug
the record pcm data is working but change app to backgroud run the pcm data filled with all 0. such as [0,0,0,0]

the normal data is [xx,12,,43,....]

To Reproduce

`
final device =
(await _audioRecorder
.listInputDevices())
.firstWhereOrNull(
(d) => d.id == deviceId,
);
_recordSubStream ??=
(await _audioRecorder.startStream(
RecordConfig(
device: device,
encoder: AudioEncoder.pcm16bits,
sampleRate: 16000,
numChannels: 1,
),
))..listen((data) async {
final base64Data = base64Encode(
data,
);
await sendAudioDataToJs(
audioBase64Data: base64Data,
);
});

`

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