loadSoundfont method
Implementation
@override
Future<String?> loadSoundfont({
required ByteData? sf2Data,
String name = 'instrument.sf2',
}) async {
if (sf2Data == null) return Future.value(null);
if (kIsWeb) return methodChannel.invokeMethod('load_soundfont');
File? file = await writeToFile(sf2Data, name: name);
if (file == null) return null;
return methodChannel.invokeMethod('load_soundfont', {'path': file.path});
}