I've encountered an issue with the record package where recording audio in mono configuration results in stereo output on Android devices, specifically tested on a Samsung device. The configuration is intended for mono output with settings: bitrate of 128000, sample rate of 44100, using AAC encoder, and 1 channel. However, the output audio file is in stereo format. This behavior differs from iOS, where the output is correctly in mono. This discrepancy in audio channel output across platforms could affect applications relying on consistent audio formats.
import 'package:record/record.dart';
final recorder = Record();
await recorder.start(
path: 'path/to/output/file.m4a',
encoder: AudioEncoder.aacLc,
bitRate: 128000,
samplingRate: 44100,
numChannels: 1,
);
// Later, to stop the recording
await recorder.stop();
To Reproduce
Configure the audio recording to use mono output settings in a Flutter app.
Start the recording with the specified mono configuration.
Stop the recording and inspect the output file's channel configuration.
Expected behavior
Expected Behavior:
The recording should be in mono format with a single audio channel, as specified in the configuration.
Actual Behavior:
On Android devices, specifically tested on Samsung, the output file is unexpectedly in stereo format with two audio channels, despite the mono configuration. This behavior is inconsistent with iOS, where the output correctly matches the mono configuration.
Package version
Environment
Describe the bug
I've encountered an issue with the record package where recording audio in mono configuration results in stereo output on Android devices, specifically tested on a Samsung device. The configuration is intended for mono output with settings: bitrate of 128000, sample rate of 44100, using AAC encoder, and 1 channel. However, the output audio file is in stereo format. This behavior differs from iOS, where the output is correctly in mono. This discrepancy in audio channel output across platforms could affect applications relying on consistent audio formats.
To Reproduce
Expected behavior
Expected Behavior: The recording should be in mono format with a single audio channel, as specified in the configuration.
Actual Behavior: On Android devices, specifically tested on Samsung, the output file is unexpectedly in stereo format with two audio channels, despite the mono configuration. This behavior is inconsistent with iOS, where the output correctly matches the mono configuration.
Logs: logs.log