Fix paused data handling logic 80/271380/1
authorSuyeon Hwang <stom.hwang@samsung.com>
Fri, 14 May 2021 05:37:55 +0000 (14:37 +0900)
committerSuyeon Hwang <stom.hwang@samsung.com>
Fri, 18 Feb 2022 10:33:29 +0000 (19:33 +0900)
commit41d9c57a34bbb6f91af1e055cdab2d64e7165c32
tree93d9f3de3c34ab8e8e866e6392deee2478b9c66d
parent10ed07729faadfa2deed3c5aa0a66f569d48c4df
Fix paused data handling logic

By current pause logic, player_s stores pointer of paused sound_data_s and its data index for
resuming, and these are stored sperately by member variable of player_s.
However, the index and sound_data_s can be managed together if sound_data_s has the member for
data index, although current logic has no problem.
And also, managing together is easy and safe to handle paused data.
If we combine paseud index and data with sound_data_s, player_s should not store the data, because
the first data of the list from ttsd_data is the last played data and it should be paused data
itself.

By this patch, new functions are defined on ttsd_data. These functions provides interface to access
sound data. And also this patch creates new functions for checking whether client has pasued data
or not.

Change-Id: I9ca41a08bafdff97ae7b4ba3981897cd9485bbe4
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
server/ttsd_data.cpp
server/ttsd_data.h
server/ttsd_player.cpp