unload method

Future<int?> unload(
  1. int effectId
)

@detail api @brief 卸载指定音效文件。 @param effectId 音效 ID @return - 0: 调用成功。 - < 0 : 调用失败。查看 ReturnStatus{@link #ReturnStatus} 获得更多错误说明 @note 仅在调用 start{@link #IAudioEffectPlayer#start} 或 preload{@link #IAudioEffectPlayer#preload} 后调用此接口。

Implementation

Future<int?> unload(int effectId) async {
  $a() => ($instance as $p_a.IAudioEffectPlayer).unload(effectId);
  $i() => ($instance as $p_i.ByteRTCAudioEffectPlayer).unload(effectId);

  if (Platform.isAndroid) {
    return $a();
  } else if (Platform.isIOS) {
    return $i();
  } else {
    throw UnsupportedError(
        'Not Support Platform ${Platform.operatingSystem}');
  }
}