load method

Opens the opus DLL bundled with this plugin.

Throws an ArgumentError if the library cannot be loaded.

Implementation

// coverage:ignore-start
@override
Future<Object> load() async {
  try {
    final libPath = await _copyFiles();
    return DynamicLibrary.open(libPath);
  } catch (e) {
    throw ArgumentError('Failed to load libopus on Windows: $e');
  }
}