Fix potential problem 73/317173/1
authorsungwook79.park <sungwook79.park@samsung.com>
Thu, 5 Sep 2024 06:18:23 +0000 (15:18 +0900)
committersungwook79.park <sungwook79.park@samsung.com>
Thu, 5 Sep 2024 06:18:23 +0000 (15:18 +0900)
Change-Id: I6f9cb61e73c960d9dd35bef0bd7f198bdafec10d
Signed-off-by: sungwook79.park <sungwook79.park@samsung.com>
client/tts.c
include/tts.h

index 096841979e52a358f582009ff3f62740303af565..806fd7f4d34c100fc836a16c8eaa61c83a5aeaae 100644 (file)
@@ -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);
 
index 739e1df3284e5e4bd0c3febeb7a89777cbe208f2..5f69b19a3d055a00fb1176cd54afa8edfd0ae9c4 100644 (file)
@@ -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);