* @see wav_player_stop()
* @see wav_player_playback_completed_cb()
*/
-int wav_player_start(const char *path, sound_type_e type, wav_player_playback_completed_cb callback, void *user_data, int *id);
+int wav_player_start(const char *path, sound_type_e type, wav_player_playback_completed_cb callback, void *user_data, int *id) TIZEN_DEPRECATED_API;
/**
* @brief Plays a WAV file with stream information of sound-manager.
#include "wav_player.h"
#include "wav_player_private.h"
-int wav_player_start(const char *path, sound_type_e type, wav_player_playback_completed_cb cb, void *user_data, int * id)
+#define DEPRECATED_WARN_INSTEAD(msg) do { \
+ LOGW("DEPRECATION WARNING: %s() is deprecated and will be removed from next release. Use %s() instead.", __func__, msg); \
+} while (0)
+
+int wav_player_start(const char *path, sound_type_e type, wav_player_playback_completed_cb cb, void *user_data, int *id)
{
int ret = MM_ERROR_NONE;
int player = -1;
_completed_cb = NULL;
_cb_data *cb_data = NULL;
+ DEPRECATED_WARN_INSTEAD("wav_player_start_with_stream_info");
+
if (path == NULL)
return _convert_wav_player_error_code(__func__, WAV_PLAYER_ERROR_INVALID_PARAMETER);
m_path[0] = '\0';
if (path[0] != '/') {
-
if (getcwd(m_path, PATH_MAX) != NULL)
strncat(m_path, "/", PATH_MAX-strlen(m_path));
}
}
ret = mm_sound_play_sound(m_path, type, _completed_cb , cb_data, &player);
-
if (ret == 0 && id != NULL)
*id = player;