openRecorder method

  1. @override
Future<void> openRecorder(
  1. FlutterSoundRecorderCallback callback, {
  2. required Level logLevel,
  3. AudioFocus? focus,
  4. SessionCategory? category,
  5. SessionMode? mode,
  6. int? audioFlags,
  7. AudioDevice? device,
})
override

Implementation

@override
Future<void> openRecorder(FlutterSoundRecorderCallback callback, {required Level logLevel, AudioFocus? focus, SessionCategory? category, SessionMode? mode, int? audioFlags, AudioDevice? device}) async
{
        int slotno = findSession(callback);
        if (slotno < _slots.length)
        {
                assert (_slots[slotno] == null);
                _slots[slotno] = newRecorderInstance(callback, callbackTable);
        } else
        {
                assert(slotno == _slots.length);
                _slots.add( newRecorderInstance(callback, callbackTable));
        }
        getWebSession(callback)!.initializeFlautoRecorder(focus!.index, category!.index, mode!.index, audioFlags, device!.index);
}