X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=include%2Ftts_internal.h;h=1c02cb5e030285df08166592940326d9b9574ebc;hb=e1f07829e0af752017af94568b051a285912c114;hp=434b8da12470c268169ef107ef9ebf0fa8005323;hpb=5b7b6c9dd84aa603cb84b644384d4da14bfb86c2;p=platform%2Fcore%2Fuifw%2Ftts.git diff --git a/include/tts_internal.h b/include/tts_internal.h index 434b8da..1c02cb5 100644 --- a/include/tts_internal.h +++ b/include/tts_internal.h @@ -53,6 +53,67 @@ extern "C" */ int tts_set_server_tts(tts_h tts, const char* credential); +/** + * @brief Adds a sound stream to the queue. + * @since_tizen 4.0 + * + * @param[in] tts The TTS handle + * @param[in] event An event about pcm buffer (-1: error, 1: start, 2: continue, 3: finish) + * @param[in] data The pcm data buffer + * @param[in] data_size The data size of pcm data buffer + * @param[in] audio_type The audio type of pcm (0: signed 16-bit, 1: unsigned 8-bit) + * @param[in] rate The sampling rate of pcm + * @return @c 0 on success, + * otherwise a negative error value + * @retval #TTS_ERROR_NONE Successful + * @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #TTS_ERROR_INVALID_STATE Invalid state + * @retval #TTS_ERROR_OPERATION_FAILED Operation failure + * @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported + * @retval #TTS_ERROR_PERMISSION_DENIED Permission denied + * @pre The state should be #TTS_STATE_PLAYING. + * @see tts_play_pcm() + * @see tts_stop_pcm() +*/ +int tts_add_pcm(tts_h tts, int event, const void* data, unsigned int data_size, int audio_type, int rate); + +/** + * @brief Request to play pcm. + * @since_tizen 4.0 + * + * @param[in] tts The TTS handle + * @return @c 0 on success, + * otherwise a negative error value + * @retval #TTS_ERROR_NONE Successful + * @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #TTS_ERROR_INVALID_STATE Invalid state + * @retval #TTS_ERROR_OPERATION_FAILED Operation failure + * @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported + * @retval #TTS_ERROR_PERMISSION_DENIED Permission denied + * @pre The state should be #TTS_STATE_READY. + * @see tts_add_pcm() + * @see tts_stop_pcm() +*/ +int tts_play_pcm(tts_h tts); + +/** + * @brief Request to stop pcm. + * @since_tizen 4.0 + * + * @param[in] tts The TTS handle + * @return @c 0 on success, + * otherwise a negative error value + * @retval #TTS_ERROR_NONE Successful + * @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #TTS_ERROR_INVALID_STATE Invalid state + * @retval #TTS_ERROR_OPERATION_FAILED Operation failure + * @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported + * @retval #TTS_ERROR_PERMISSION_DENIED Permission denied + * @pre The state should be #TTS_STATE_PLAYING. + * @see tts_play_pcm() + * @see tts_add_pcm() +*/ +int tts_stop_pcm(tts_h tts); #ifdef __cplusplus }