-
Notifications
You must be signed in to change notification settings - Fork 258
Closed as not planned
Description
Environment
- macOS 15
Describe the bug
When using AudioRecorder.startStream(RecordConfig(encoder: AudioEncoder.pcm16bits))
on macOS, the recorded audio chunks are all zero.
To Reproduce
- Create a blank flutter create app
- upgrade the minimum macos deployment to 10.15
- use this as the
main.dart
import 'dart:async';
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:record/record.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
final recorder = AudioRecorder();
final chunkStream = await recorder.startStream(
RecordConfig(encoder: AudioEncoder.pcm16bits),
);
final chunksFuture = chunkStream.toList();
await Future.delayed(Duration(seconds: 5));
await recorder.stop();
await recorder.dispose();
final chunks = await chunksFuture;
chunks.any((chunk) => chunk.any((byte) => byte != 0))
? print('Audio data detected')
: print('No audio data detected');
exit(0);
}
Expected behavior
Expected would be that there are at least some non-zero bytes.
Metadata
Metadata
Assignees
Labels
No labels