From ab15d0cafecf7e575f9b65b580b8fea9d9a07a59 Mon Sep 17 00:00:00 2001 From: "sungwook79.park" Date: Thu, 5 Sep 2024 15:18:23 +0900 Subject: [PATCH] Fix potential problem Change-Id: I6f9cb61e73c960d9dd35bef0bd7f198bdafec10d Signed-off-by: sungwook79.park --- client/tts.c | 6 +++--- include/tts.h | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/client/tts.c b/client/tts.c index 09684197..806fd7f4 100644 --- a/client/tts.c +++ b/client/tts.c @@ -1641,13 +1641,13 @@ int tts_add_text_with_synthesis_parameter(tts_h tts, const char* text, tts_synth { RETV_IF(TTS_ERROR_NONE != __tts_get_feature_enabled(), TTS_ERROR_NOT_SUPPORTED); - SLOG(LOG_ERROR, TAG_TTSC, "[INFO] Add text with synthesis parameter: text(%s), language(%s), ptts_id(%s), type(%d), speed(%d), pitch(%d), volume(%lf), background_volume(%lf)", - (NULL == text) ? "NULL" : text, (NULL == parameter->language) ? "NULL" : parameter->language, (NULL == parameter->ptts_id) ? "NULL" : parameter->ptts_id, parameter->voice_type, parameter->speed, parameter->pitch, parameter->volume, parameter->background_volume_ratio); - RETVM_IF(NULL == parameter, TTS_ERROR_INVALID_PARAMETER, "[ERROR] Input parameter is null"); RETVM_IF(NULL == utt_id, TTS_ERROR_INVALID_PARAMETER, "[ERROR] Input parameter is null"); RETVM_IF(false == tts_core_is_valid_text(text), TTS_ERROR_INVALID_PARAMETER, "[ERROR] Input text is invalid"); + SLOG(LOG_ERROR, TAG_TTSC, "[INFO] Add text with synthesis parameter: text(%s), language(%s), ptts_id(%s), type(%d), speed(%d), pitch(%d), volume(%lf), background_volume(%lf)", + (NULL == text) ? "NULL" : text, (NULL == parameter->language) ? "NULL" : parameter->language, (NULL == parameter->ptts_id) ? "NULL" : parameter->ptts_id, parameter->voice_type, parameter->speed, parameter->pitch, parameter->volume, parameter->background_volume_ratio); + tts_client_s* client = tts_client_get(tts); RETVM_IF(NULL == client, TTS_ERROR_INVALID_PARAMETER, "[ERROR] A handle is not valid. tts(%p)", tts); diff --git a/include/tts.h b/include/tts.h index 739e1df3..5f69b19a 100644 --- a/include/tts.h +++ b/include/tts.h @@ -1311,7 +1311,6 @@ int tts_synthesis_parameter_set_background_volume_ratio(tts_synthesis_parameter_ * @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter * @retval #TTS_ERROR_INVALID_STATE Invalid state * @retval #TTS_ERROR_OPERATION_FAILED Operation failure - * @pre The state should be #TTS_STATE_READY. * @see tts_synthesis_parameter_set_pitch() */ int tts_get_pitch_range(tts_h tts, int* min, int* normal, int* max); @@ -1329,7 +1328,6 @@ int tts_get_pitch_range(tts_h tts, int* min, int* normal, int* max); * @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter * @retval #TTS_ERROR_INVALID_STATE Invalid state * @retval #TTS_ERROR_OPERATION_FAILED Operation failure - * @pre The state should be #TTS_STATE_READY. * @see tts_synthesis_parameter_set_volume() */ int tts_get_volume_range(tts_h tts, int* min, int* max); -- 2.34.1