setAudioPitch

Sets the pitch of the current media resource.

virtual int setAudioPitch(int pitch) = 0;
Note: Call this method after calling the open method.

Parameters

pitch
Sets the pitch of the local music file in semitones (default is 0, which means keeping the original pitch). The valid range is from -12 to 12, where the pitch difference between two adjacent values is one semitone. The greater the absolute value of this parameter, the more significant the pitch change.

Return Values

  • 0: Success.
  • < 0: Failure.