record
record copied to clipboard
Cannot choose a device to record
Package version
Environment
- OS: macOS 14.3.1
- Browser: Chrome
Describe the bug
I use this config to record stream:
RecordConfig config = RecordConfig(
device: _inputDevice,
encoder: AudioEncoder.pcm16bits,
sampleRate: 16000,
numChannels: 1,
);
Stream<Uint8List> recordStream = await _audioRecorder.startStream(config);
Expected to record audio from choosen device(_inputDevice
), and this is code to choose device:
_audioRecorder
.listInputDevices()
.then((devices) => devices.firstWhere(
(device) => device.label == deviceLabel,
orElse: () => devices.first))
.then((device) => _inputDevice = device)
when I use diffenrent label, it always record from macos's microphone device. By the way, i use Blackhole create a virtual input device.
To Reproduce
Steps to reproduce the behavior:
- Create a virtual device use Blackholehttps://github.com/ExistentialAudio/BlackHole
- Choose virtual input device created by Blackhole to record stream.
- Still record from default macos's microphone input device.
- See error
Expected behavior
Record from device that i choosen
Additional context There is blackhole's url https://github.com/ExistentialAudio/BlackHole
And I found it always use the input device that setted in system setting.
@llfbandit is device selection an intended feature of the plugin?
@llfbandit is device selection an intended feature of the plugin?
Record has a param of device.I think it's a param to select device.
And document say it can choose device on macOS.
@HydroCarbon Device selection was missing on streaming code branch.
Are you able to test it from this repository on master branch?
@llfbandit OK,I will test it in two days. and I will reply to you .
Released in record_darwin 1.1.0