preloadEffect abstract method

Future<void> preloadEffect(
  1. int soundId,
  2. String filePath
)

Preloads a specified audio effect file into the memory. To ensure smooth communication, limit the size of the audio effect file. We recommend using this method to preload the audio effect before calling joinChannel. This method does not support online audio effect files. For the audio file formats supported by this method, see What formats of audio files does the Agora RTC SDK support.

Param soundId The audio effect ID. The ID of each audio effect file is unique.

Param filePath File path: Android: The file path, which needs to be accurate to the file name and suffix. Agora supports using a URI address, an absolute path, or a path that starts with /assets/. You might encounter permission issues if you use an absolute path to access a local file, so Agora recommends using a URI address instead. For example: content://com.android.providers.media.documents/document/audio%203A14441 Windows: The absolute path or URL address (including the suffixes of the filename) of the audio effect file. For example: C:\music\audio.mp4. iOS or macOS: The absolute path or URL address (including the suffixes of the filename) of the audio effect file. For example: /var/mobile/Containers/Data/audio.mp4.

Implementation

Future<void> preloadEffect(int soundId, String filePath);