[AUDIO_METHOD_SOUND_STOP] = {
.name = "SoundStop",
},
+ [AUDIO_METHOD_STOP_TONE] = {
+ .name = "StopTone",
+ },
[AUDIO_METHOD_PLAY_DTMF_WITH_STREAM_INFO] = {
.name = "PlayDTMFWithStreamInfo",
},
AUDIO_METHOD_TEST,
AUDIO_METHOD_SOUND_PLAY,
AUDIO_METHOD_SOUND_STOP,
+ AUDIO_METHOD_STOP_TONE,
AUDIO_METHOD_PLAY_DTMF_WITH_STREAM_INFO,
AUDIO_METHOD_GET_BT_A2DP_STATUS,
AUDIO_METHOD_SET_PATH_FOR_ACTIVE_DEVICE,
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
///////////////////////////////////
int ret = MM_ERROR_NONE;
debug_fenter();
- if (handle < 0 || handle > CLIENT_HANDLE_MAX) {
+ if (handle < 0) {
ret = MM_ERROR_INVALID_ARGUMENT;
return ret;
}
return ret;
}
+int mm_sound_client_stop_tone(int handle)
+{
+ int ret = MM_ERROR_NONE;
+ debug_fenter();
+
+ if (handle < 0 || handle > CLIENT_HANDLE_MAX)
+ return MM_ERROR_INVALID_ARGUMENT;
+
+ ret = mm_sound_proxy_stop_tone(handle);
+
+ debug_fleave();
+ return ret;
+}
+
static int _mm_sound_client_device_list_dump(GList *device_list)
{
int ret = MM_ERROR_NONE;
return ret;
}
+int mm_sound_proxy_stop_tone(int handle)
+{
+ int ret = MM_ERROR_NONE;
+ GVariant *result = NULL;
+
+ debug_fenter();
+
+ if ((ret = mm_sound_dbus_method_call_to(AUDIO_PROVIDER_SOUND_SERVER, AUDIO_METHOD_STOP_TONE, g_variant_new("(i)", handle), &result)) != MM_ERROR_NONE)
+ debug_error("dbus stop file playing failed");
+
+ if (result)
+ g_variant_unref(result);
+
+ debug_fleave();
+ return ret;
+}
+
int mm_sound_proxy_add_play_sound_end_callback(mm_sound_stop_callback_wrapper_func func, void* userdata, mm_sound_proxy_userdata_free freefunc, unsigned *subs_id)
{
int ret = MM_ERROR_NONE;
Name: libmm-sound
Summary: MMSound Package contains client lib and sound_server binary
-Version: 0.12.71
+Version: 0.12.72
Release: 0
Group: System/Libraries
License: Apache-2.0
" <arg type='i' name='stream_index' direction='in'/>"
" <arg type='i' name='handle' direction='out'/>"
" </method>"
- " <method name='PlayFileStop'>"
+ " <method name='StopTone'>"
" <arg type='i' name='handle' direction='in'/>"
" </method>"
" <method name='PlayDTMFWithStreamInfo'>"
},
.handler = handle_method_test
},
- [AUDIO_METHOD_SOUND_PLAY] = {
+ [AUDIO_METHOD_STOP_TONE] = {
.info = {
- .name = "SoundPlay",
- },
- .handler = handle_method_play_file_start_with_stream_info
- },
- [AUDIO_METHOD_SOUND_STOP] = {
- .info = {
- .name = "SoundStop",
+ .name = "StopTone",
},
.handler = handle_method_play_file_stop
},