Get client state whether it is paused or not 37/309337/1
authorsooyeon <sooyeon.kim@samsung.com>
Tue, 9 Apr 2024 01:06:28 +0000 (10:06 +0900)
committersooyeon <sooyeon.kim@samsung.com>
Tue, 9 Apr 2024 01:06:33 +0000 (10:06 +0900)
- Issue:
Although playing TTS is paused, when this is resumed to play, it is not played from the stopped moment.
The changed state is not checked inside the player thread.

- Solution:
By getting the client state again inside the player thread, the sound data which is playing is saved.

Change-Id: I533ddf5f4e3fd23ab847ba3fa89757be2f36ce8d
Signed-off-by: sooyeon <sooyeon.kim@samsung.com>
server/ttsd_player.cpp

index f7670c48e619d65784e0c7490225aea7e43bf4f1..edd09c1aaa5bdbf9223759d69f942da86d199405 100644 (file)
@@ -261,6 +261,7 @@ static int __play_sound_data(PlayerThread* player, unsigned int uid, sound_data_
                        SLOG(LOG_INFO, tts_tag(), "[Player INFO] After audio_out_write");
                }
 
+               state = ttsd_data_get_client_state(uid);
                if (APP_STATE_PAUSED == state) {
                        return TTSD_ERROR_INVALID_STATE;
                }