From a77a3d53ac0eda1d3efef480d85ff774788b8e9f Mon Sep 17 00:00:00 2001 From: dyamy-lee Date: Mon, 19 Aug 2024 20:45:47 +0900 Subject: [PATCH] Add ttsd_player_wait_to_play for creating AudioStream When playing tts with pcm, it also needs creating AudioStream instance. `ttsd_player_wait_to_play` API helps this, and it makes same logic with `ttsd_server_play` API. Change-Id: I6b912b006bb8d40720b54823ad2352985bf8344d --- server/ttsd_server.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server/ttsd_server.c b/server/ttsd_server.c index c8146b9b..62a15a53 100644 --- a/server/ttsd_server.c +++ b/server/ttsd_server.c @@ -1656,6 +1656,11 @@ int ttsd_server_play_pcm(unsigned int uid) return ret; } + /* Change current play */ + if (0 != ttsd_player_wait_to_play(uid)) { + SLOG(LOG_WARN, tts_tag(), "[Server WARNING] Fail to set to wait for playing : uid(%u)", uid); + } + /* Change current play */ if (0 != ttsd_data_set_client_state(uid, APP_STATE_PLAYING)) { SLOG(LOG_ERROR, tts_tag(), "[Server ERROR] Fail to set state : uid(%u)", uid); -- 2.34.1