}
///////////////////////////////////
-//// MMSOUND PLAY APIs
-///////////////////////////////////
-EXPORT_API
-int mm_sound_play_sound_with_stream_info(const char *filename, char *stream_type, int stream_id, unsigned int loop, mm_sound_stop_callback_func callback, void *data, int *handle)
-{
- MMSoundPlayParam param = { 0, };
- int err;
-
- param.filename = filename;
- param.volume = 0; //volume value dose not effect anymore
- param.callback = callback;
- param.data = data;
-
- if (loop == 0)
- param.loop = -1;
- else
- param.loop = loop;
-
- err = mm_sound_client_play_sound_with_stream_info(¶m, handle, stream_type, stream_id);
- if (err < 0) {
- debug_error("Failed to play sound");
- return err;
- }
-
- debug_warning("success : handle=[%p]", handle);
-
- return MM_ERROR_NONE;
-
-}
-
-
-EXPORT_API
-int mm_sound_stop_sound(int handle)
-{
- int err;
-
- debug_warning("enter : handle=[%d]", handle);
- /* Stop sound */
- err = mm_sound_client_stop_sound(handle);
- if (err < 0) {
- debug_error("Fail to stop sound");
- return err;
- }
- debug_warning("success : handle=[%d]", handle);
-
- return MM_ERROR_NONE;
-}
-
-EXPORT_API
-int mm_sound_stop_tone(int handle)
-{
- int err;
-
- debug_warning("enter : handle=[%d]", handle);
-
- err = mm_sound_client_stop_tone(handle);
- if (err < 0) {
- debug_error("Fail to stop tone. err=0x%x", err);
- return err;
- }
- debug_msg("success : handle=[%d]", handle);
-
- return MM_ERROR_NONE;
-}
-
-///////////////////////////////////
-//// MMSOUND TONE APIs
-///////////////////////////////////
-EXPORT_API
-int mm_sound_play_tone_with_stream_info(MMSoundTone_t tone, char *stream_type, int stream_id, const double volume, const int duration, int *handle)
-{
-
- int err = MM_ERROR_NONE;
-
- err = mm_sound_client_play_tone_with_stream_info(tone, stream_type, stream_id, volume, duration, handle);
- if (err < 0) {
- debug_error("Failed to play sound");
- return err;
- }
-
- return err;
-
-}
-
-///////////////////////////////////
//// MMSOUND ROUTING APIs
///////////////////////////////////
EXPORT_API
-int mm_sound_test(int a, int b, int* getv)
-{
- int ret = MM_ERROR_NONE;
-
- debug_log("mm_sound_test enter");
- if (!getv) {
- debug_error("argu null");
- return MM_ERROR_INVALID_ARGUMENT;
- }
- ret = mm_sound_client_test(a, b, getv);
- if (ret < 0) {
- debug_error("Can not mm sound test, ret = %x", ret);
- }
- debug_log("mm_sound_test leave");
-
- return ret;
-}
-
-EXPORT_API
-int mm_sound_add_test_callback(mm_sound_test_cb func, void *user_data, unsigned int *subs_id)
-{
- int ret = MM_ERROR_NONE;
-
- debug_log("enter");
- if (!func || !subs_id) {
- debug_error("argument is not valid");
- return MM_ERROR_INVALID_ARGUMENT;
- }
-
- ret = mm_sound_client_add_test_callback(func, user_data, subs_id);
- if (ret < 0) {
- debug_error("Can not add test callback, ret = %x", ret);
- }
- debug_log("leave");
-
- return ret;
-}
-
-EXPORT_API
-int mm_sound_remove_test_callback(unsigned int subs_id)
-{
- int ret = MM_ERROR_NONE;
-
- debug_log("enter");
- ret = mm_sound_client_remove_test_callback(subs_id);
- if (ret < 0) {
- debug_error("Can not remove test callback, ret = %x", ret);
- }
- debug_log("leave");
-
- return ret;
-}
-
-EXPORT_API
int mm_sound_add_ducking_state_changed_callback(mm_sound_ducking_state_changed_cb func, void *user_data, unsigned int *subs_id)
{
int ret = MM_ERROR_NONE;