configRhythmPlayer

Configures the virtual metronome.

virtual int configRhythmPlayer(const AgoraRhythmPlayerConfig& config) = 0;
Deprecated
Deprecated since v4.6.0.

After calling startRhythmPlayer, you can call this method to reconfigure the virtual metronome. Once enabled, the SDK starts playing the specified sound effect files from the beginning and controls the duration of each file based on the beatsPerMinute you set in AgoraRhythmPlayerConfig. For example, if you set beatsPerMinute to 60, the SDK plays one beat per second. If the file duration exceeds the beat duration, the SDK only plays the audio content within the beat duration. By default, the metronome sound is published in the channel. If you want remote users to hear the sound, set publishRhythmPlayerTrack to true in ChannelMediaOptions.

Timing

This method can be called before or after joining a channel.

Parameters

config
Metronome configuration. See AgoraRhythmPlayerConfig.

Return Values

  • 0: Success.
  • < 0: Failure.