return true;
}
+static void TTs_synthesized_pcm_cb(tts_h tts, int utt_id, tts_synthesized_pcm_event_e event, const char* pcm_data, int pcm_data_size, tts_audio_type_e audio_type, int sample_rate, void *user_data)
+{
+ FPRINTF("[Line: %d][%s] TTs_synthesized_pcm_cb callback invoked\\n", __LINE__, API_NAMESPACE);
+}
+
/**
* @function ITs_tts_startup
* @description Called before each test, created tts handle
return 0;
}
-/** @} */
+
+//& type: auto
+//& purpose: To set and unset synthesized pcm callback
+/**
+* @testcase ITc_tts_set_unset_synthesized_pcm_cb_p
+* @since_tizen 8.0
+* @author SRID(shobhit.v)
+* @reviewer SRID(tarun1.kumar)
+* @type auto
+* @scenario Set synthesized pcm callback and unset
+* @apicovered tts_set_synthesized_pcm_cb and tts_unset_synthesized_pcm_cb
+* @passcase if all APIs are successful
+* @failcase if API is not successful
+* @precondition NA
+* @postcondition NA
+*/
+int ITc_tts_set_unset_synthesized_pcm_cb_p(void)
+{
+ START_TEST;
+
+ int nRet = TTS_ERROR_NONE;
+ if (g_bFeatureSupported == false)
+ {
+ nRet = tts_set_synthesized_pcm_cb(g_pstTts, TTs_synthesized_pcm_cb, NULL);
+ PRINT_RESULT(TTS_ERROR_NOT_SUPPORTED, nRet, "tts_set_synthesized_pcm_cb", TtsGetError(nRet));
+
+ nRet = tts_unset_synthesized_pcm_cb(g_pstTts);
+ PRINT_RESULT(TTS_ERROR_NOT_SUPPORTED, nRet, "tts_unset_synthesized_pcm_cb", TtsGetError(nRet));
+ return 0;
+ }
+
+ nRet = tts_set_synthesized_pcm_cb(g_pstTts, TTs_synthesized_pcm_cb, NULL);
+ PRINT_RESULT(TTS_ERROR_NONE, nRet, "tts_set_synthesized_pcm_cb", TtsGetError(nRet));
+
+ nRet = tts_unset_synthesized_pcm_cb(g_pstTts);
+ PRINT_RESULT(TTS_ERROR_NONE, nRet, "tts_unset_synthesized_pcm_cb", TtsGetError(nRet));
+ return 0;
+}
+
+//& type: auto
+//& purpose: To set playing mode by service
+/**
+* @testcase ITc_tts_set_playing_mode_p
+* @since_tizen 8.0
+* @author SRID(shobhit.v)
+* @reviewer SRID(tarun1.kumar)
+* @type auto
+* @scenario To set playing mode by service
+* @apicovered tts_set_playing_mode
+* @passcase if tts_set_playing_mode is successful
+* @failcase if tts_set_playing_mode is not successful
+* @precondition NA
+* @postcondition NA
+*/
+int ITc_tts_set_playing_mode_p(void)
+{
+ START_TEST;
+
+ int nRet = TTS_ERROR_NONE;
+ tts_playing_mode_e playing_mode = TTS_PLAYING_MODE_BY_SERVICE;
+ if (g_bFeatureSupported == false)
+ {
+ nRet = tts_set_playing_mode(g_pstTts, playing_mode);
+ PRINT_RESULT(TTS_ERROR_NOT_SUPPORTED, nRet, "tts_set_playing_mode", TtsGetError(nRet));
+ playing_mode = TTS_PLAYING_MODE_BY_CLIENT;
+ nRet = tts_set_playing_mode(g_pstTts, playing_mode);
+ PRINT_RESULT(TTS_ERROR_NOT_SUPPORTED, nRet, "tts_set_playing_mode", TtsGetError(nRet));
+ return 0;
+ }
+
+ playing_mode = TTS_PLAYING_MODE_BY_SERVICE;
+ nRet = tts_set_playing_mode(g_pstTts, playing_mode);
+ PRINT_RESULT(TTS_ERROR_NONE, nRet, "tts_set_playing_mode", TtsGetError(nRet));
+
+ playing_mode = TTS_PLAYING_MODE_BY_CLIENT;
+ nRet = tts_set_playing_mode(g_pstTts, playing_mode);
+ PRINT_RESULT(TTS_ERROR_NONE, nRet, "tts_set_playing_mode", TtsGetError(nRet));
+
+ return 0;
+}
+/** @} */
/** @} */
extern int ITc_ttse_get_activated_mode_p(void);
extern int ITc_tts_get_service_state_p(void);
extern int ITc_tts_set_unset_service_state_changed_cb_p(void);
+extern int ITc_tts_set_unset_synthesized_pcm_cb_p(void);
+extern int ITc_tts_set_playing_mode_p(void);
testcase tc_array[] = {
{"ITc_tts_create_destroy_p",ITc_tts_create_destroy_p,ITs_tts_startup,ITs_tts_cleanup},
{"ITc_ttse_get_activated_mode_p",ITc_ttse_get_activated_mode_p,ITs_ttse_startup,ITs_ttse_cleanup},
{"ITc_tts_get_service_state_p",ITc_tts_get_service_state_p,ITs_tts_startup,ITs_tts_cleanup},
{"ITc_tts_set_unset_service_state_changed_cb_p",ITc_tts_set_unset_service_state_changed_cb_p,ITs_tts_startup,ITs_tts_cleanup},
+ {"ITc_tts_set_unset_synthesized_pcm_cb_p",ITc_tts_set_unset_synthesized_pcm_cb_p,ITs_tts_startup,ITs_tts_cleanup},
+ {"ITc_tts_set_playing_mode_p",ITc_tts_set_playing_mode_p,ITs_tts_startup,ITs_tts_cleanup},
{NULL, NULL}
};
extern int ITc_ttse_get_activated_mode_p(void);
extern int ITc_tts_get_service_state_p(void);
extern int ITc_tts_set_unset_service_state_changed_cb_p(void);
+extern int ITc_tts_set_unset_synthesized_pcm_cb_p(void);
+extern int ITc_tts_set_playing_mode_p(void);
testcase tc_array[] = {
{"ITc_tts_create_destroy_p",ITc_tts_create_destroy_p,ITs_tts_startup,ITs_tts_cleanup},
{"ITc_ttse_get_activated_mode_p",ITc_ttse_get_activated_mode_p,ITs_ttse_startup,ITs_ttse_cleanup},
{"ITc_tts_get_service_state_p",ITc_tts_get_service_state_p,ITs_tts_startup,ITs_tts_cleanup},
{"ITc_tts_set_unset_service_state_changed_cb_p",ITc_tts_set_unset_service_state_changed_cb_p,ITs_tts_startup,ITs_tts_cleanup},
+ {"ITc_tts_set_unset_synthesized_pcm_cb_p",ITc_tts_set_unset_synthesized_pcm_cb_p,ITs_tts_startup,ITs_tts_cleanup},
+ {"ITc_tts_set_playing_mode_p",ITc_tts_set_playing_mode_p,ITs_tts_startup,ITs_tts_cleanup},
{NULL, NULL}
};
extern int ITc_tts_prepare_sync_p(void);
extern int ITc_tts_get_service_state_p(void);
extern int ITc_tts_set_unset_service_state_changed_cb_p(void);
+extern int ITc_tts_set_unset_synthesized_pcm_cb_p(void);
+extern int ITc_tts_set_playing_mode_p(void);
testcase tc_array[] = {
{"ITc_tts_create_destroy_p",ITc_tts_create_destroy_p,ITs_tts_startup,ITs_tts_cleanup},
{"ITc_tts_prepare_sync_p",ITc_tts_prepare_sync_p,ITs_tts_startup,ITs_tts_cleanup},
{"ITc_tts_get_service_state_p",ITc_tts_get_service_state_p,ITs_tts_startup,ITs_tts_cleanup},
{"ITc_tts_set_unset_service_state_changed_cb_p",ITc_tts_set_unset_service_state_changed_cb_p,ITs_tts_startup,ITs_tts_cleanup},
+ {"ITc_tts_set_unset_synthesized_pcm_cb_p",ITc_tts_set_unset_synthesized_pcm_cb_p,ITs_tts_startup,ITs_tts_cleanup},
+ {"ITc_tts_set_playing_mode_p",ITc_tts_set_playing_mode_p,ITs_tts_startup,ITs_tts_cleanup},
{NULL, NULL}
};
extern int ITc_ttse_get_activated_mode_p(void);
extern int ITc_tts_get_service_state_p(void);
extern int ITc_tts_set_unset_service_state_changed_cb_p(void);
+extern int ITc_tts_set_unset_synthesized_pcm_cb_p(void);
+extern int ITc_tts_set_playing_mode_p(void);
testcase tc_array[] = {
{"ITc_tts_create_destroy_p",ITc_tts_create_destroy_p,ITs_tts_startup,ITs_tts_cleanup},
{"ITc_ttse_get_activated_mode_p",ITc_ttse_get_activated_mode_p,ITs_ttse_startup,ITs_ttse_cleanup},
{"ITc_tts_get_service_state_p",ITc_tts_get_service_state_p,ITs_tts_startup,ITs_tts_cleanup},
{"ITc_tts_set_unset_service_state_changed_cb_p",ITc_tts_set_unset_service_state_changed_cb_p,ITs_tts_startup,ITs_tts_cleanup},
+ {"ITc_tts_set_unset_synthesized_pcm_cb_p",ITc_tts_set_unset_synthesized_pcm_cb_p,ITs_tts_startup,ITs_tts_cleanup},
+ {"ITc_tts_set_playing_mode_p",ITc_tts_set_playing_mode_p,ITs_tts_startup,ITs_tts_cleanup},
{NULL, NULL}
};