convertToM4a method

  1. @override
Future<String> convertToM4a(
  1. String inputPath,
  2. String outputPath
)
override

Implementation

@override
Future<String> convertToM4a(String inputPath, String outputPath) async {
  try {
    final result = await methodChannel.invokeMethod<String>(
      'convertToM4a',
      {'inputPath': inputPath, 'outputPath': outputPath},
    );
    if (result == null) {
      throw AudioConversionException('Native conversion returned null');
    }
    return result;
  } on PlatformException catch (e) {
    throw AudioConversionException(
      e.message ?? 'Unknown conversion error',
      details: e.details?.toString(),
    );
  }
}