Add ttsd_player_wait_to_play for creating AudioStream 94/316694/1
authordyamy-lee <dyamy.lee@samsung.com>
Mon, 19 Aug 2024 11:45:47 +0000 (20:45 +0900)
committerSooyeon Kim <sooyeon.kim@samsung.com>
Tue, 27 Aug 2024 04:45:15 +0000 (04:45 +0000)
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

index c8146b9b1eed85f7c54067e706526001624d5fc1..62a15a5381b84c460936c6056f1001db450c51f9 100644 (file)
@@ -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);