if (NULL != sound) {
int id = 0;
intptr_t puid = (intptr_t)uid;
- ret = wav_player_start(sound, SOUND_TYPE_MEDIA, __sttd_start_sound_completed_cb, (void*)puid, &id);
- if (WAV_PLAYER_ERROR_NONE != ret) {
- SLOG(LOG_ERROR, TAG_STTD, "[Server ERROR] Fail to play wav");
+ sound_stream_info_h wav_stream_info_h;
+ if (0 != sound_manager_create_stream_information(SOUND_STREAM_TYPE_MEDIA, NULL, NULL, &wav_stream_info_h)) {
+ SLOG(LOG_ERROR, TAG_STTD, "[Server ERROR] Fail to create stream info for playing wav");
is_sound_done = true;
+ } else {
+ ret = wav_player_start_new(sound, wav_stream_info_h, __sttd_start_sound_completed_cb, (void*)puid, &id);
+ if (WAV_PLAYER_ERROR_NONE != ret) {
+ SLOG(LOG_ERROR, TAG_STTD, "[Server ERROR] Fail to play wav");
+ is_sound_done = true;
+ }
+
+ if (0 != sound_manager_destroy_stream_information(wav_stream_info_h)) {
+ SLOG(LOG_ERROR, TAG_STTD, "[Server ERROR] Fail to destroy stream info for playing wav");
+ }
}
free(sound);
sound = NULL;
if (NULL != sound) {
int id = 0;
intptr_t puid = (intptr_t)uid;
- ret = wav_player_start(sound, SOUND_TYPE_MEDIA, __sttd_stop_sound_completed_cb, (void*)puid, &id);
- if (WAV_PLAYER_ERROR_NONE != ret) {
- SLOG(LOG_ERROR, TAG_STTD, "[Server ERROR] Fail to play wav");
+ sound_stream_info_h wav_stream_info_h;
+ if (0 != sound_manager_create_stream_information(SOUND_STREAM_TYPE_MEDIA, NULL, NULL, &wav_stream_info_h)) {
+ SLOG(LOG_ERROR, TAG_STTD, "[Server ERROR] Fail to create stream info for playing wav");
} else {
- SLOG(LOG_DEBUG, TAG_STTD, "[Server] Play wav : %s", sound);
- }
+ ret = wav_player_start_new(sound, wav_stream_info_h, __sttd_stop_sound_completed_cb, (void*)puid, &id);
+ if (WAV_PLAYER_ERROR_NONE != ret) {
+ SLOG(LOG_ERROR, TAG_STTD, "[Server ERROR] Fail to play wav");
+ } else {
+ SLOG(LOG_DEBUG, TAG_STTD, "[Server] Play wav : %s", sound);
+ }
+ if (0 != sound_manager_destroy_stream_information(wav_stream_info_h)) {
+ SLOG(LOG_ERROR, TAG_STTD, "[Server ERROR] Fail to destroy stream info for playing wav");
+ }
+ }
free(sound);
g_processing_timer = ecore_timer_add(g_processing_timeout, __time_out_for_processing, NULL);