/* unset volume policy, volume will be 100% */
__unset_policy_for_playing();
- if (NULL != sound_data->data) {
- free(sound_data->data);
- sound_data->data = NULL;
- }
- free(sound_data);
- sound_data = NULL;
+ ttsd_data_clear_sound_data(&sound_data);
return;
}
SLOG(LOG_WARN, tts_tag(), "[Send WARNIING] Current player is not valid");
/* unset volume policy, volume will be 100% */
__unset_policy_for_playing();
- if (NULL != sound_data->data) {
- free(sound_data->data);
- sound_data->data = NULL;
- }
- free(sound_data);
- sound_data = NULL;
+ ttsd_data_clear_sound_data(&sound_data);
return;
}
if (0 != ttsdc_send_utt_finish_message(pid, player->uid, sound_data->utt_id)) {
}
}
SLOG(LOG_INFO, tts_tag(), "[Player] Finish utterance : uid(%d), uttid(%d)", player->uid, sound_data->utt_id);
- if (NULL != sound_data->data) {
- free(sound_data->data);
- sound_data->data = NULL;
- }
- free(sound_data);
- sound_data = NULL;
+ ttsd_data_clear_sound_data(&sound_data);
continue;
}
}
/* unset volume policy, volume will be 100% */
__unset_policy_for_playing();
- if (NULL != sound_data->data) {
- free(sound_data->data);
- sound_data->data = NULL;
- }
- free(sound_data);
- sound_data = NULL;
+ ttsd_data_clear_sound_data(&sound_data);
return;
}
/* unset volume policy, volume will be 100% */
__unset_policy_for_playing();
- if (NULL != sound_data->data) {
- free(sound_data->data);
- sound_data->data = NULL;
- }
-
- free(sound_data);
- sound_data = NULL;
+ ttsd_data_clear_sound_data(&sound_data);
return;
}
/* unset volume policy, volume will be 100% */
__unset_policy_for_playing();
- if (NULL != sound_data) {
- if (NULL != sound_data->data) {
- free(sound_data->data);
- sound_data->data = NULL;
- }
-
- free(sound_data);
- sound_data = NULL;
- }
+ ttsd_data_clear_sound_data(&sound_data);
return;
}
SLOG(LOG_DEBUG, tts_tag(), "[Player SUCCESS] Unprepare audio");
}
- if (NULL != sound_data) {
- if (NULL != sound_data->data) {
- free(sound_data->data);
- sound_data->data = NULL;
- }
-
- free(sound_data);
- sound_data = NULL;
- }
+ ttsd_data_clear_sound_data(&sound_data);
/* unset volume policy, volume will be 100% */
__unset_policy_for_playing();
return;
SLOG(LOG_WARN, tts_tag(), "[Send WARNIING] Current player is not valid");
/* unset volume policy, volume will be 100% */
__unset_policy_for_playing();
- if (NULL != sound_data->data) {
- free(sound_data->data);
- sound_data->data = NULL;
- }
- free(sound_data);
- sound_data = NULL;
+ ttsd_data_clear_sound_data(&sound_data);
return;
}
pid, player->uid, sound_data->utt_id);
/* unset volume policy, volume will be 100% */
__unset_policy_for_playing();
- if (NULL != sound_data->data) {
- free(sound_data->data);
- sound_data->data = NULL;
- }
- free(sound_data);
- sound_data = NULL;
+ ttsd_data_clear_sound_data(&sound_data);
return;
}
SLOG(LOG_INFO, tts_tag(), "[Player] Finish utterance : uid(%d), uttid(%d)", player->uid, sound_data->utt_id);
}
- if (NULL != sound_data) {
- if (NULL != sound_data->data) {
- free(sound_data->data);
- sound_data->data = NULL;
- }
-
- free(sound_data);
- sound_data = NULL;
- }
+ ttsd_data_clear_sound_data(&sound_data);
if (NULL == g_playing_info) {
SLOG(LOG_ERROR, tts_tag(), "[Player ERROR] Current player is NULL");