loadResource abstract method

Future<ZegoAudioEffectPlayerLoadResourceResult> loadResource(
  1. int audioEffectID,
  2. String path
)

Load audio effect resource.

Available since: 1.16.0 Description: Load audio effect resource. Use cases: In a scene where the same sound effect is played frequently, the SDK provides the function of preloading the sound effect file into the memory in order to optimize the performance of repeatedly reading and decoding the file. When to call: It can be called after createAudioEffectPlayer. Restrictions: Preloading supports loading up to 15 sound effect files at the same time, and the duration of the sound effect files cannot exceed 30s, otherwise an error will be reported when loading.

  • audioEffectID ID for the audio effect.
  • path the absolute path or "assets://" of the audio effect resource and cannot be null or "".
    Value range: "ipod-library://" and network url are not supported.
  • Returns Result for audio effect player loads resources

Implementation

Future<ZegoAudioEffectPlayerLoadResourceResult> loadResource(
    int audioEffectID, String path);