Send synthesized PCM data from TTS engine to client 80/295280/4
authorwn.jang <wn.jang@samsung.com>
Tue, 4 Jul 2023 10:51:47 +0000 (19:51 +0900)
committerwn.jang <wn.jang@samsung.com>
Thu, 6 Jul 2023 02:57:06 +0000 (11:57 +0900)
Change-Id: I91dd83aaa808fa46bc2e4768797db66da3f524c1

15 files changed:
client/tts_core.c
client/tts_core.h
client/tts_dbus.c
client/tts_tidl.c
common/tts_defs.h
include/tts_internal.h
server/ttsd_data.cpp
server/ttsd_data.h
server/ttsd_dbus.c
server/ttsd_dbus.h
server/ttsd_ipc.c
server/ttsd_ipc.h
server/ttsd_server.c
server/ttsd_tidl.c
server/ttsd_tidl.h

index 3fcc909..17e881b 100644 (file)
@@ -918,6 +918,28 @@ int tts_core_notify_service_state_changed(tts_client_s* client, tts_service_stat
        return TTS_ERROR_NONE;
 }
 
+int tts_core_notify_synthesized_pcm(tts_client_s* client, 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)
+{
+       RETVM_IF(false == tts_client_is_valid_client(client), TTS_ERROR_INVALID_PARAMETER, "[ERROR] Client is invalid.");
+       RETVM_IF(NULL == pcm_data, TTS_ERROR_INVALID_PARAMETER, "[ERROR] pcm_data is NULL.");
+
+       SLOG(LOG_DEBUG, TAG_TTSC, "Synthesized pcm data : utt_id(%d), pcm_data_size(%d)", utt_id, pcm_data_size);
+
+       tts_synthesized_pcm_cb callback = tts_client_get_synthesized_pcm_cb(client);
+       void* user_data = tts_client_get_synthesized_pcm_user_data(client);
+
+       if (NULL != callback) {
+               SLOG(LOG_DEBUG, TAG_TTSC, "Notify synthesized pcm comes");
+               tts_client_use_callback(client);
+               callback(tts_client_get_handle(client), utt_id, event, pcm_data, pcm_data_size, audio_type, sample_rate, user_data);
+               tts_client_not_use_callback(client);
+       } else {
+               SLOG(LOG_WARN, TAG_TTSC, "No registered callback(synthesized_pcm)");
+       }
+
+       return TTS_ERROR_NONE;
+}
+
 bool tts_core_is_valid_text(const char* text)
 {
        if (NULL == text) {
index 1b6d25f..2b843dc 100644 (file)
 #ifndef __TTS_CORE_H_
 #define __TTS_CORE_H_
 
+#include "tts_client.h"
+#include "tts_internal.h"
+
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-#include "tts_client.h"
-
 // common function
 int tts_core_notify_state_changed(tts_client_s* client, tts_state_e current_state);
 int tts_core_notify_utt_started(tts_client_s* client, int utt_id);
@@ -30,6 +31,7 @@ int tts_core_notify_default_voice_changed(tts_client_s* client, const char* befo
 int tts_core_notify_engine_changed(tts_client_s* client, const char* engine_id, const char* language, int voice_type, bool need_credential);
 int tts_core_notify_screen_reader_changed(tts_client_s* client, bool value);
 int tts_core_notify_service_state_changed(tts_client_s* client, tts_service_state_e before_state, tts_service_state_e current_state);
+int tts_core_notify_synthesized_pcm(tts_client_s* client, 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);
 
 bool tts_core_is_valid_text(const char* text);
 bool tts_core_check_screen_reader(tts_client_s* client);
index eba8457..be7db58 100644 (file)
@@ -201,6 +201,34 @@ static Eina_Bool listener_event_callback(void* data, Ecore_Fd_Handler *fd_handle
                        }
                } /* TTSD_METHOD_SET_SERVICE_STATE */
 
+               else if (dbus_message_is_signal(msg, if_name, TTSD_METHOD_SEND_PCM)) {
+                       unsigned int uid = 0;
+                       int uttid = -1;
+                       int event = -1;
+                       char* pcm_data = NULL;
+                       int pcm_data_size = -1;
+                       int audio_type = -1;
+                       int sample_rate = 0;
+
+                       dbus_message_get_args(msg, &err,
+                               DBUS_TYPE_UINT32, &uid,
+                               DBUS_TYPE_INT32, &uttid,
+                               DBUS_TYPE_INT32, &event,
+                               DBUS_TYPE_ARRAY, DBUS_TYPE_BYTE, &pcm_data, &pcm_data_size,
+                               DBUS_TYPE_INT32, &audio_type,
+                               DBUS_TYPE_INT32, &sample_rate,
+                               DBUS_TYPE_INVALID);
+
+                       if (dbus_error_is_set(&err)) {
+                               SLOG(LOG_ERROR, TAG_TTSC, "[ERROR] Get arguments error (%s)", err.message);
+                               dbus_error_free(&err);
+                       }
+
+                       if (0 == tts_core_notify_synthesized_pcm(tts_client_get_by_uid(uid), uttid, event, pcm_data, pcm_data_size, audio_type, sample_rate)) {
+                               SLOG(LOG_DEBUG, TAG_TTSC, "<<<< tts send pcm : uid(%u) uttid(%d) event(%d) pcm_data_size(%d) audio_type(%d) sample_rate(%d)", uid, uttid, event, pcm_data_size, audio_type, sample_rate);
+                       }
+               }
+
                else if (dbus_message_is_signal(msg, if_name, TTSD_METHOD_ERROR)) {
                        unsigned int uid;
                        int uttid;
index f66db67..7edd94f 100644 (file)
@@ -121,6 +121,25 @@ static void __notify_cb(void *user_data, int pid, int uid, bundle *msg)
                if (before_state && current_state) {
                        tts_core_notify_service_state_changed(client, (tts_service_state_e)atoi(before_state), (tts_service_state_e)atoi(current_state));
                }
+       } else if (0 == strncmp(TTSD_METHOD_SEND_PCM, method, strlen(TTSD_METHOD_SEND_PCM))) {
+               char* uttid = NULL;
+               char* event = NULL;
+               void* pcm_data = NULL;
+               size_t pcm_data_size = 0;
+               char* audio_type = NULL;
+               char* sample_rate = NULL;
+
+               bundle_get_str(msg, TTS_BUNDLE_UTTID, &uttid);
+               bundle_get_str(msg, TTS_BUNDLE_PCM_EVENT, &event);
+               bundle_get_byte(msg, TTS_BUNDLE_PCM_DATA, (void**)&pcm_data, &pcm_data_size);
+               bundle_get_str(msg, TTS_BUNDLE_PCM_AUDIO_TYPE, &audio_type);
+               bundle_get_str(msg, TTS_BUNDLE_PCM_SAMPLE_RATE, &sample_rate);
+               SLOG(LOG_DEBUG, TAG_TTSC, "uttid(%s) event(%s) pcm_data(%p) pcm_data_size(%d) audio_type(%s) sample_rate(%s)", uttid, event, pcm_data, (int)pcm_data_size, audio_type, sample_rate);
+               if (uttid && ((pcm_data && pcm_data_size > 0) || TTS_SYNTHESIZED_PCM_EVENT_FINISH == atoi(event))) {
+                       tts_core_notify_synthesized_pcm(client, atoi(uttid), atoi(event), (const char*)pcm_data, (int)pcm_data_size, atoi(audio_type), atoi(sample_rate));
+               } else {
+                       SLOG(LOG_ERROR, TAG_TTSC, "[ERROR] Fail to get message(TTSD_METHOD_SEND_PCM). pid(%d) uid(%u)", pid, u_uid);
+               }
        } else if (0 == strncmp(TTSD_METHOD_ERROR, method, strlen(TTSD_METHOD_ERROR))) {
                char *uttid = NULL;
                char *reason = NULL;
index 5a18823..7ba90a2 100644 (file)
@@ -62,6 +62,10 @@ extern "C" {
 #define TTS_BUNDLE_CREDENTIAL_NEEDED "credential_needed"
 #define TTS_BUNDLE_BEFORE_STATE "before_state"
 #define TTS_BUNDLE_CURRENT_STATE "current_state"
+#define TTS_BUNDLE_PCM_EVENT "pcm_event"
+#define TTS_BUNDLE_PCM_DATA "pcm_data"
+#define TTS_BUNDLE_PCM_AUDIO_TYPE "pcm_audio_type"
+#define TTS_BUNDLE_PCM_SAMPLE_RATE "pcm_sample_rate"
 
 #define TTS_METHOD_HELLO               "tts_method_hello"
 #define TTS_METHOD_HELLO_SYNC       "tts_method_hello_sync"
@@ -88,6 +92,7 @@ extern "C" {
 #define TTSD_METHOD_ERROR              "ttsd_method_error"
 #define TTSD_METHOD_SET_STATE          "ttsd_method_set_state"
 #define TTSD_METHOD_SET_SERVICE_STATE          "ttsd_method_set_service_state"
+#define TTSD_METHOD_SEND_PCM           "ttsd_method_send_pcm"
 
 
 /******************************************************************************************
index ea43cbb..070996a 100644 (file)
@@ -39,14 +39,24 @@ typedef enum {
 
 
 /**
+ * @brief Enumration for audio type.
+ * @since_tizen 8.0
+ */
+typedef enum {
+       TTS_AUDIO_TYPE_RAW_S16 = 0, /**< Signed 16-bit audio type */
+       TTS_AUDIO_TYPE_RAW_U8 /**< Unsigned 8-bit audio type */
+} tts_audio_type_e;
+
+
+/**
  * @brief Enumeration for synthesized pcm event.
  * @since_tizen 8.0
 */
 typedef enum {
-       TTS_SYNTHESIZED_PCM_EVENT_FAIL = -1, /**< 'Error' event */
-       TTS_SYNTHESIZED_PCM_EVENT_START, /**< 'Started' event */
-       TTS_SYNTHESIZED_PCM_EVENT_CONTINUE, /**< 'Finished' event */
-       TTS_SYNTHESIZED_PCM_EVENT_FINISH, /**< 'Finished' event */
+       TTS_SYNTHESIZED_PCM_EVENT_FAIL = -1, /**< Event when the synthesized PCM is failed */
+       TTS_SYNTHESIZED_PCM_EVENT_START = 1, /**< Event when the synthesized PCM is received at first */
+       TTS_SYNTHESIZED_PCM_EVENT_CONTINUE = 2, /**< Event when the synthesized PCM is received, not first and not last */
+       TTS_SYNTHESIZED_PCM_EVENT_FINISH = 3 /**< Event when the synthesized PCM is received finally */
 } tts_synthesized_pcm_event_e;
 
 
@@ -61,15 +71,18 @@ typedef enum {
  * @since_tizen 8.0
  * @remarks The @a tts handle should not be destroyed in the callback.
  * @param[in] tts The TTS handle, the same handle for which the callback was set.
+ * @param[in] utt_id The utterance ID
  * @param[in] event The event type
- * @param[in] buffer The synthesized pcm data
- * @param[in] buffer_size The size of the buffer
+ * @param[in] pcm_data The synthesized pcm data
+ * @param[in] pcm_data_size The size of the pcm data
+ * @param[in] audio_type The audio type of pcm data
+ * @param[in] sample_rate The sampling rate of pcm data
  * @param[in] user_data The user data passed from the callback registration function
  * @pre An application registers this callback using tts_set_synthesized_pcm_cb() to get pcm data.
  * @see tts_set_synthesized_pcm_cb()
  * @see tts_unset_synthesized_pcm_cb()
  */
-typedef void (*tts_synthesized_pcm_cb)(tts_h tts, tts_synthesized_pcm_event_e event, char* buffer, int buffer_size, void *user_data);
+typedef 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);
 
 
 /**
index c59b8b2..3ab1ce6 100644 (file)
@@ -340,6 +340,18 @@ ttsd_mode_e ttsd_data_get_mode(unsigned int uid)
        return app_data->mode;
 }
 
+ttsd_playing_mode_e ttsd_data_get_playing_mode(unsigned int uid)
+{
+       lock_guard<mutex> lock(g_app_data_mutex);
+       app_data_s* app_data = get_client_app_data(uid);
+       if (nullptr == app_data) {
+               SECURE_SLOG(LOG_ERROR, tts_tag(), "[DATA ERROR] uid is not valid (%u)", uid);
+               return TTSD_PLAYING_MODE_BY_SERVICE;
+       }
+
+       return app_data->playing_mode;
+}
+
 int ttsd_data_set_credential(unsigned int uid, const char* credential)
 {
        lock_guard<mutex> lock(g_app_data_mutex);
index a1a0782..9d22b00 100644 (file)
@@ -84,6 +84,8 @@ tts_ipc_method_e ttsd_data_get_ipc_method(unsigned int uid);
 
 ttsd_mode_e ttsd_data_get_mode(unsigned int uid);
 
+ttsd_playing_mode_e ttsd_data_get_playing_mode(unsigned int uid);
+
 int ttsd_data_set_credential(unsigned int uid, const char* credential);
 
 char* ttsd_data_get_credential(unsigned int uid);
index 734471b..3fce979 100644 (file)
@@ -192,6 +192,51 @@ int ttsdc_dbus_send_set_service_state_message(int pid, unsigned int uid, int bef
        return TTSD_ERROR_NONE;
 }
 
+int ttsdc_dbus_send_pcm(int pid, unsigned int uid, int uttid, int event, const void* pcm_data, int pcm_data_size, ttse_audio_type_e audio_type, int sample_rate)
+{
+       if (NULL == g_conn_sender) {
+               SLOG(LOG_ERROR, tts_tag(), "[Dbus ERROR] Dbus connection is not available");
+               return -1;
+       }
+
+       DBusMessage* msg = NULL;
+
+       char target_if_name[64];
+       snprintf(target_if_name, sizeof(target_if_name), "%s%d", TTS_CLIENT_SERVICE_INTERFACE, pid);
+
+       /* create a message */
+       msg = dbus_message_new_signal(
+               TTS_CLIENT_SERVICE_OBJECT_PATH, /* object name of the signal */
+               target_if_name,                         /* interface name of the signal */
+               TTSD_METHOD_SEND_PCM);          /* name of the signal */
+
+       if (NULL == msg) {
+               SLOG(LOG_ERROR, tts_tag(), "[Dbus ERROR] Fail to create error message : uid(%u)", uid);
+               return -1;
+       }
+
+       dbus_message_append_args(msg,
+               DBUS_TYPE_UINT32, &uid,
+               DBUS_TYPE_INT32, &uttid,
+               DBUS_TYPE_INT32, &event,
+               DBUS_TYPE_ARRAY, DBUS_TYPE_BYTE, &pcm_data, pcm_data_size,
+               DBUS_TYPE_INT32, &audio_type,
+               DBUS_TYPE_INT32, &sample_rate,
+               DBUS_TYPE_INVALID);
+
+       if (1 != dbus_connection_send(g_conn_sender, msg, NULL)) {
+               SLOG(LOG_ERROR, tts_tag(), "[Dbus ERROR] Fail to Send");
+               return TTSD_ERROR_OPERATION_FAILED;
+       } else {
+               SLOG(LOG_DEBUG, tts_tag(), "[Dbus] SUCCESS Send");
+               dbus_connection_flush(g_conn_sender);
+       }
+
+       dbus_message_unref(msg);
+
+       return 0;
+}
+
 int ttsdc_dbus_send_error_message(int pid, unsigned int uid, int uttid, int reason, char* err_msg)
 {
        if (NULL == g_conn_sender) {
index 0d23376..5f19677 100644 (file)
@@ -15,6 +15,8 @@
 #ifndef __TTSD_DBUS_h__
 #define __TTSD_DBUS_h__
 
+#include "ttsd_main.h"
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -35,6 +37,8 @@ int ttsdc_dbus_send_set_state_message(int pid, unsigned int uid, int state);
 
 int ttsdc_dbus_send_set_service_state_message(int pid, unsigned int uid, int before_state, int current_state);
 
+int ttsdc_dbus_send_pcm(int pid, unsigned int uid, int uttid, int event, const void* pcm_data, int pcm_data_size, ttse_audio_type_e audio_type, int sample_rate);
+
 
 #ifdef __cplusplus
 }
index 72646a4..b88ec99 100644 (file)
 
 static int(*ttsd_dbus_vtable[])() = {&ttsd_dbus_open_connection, &ttsd_dbus_close_connection, &ttsdc_dbus_send_utt_start_message,
                                        &ttsdc_dbus_send_utt_finish_message, &ttsdc_dbus_send_set_state_message, &ttsdc_dbus_send_error_message,
-                                       &ttsdc_dbus_send_set_service_state_message};
+                                       &ttsdc_dbus_send_set_service_state_message, &ttsdc_dbus_send_pcm};
 static int(*ttsd_tidl_vtable[])() = {&ttsd_tidl_open_connection, &ttsd_tidl_close_connection, &ttsdc_tidl_send_utt_start_message,
                                        &ttsdc_tidl_send_utt_finish_message, &ttsdc_tidl_send_set_state_message, &ttsdc_tidl_send_error_message,
-                                       &ttsdc_tidl_send_set_service_state_message};
+                                       &ttsdc_tidl_send_set_service_state_message, &ttsdc_tidl_send_pcm};
 
 int ttsd_ipc_open_connection()
 {
@@ -187,3 +187,29 @@ int ttsdc_ipc_send_set_service_state_message(int pid, unsigned int uid, int befo
 
        return TTSD_ERROR_OPERATION_FAILED;
 }
+
+int ttsdc_ipc_send_pcm(int pid, unsigned int uid, int uttid, int event, const void* pcm_data, int pcm_data_size, ttse_audio_type_e audio_type, int sample_rate)
+{
+       SLOG(LOG_INFO, tts_tag(), "[IPC] ttsdc_ipc_send_pcm");
+
+       if (0 > ttsd_data_is_client(uid)) {
+               SLOG(LOG_ERROR, tts_tag(), "[ERROR] uid is not valid (%u)", uid);
+               return TTSD_ERROR_INVALID_PARAMETER;
+       }
+
+       switch (ttsd_data_get_ipc_method(uid))
+       {
+       case TTS_IPC_METHOD_DBUS:
+               SLOG(LOG_DEBUG, tts_tag(), "[IPC] ipc method : dbus");
+               return ttsd_dbus_vtable[SEND_PCM](pid, uid, uttid, event, pcm_data, pcm_data_size, audio_type, sample_rate);
+
+       case TTS_IPC_METHOD_TIDL:
+               SLOG(LOG_DEBUG, tts_tag(), "[IPC] ipc method : tidl");
+               return ttsd_tidl_vtable[SEND_PCM](pid, uid, uttid, event, pcm_data, pcm_data_size, audio_type, sample_rate);
+
+       default:
+               SLOG(LOG_ERROR, tts_tag(), "[ERROR] method is not valid");
+       }
+
+       return TTSD_ERROR_OPERATION_FAILED;
+}
\ No newline at end of file
index b568536..517c76e 100644 (file)
@@ -28,7 +28,8 @@ typedef enum {
        SEND_UTTERANCE_FINISH,
        SEND_SET_STATE,
        SEND_ERROR,
-       SEND_SET_SERVICE_STATE
+       SEND_SET_SERVICE_STATE,
+       SEND_PCM
 } ttsd_ipc_vtable_e;
 
 int ttsd_ipc_open_connection();
@@ -47,6 +48,7 @@ int ttsdc_ipc_send_set_state_message(int pid, unsigned int uid, int state);
 
 int ttsdc_ipc_send_set_service_state_message(int pid, unsigned int uid, int before_state, int current_state);
 
+int ttsdc_ipc_send_pcm(int pid, unsigned int uid, int uttid, int event, const void* pcm_data, int pcm_data_size, ttse_audio_type_e audio_type, int sample_rate);
 
 #ifdef __cplusplus
 }
index e92c6bf..d87b4ce 100644 (file)
@@ -309,18 +309,29 @@ int ttsd_send_result(ttse_result_event_e event, const void* data, unsigned int d
                g_total_data_size += data_size;
        }
 
-       /* add wav data */
-       sound_data_s* sound_data = ttsd_data_create_sound_data(uttid, data, data_size, event, audio_type, rate, 0);
-       if (NULL == sound_data) {
-               SLOG(LOG_ERROR, tts_tag(), "[SERVER ERROR] Out of memory");
-               return TTSD_ERROR_OUT_OF_MEMORY;
-       }
+       ttsd_playing_mode_e playing_mode = ttsd_data_get_playing_mode(uid);
+       SLOG(LOG_DEBUG, tts_tag(), "[SERVER] uid(%d), playing mode(%d)", uid, playing_mode);
+       if (TTSD_PLAYING_MODE_BY_SERVICE == playing_mode) {
+               /* add wav data */
+               sound_data_s* sound_data = ttsd_data_create_sound_data(uttid, data, data_size, event, audio_type, rate, 0);
+               if (NULL == sound_data) {
+                       SLOG(LOG_ERROR, tts_tag(), "[SERVER ERROR] Out of memory");
+                       return TTSD_ERROR_OUT_OF_MEMORY;
+               }
 
-       if (0 != ttsd_data_add_sound_data(uid, sound_data)) {
-               SECURE_SLOG(LOG_ERROR, tts_tag(), "[SERVER ERROR] Fail to add sound data : uid(%u)", uid);
-               ttsd_data_destroy_sound_data(sound_data);
+               if (0 != ttsd_data_add_sound_data(uid, sound_data)) {
+                       SECURE_SLOG(LOG_ERROR, tts_tag(), "[SERVER ERROR] Fail to add sound data : uid(%u)", uid);
+                       ttsd_data_destroy_sound_data(sound_data);
 
-               return TTSD_ERROR_OPERATION_FAILED;
+                       return TTSD_ERROR_OPERATION_FAILED;
+               }
+       } else { /* TTSD_PLAYING_MODE_BY_CLIENT */
+               /* send pcm data to client */
+               int tmp_pid = ttsd_data_get_pid(uid);
+               if (0 != ttsdc_ipc_send_pcm(tmp_pid, uid, uttid, event, data, data_size, audio_type, rate)) {
+                       SLOG(LOG_ERROR, tts_tag(), "[SERVER ERROR] Fail to send pcm data to client");
+                       return TTSD_ERROR_OPERATION_FAILED;
+               }
        }
 
        if (event == TTSE_RESULT_EVENT_FINISH) {
index f1bb408..f410154 100644 (file)
@@ -601,3 +601,31 @@ int ttsdc_tidl_send_error_message(int pid, unsigned int uid, int uttid, int reas
        bundle_free(msg);
        return TTSD_ERROR_NONE;
 }
+
+int ttsdc_tidl_send_pcm(int pid, unsigned int uid, int uttid, int event, const void* pcm_data, int pcm_data_size, ttse_audio_type_e audio_type, int sample_rate)
+{
+       SLOG(LOG_DEBUG, tts_tag(), "[TIDL] ttsdc_tidl_send_pcm");
+
+       char tmp_uttid[10] = {0, };
+       char tmp_event[10] = {0, };
+       char tmp_audio_type[10] = {0, };
+       char tmp_sample_rate[10] = {0, };
+
+       bundle* msg = bundle_create();
+       snprintf(tmp_uttid, 10, "%d", uttid);
+       snprintf(tmp_event, 10, "%d", event);
+       snprintf(tmp_audio_type, 10, "%d", audio_type);
+       snprintf(tmp_sample_rate, 10, "%d", sample_rate);
+       bundle_add_str(msg, TTS_BUNDLE_METHOD, TTSD_METHOD_SEND_PCM);
+       bundle_add_str(msg, TTS_BUNDLE_UTTID, tmp_uttid);
+       bundle_add_str(msg, TTS_BUNDLE_PCM_EVENT, tmp_event);
+       bundle_add_byte(msg, TTS_BUNDLE_PCM_DATA, pcm_data, (const size_t)pcm_data_size);
+       bundle_add_str(msg, TTS_BUNDLE_PCM_AUDIO_TYPE, tmp_audio_type);
+       bundle_add_str(msg, TTS_BUNDLE_PCM_SAMPLE_RATE, tmp_sample_rate);
+
+       SLOG(LOG_DEBUG, tts_tag(), ">>>>> TTSD SEND PCM MSG");
+       __send_msg(pid, uid, msg);
+
+       bundle_free(msg);
+       return TTSD_ERROR_NONE;
+}
index 71f7748..c354105 100644 (file)
@@ -35,6 +35,8 @@ int ttsdc_tidl_send_error_message(int pid, unsigned int uid, int uttid, int reas
 
 int ttsdc_tidl_send_set_service_state_message(int pid, unsigned int uid, int before_state, int current_state);
 
+int ttsdc_tidl_send_pcm(int pid, unsigned int uid, int uttid, int event, const void* pcm_data, int pcm_data_size, ttse_audio_type_e audio_type, int sample_rate);
+
 #ifdef __cplusplus
 }
 #endif