*
* @see tone_player_stop()
*/
-int tone_player_start(tone_type_e tone, sound_type_e type, int duration_ms, int *id);
+int tone_player_start(tone_type_e tone, sound_type_e type, int duration_ms, int *id) TIZEN_DEPRECATED_API;
/**
* @brief Plays a tone with stream information of sound-manager.
#include <dlog.h>
+#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)
+
static int __convert_tone_player_error_code(const char *func, int code)
{
int ret = TONE_PLAYER_ERROR_NONE;
{
int ret;
int player;
+
+ DEPRECATED_WARN_INSTEAD("tone_player_start_with_stream_info");
+
if (tone < TONE_TYPE_DEFAULT || tone > TONE_TYPE_USER_DEFINED_HIGH_FRE)
- return __convert_tone_player_error_code(__func__, TONE_PLAYER_ERROR_INVALID_PARAMETER);
+ return __convert_tone_player_error_code(__func__, TONE_PLAYER_ERROR_INVALID_PARAMETER);
ret = mm_sound_play_tone(tone, type , 1, duration, &player);
if (ret == 0 && id != NULL)
*id = player;
+
return __convert_tone_player_error_code(__func__, ret);
}
-int tone_player_start_with_stream_info(tone_type_e tone, sound_stream_info_h stream_info, int duration, int * id)
+int tone_player_start_with_stream_info(tone_type_e tone, sound_stream_info_h stream_info, int duration, int *id)
{
int ret;
int player;
ret = sound_manager_get_type_from_stream_information(stream_info, &stream_type);
if (ret)
return __convert_tone_player_error_code(__func__, ret);
+
ret = sound_manager_get_index_from_stream_information(stream_info, &stream_id);
if (ret)
return __convert_tone_player_error_code(__func__, ret);
ret = mm_sound_play_tone_with_stream_info(tone, stream_type, stream_id, vol, duration, &player);
-
if (ret == 0 && id != NULL)
*id = player;
return __convert_tone_player_error_code(__func__, ret);
-
-
}
int tone_player_stop(int id)