.bus_name = "org.tizen.AudioClient",
.object = "/org/tizen/AudioClient1",
.interface = "org.tizen.AudioClient1"
+ },
+ [AUDIO_PROVIDER_SOUND_PLAYER] = {
+ .bus_name = "org.pulseaudio.Server",
+ .object = "/org/pulseaudio/SoundPlayer",
+ .interface = "org.pulseaudio.SoundPlayer"
}
};
[AUDIO_METHOD_TEST] = {
.name = "MethodTest1",
},
- [AUDIO_METHOD_PLAY_FILE_START_WITH_STREAM_INFO] = {
- .name = "PlayFileStartWithStreamInfo",
+ [AUDIO_METHOD_SOUND_PLAY] = {
+ .name = "SoundPlay",
},
- [AUDIO_METHOD_PLAY_FILE_STOP] = {
- .name = "PlayFileStop",
+ [AUDIO_METHOD_SOUND_STOP] = {
+ .name = "SoundStop",
},
[AUDIO_METHOD_PLAY_DTMF_WITH_STREAM_INFO] = {
.name = "PlayDTMFWithStreamInfo",
[AUDIO_EVENT_TEST] = {
.name = "SignalTest1",
},
- [AUDIO_EVENT_PLAY_FILE_END] = {
- .name = "PlayFileEnd",
+ [AUDIO_EVENT_SOUND_PLAY_EOS] = {
+ .name = "EOS",
},
[AUDIO_EVENT_VOLUME_CHANGED] = {
.name = "VolumeChanged",
(cb_data->user_cb)(AUDIO_EVENT_FOCUS_CHANGED, params, cb_data->user_data);
else if (!strcmp(signal_name, g_events[AUDIO_EVENT_FOCUS_WATCH].name))
(cb_data->user_cb)(AUDIO_EVENT_FOCUS_WATCH, params, cb_data->user_data);
- else if (!strcmp(signal_name, g_events[AUDIO_EVENT_PLAY_FILE_END].name))
- (cb_data->user_cb)(AUDIO_EVENT_PLAY_FILE_END, params, cb_data->user_data);
+ else if (!strcmp(signal_name, g_events[AUDIO_EVENT_SOUND_PLAY_EOS].name))
+ (cb_data->user_cb)(AUDIO_EVENT_SOUND_PLAY_EOS, params, cb_data->user_data);
else if (!strcmp(signal_name, g_events[AUDIO_EVENT_DEVICE_RUNNING_CHANGED].name))
(cb_data->user_cb)(AUDIO_EVENT_DEVICE_RUNNING_CHANGED, params, cb_data->user_data);
else if (!strcmp(signal_name, g_events[AUDIO_EVENT_DUCKING_STATE_CHANGED].name))
AUDIO_PROVIDER_STREAM_MANAGER,
AUDIO_PROVIDER_FOCUS_SERVER,
AUDIO_PROVIDER_AUDIO_CLIENT,
+ AUDIO_PROVIDER_SOUND_PLAYER,
AUDIO_PROVIDER_MAX
} audio_provider_t;
typedef enum audio_method {
AUDIO_METHOD_TEST,
- AUDIO_METHOD_PLAY_FILE_START_WITH_STREAM_INFO,
- AUDIO_METHOD_PLAY_FILE_STOP,
+ AUDIO_METHOD_SOUND_PLAY,
+ AUDIO_METHOD_SOUND_STOP,
AUDIO_METHOD_PLAY_DTMF_WITH_STREAM_INFO,
AUDIO_METHOD_GET_BT_A2DP_STATUS,
AUDIO_METHOD_SET_PATH_FOR_ACTIVE_DEVICE,
typedef enum audio_event {
AUDIO_EVENT_TEST,
- AUDIO_EVENT_PLAY_FILE_END,
+ AUDIO_EVENT_SOUND_PLAY_EOS,
AUDIO_EVENT_VOLUME_CHANGED,
AUDIO_EVENT_DEVICE_CONNECTED,
AUDIO_EVENT_DEVICE_INFO_CHANGED,
typedef void (*mm_sound_proxy_userdata_free) (void *data);
int mm_sound_proxy_play_tone_with_stream_info(int client_pid, int tone, char *stream_type, int stream_id, int volume, int repeat, int *codechandle);
-int mm_sound_proxy_play_sound_with_stream_info(const char* filename, int repeat, int volume,
+int mm_sound_proxy_play_sound_with_stream_info(const char* filename, int repeat,
int client_pid, int *codechandle, char *stream_type, int stream_index);
int mm_sound_proxy_stop_sound(int handle);
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);
struct callback_data *cb_data = NULL;
play_sound_end_callback_data_t *end_cb_data;
- ret = mm_sound_proxy_play_sound_with_stream_info(param->filename, param->loop, param->volume,
+ ret = mm_sound_proxy_play_sound_with_stream_info(param->filename, param->loop,
getpid(), handle, stream_type, stream_id);
if (ret != MM_ERROR_NONE) {
debug_error("Play Sound Failed");
int test_var = 0;
g_variant_get(params, "(i)", &test_var);
((mm_sound_test_cb)(cb_data->user_cb))(test_var, cb_data->user_data);
- } else if (event == AUDIO_EVENT_PLAY_FILE_END) {
+ } else if (event == AUDIO_EVENT_SOUND_PLAY_EOS) {
int ended_handle = 0;
g_variant_get(params, "(i)", &ended_handle);
((mm_sound_stop_callback_wrapper_func)(cb_data->user_cb))(ended_handle, cb_data->user_data);
return ret;
}
-int mm_sound_proxy_play_sound_with_stream_info(const char* filename, int repeat, int volume,
- int client_pid, int *codechandle, char *stream_type, int stream_index)
+int mm_sound_proxy_play_sound_with_stream_info(const char* filename, int repeat,
+ int client_pid, int *codechandle, char *stream_type, int stream_id)
{
int ret = MM_ERROR_NONE;
int handle = 0;
debug_fenter();
- if ((params = g_variant_new("(siiisi)", filename, repeat, volume, client_pid, stream_type, stream_index)) == NULL) {
+ if ((params = g_variant_new("(siisi)", filename, repeat, client_pid, stream_type, stream_id)) == NULL) {
debug_error("Construct Param for method call failed");
return MM_ERROR_SOUND_INTERNAL;
}
- if ((ret = mm_sound_dbus_method_call_to(AUDIO_PROVIDER_SOUND_SERVER, AUDIO_METHOD_PLAY_FILE_START_WITH_STREAM_INFO, params, &result)) != MM_ERROR_NONE) {
+ if ((ret = mm_sound_dbus_method_call_to(AUDIO_PROVIDER_SOUND_PLAYER, AUDIO_METHOD_SOUND_PLAY, params, &result)) != MM_ERROR_NONE) {
debug_error("dbus play file failed");
return ret;
}
debug_fenter();
- if ((ret = mm_sound_dbus_method_call_to(AUDIO_PROVIDER_SOUND_SERVER, AUDIO_METHOD_PLAY_FILE_STOP, g_variant_new("(i)", handle), &result)) != MM_ERROR_NONE)
+ if ((ret = mm_sound_dbus_method_call_to(AUDIO_PROVIDER_SOUND_PLAYER, AUDIO_METHOD_SOUND_STOP, g_variant_new("(i)", handle), &result)) != MM_ERROR_NONE)
debug_error("dbus stop file playing failed");
g_variant_unref(result);
CB_DATA_NEW(cb_data, func, userdata, freefunc);
- if ((ret = mm_sound_dbus_signal_subscribe_to(AUDIO_PROVIDER_SOUND_SERVER, AUDIO_EVENT_PLAY_FILE_END, dbus_callback, cb_data, simple_callback_data_free_func, &cb_data->subs_id)) != MM_ERROR_NONE)
+ if ((ret = mm_sound_dbus_signal_subscribe_to(AUDIO_PROVIDER_SOUND_PLAYER, AUDIO_EVENT_SOUND_PLAY_EOS, dbus_callback, cb_data, simple_callback_data_free_func, &cb_data->subs_id)) != MM_ERROR_NONE)
debug_error("add play sound end callback failed");
else
*subs_id = cb_data->subs_id;
Name: libmm-sound
Summary: MMSound Package contains client lib and sound_server binary
-Version: 0.12.67
+Version: 0.12.68
Release: 0
Group: System/Libraries
License: Apache-2.0
},
.handler = handle_method_test
},
- [AUDIO_METHOD_PLAY_FILE_START_WITH_STREAM_INFO] = {
+ [AUDIO_METHOD_SOUND_PLAY] = {
.info = {
- .name = "PlayFileStartWithStreamInfo",
+ .name = "SoundPlay",
},
.handler = handle_method_play_file_start_with_stream_info
},
- [AUDIO_METHOD_PLAY_FILE_STOP] = {
+ [AUDIO_METHOD_SOUND_STOP] = {
.info = {
- .name = "PlayFileStop",
+ .name = "SoundStop",
},
.handler = handle_method_play_file_stop
},
param = g_variant_new("(i)", handle);
if (param) {
- if ((ret = mm_sound_mgr_ipc_dbus_send_signal(AUDIO_EVENT_PLAY_FILE_END, param)) != MM_ERROR_NONE)
+ if ((ret = mm_sound_mgr_ipc_dbus_send_signal(AUDIO_EVENT_SOUND_PLAY_EOS, param)) != MM_ERROR_NONE)
debug_error("Send play file end for '%d' failed", handle);
} else {
debug_error("Build variant for dbus param failed");