setLocalVoicePitch method
@detail api
@author wangjunzheng
@brief Changes local voice to a different key, mostly used in Karaoke scenarios.
You can adjust the pitch of local voice such as ascending or descending with this method.
@param pitch The value that is higher or lower than the original local voice within a range from -12 to 12. The default value is 0, i.e. no adjustment is made.
The difference in pitch between two adjacent values within the value range is a semitone, with positive values indicating an ascending tone and negative values indicating a descending tone, and the larger the absolute value set, the more the pitch is raised or lowered.
Out of the value range, the setting fails and triggers rtcEngine:onWarning:{@link #ByteRTCEngineDelegate#rtcEngine:onWarning} callback, indicating WARNING_CODE_SET_SCREEN_STREAM_INVALID_VOICE_PITCH for invalid value setting with ByteRTCWarningCode{@link #ByteRTCWarningCode}.
@return
- 0: Success.
- < 0 : Fail. See ByteRTCReturnStatus{@link #ByteRTCReturnStatus} for more details
Implementation
FutureOr<int> setLocalVoicePitch(NSInteger pitch) async {
return await nativeCall('setLocalVoicePitch:', [pitch]);
}