summaryrefslogtreecommitdiff
path: root/server/mm_sound_mgr_codec.c
diff options
context:
space:
mode:
authorSeungbae Shin <seungbae.shin@samsung.com>2012-08-21 17:59:19 +0900
committerSeungbae Shin <seungbae.shin@samsung.com>2012-08-21 20:51:34 +0900
commit4b557013c69aba50fe1197bf556d4c24dc9f96e3 (patch)
tree296377f274d9c20213753ec0710116a18f5745d4 /server/mm_sound_mgr_codec.c
parent13c42beed719f9c7911c2d82c5c3b6b531a06e55 (diff)
downloadlibmm-sound-4b557013c69aba50fe1197bf556d4c24dc9f96e3.tar.gz
libmm-sound-4b557013c69aba50fe1197bf556d4c24dc9f96e3.tar.bz2
libmm-sound-4b557013c69aba50fe1197bf556d4c24dc9f96e3.zip
2.0 init
Change-Id: I1fccce4dee3e9a772dc8b9b3580296eaad513a77
Diffstat (limited to 'server/mm_sound_mgr_codec.c')
-rw-r--r--server/mm_sound_mgr_codec.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/server/mm_sound_mgr_codec.c b/server/mm_sound_mgr_codec.c
index 6f95ad2..789e083 100644
--- a/server/mm_sound_mgr_codec.c
+++ b/server/mm_sound_mgr_codec.c
@@ -35,6 +35,8 @@
#include "include/mm_sound_plugin_codec.h"
#include "include/mm_sound_thread_pool.h"
+#include "include/mm_sound_mgr_asm.h"
+
#define _ENABLE_KEYTONE /* Temporal test code */
@@ -241,8 +243,8 @@ int MMSoundMgrCodecPlay(int *slotid, const mmsound_mgr_codec_param_t *param)
int need_asm_unregister = 0;
if(param->session_type != ASM_EVENT_CALL && param->session_type != ASM_EVENT_VIDEOCALL) {
- if(!ASM_register_sound((int)param->param, &param->session_handle, param->session_type, ASM_STATE_PLAYING,
- sound_codec_asm_callback, (void*)*slotid, ASM_RESOURCE_NONE, &errorcode)) {
+ if(!ASM_register_sound_ex((int)param->param, &param->session_handle, param->session_type, ASM_STATE_PLAYING,
+ sound_codec_asm_callback, (void*)*slotid, ASM_RESOURCE_NONE, &errorcode, __asm_process_message)) {
debug_critical("ASM_register_sound() failed %d\n", errorcode);
pthread_mutex_unlock(&g_slot_mutex);
return MM_ERROR_POLICY_INTERNAL;
@@ -286,7 +288,7 @@ int MMSoundMgrCodecPlay(int *slotid, const mmsound_mgr_codec_param_t *param)
cleanup:
if(param->session_type != ASM_EVENT_CALL && param->session_type != ASM_EVENT_VIDEOCALL && need_asm_unregister == 1) {
- if(!ASM_unregister_sound(param->session_handle, param->session_type, &errorcode)) {
+ if(!ASM_unregister_sound_ex(param->session_handle, param->session_type, &errorcode,__asm_process_message)) {
debug_error("Unregister sound failed 0x%X\n", errorcode);
return MM_ERROR_POLICY_INTERNAL;
}
@@ -358,8 +360,8 @@ int MMSoundMgrCodecPlayDtmf(int *slotid, const mmsound_mgr_codec_param_t *param)
int need_asm_unregister = 0;
if(param->session_type != ASM_EVENT_CALL && param->session_type != ASM_EVENT_VIDEOCALL) {
- if(!ASM_register_sound((int)param->param, &param->session_handle, param->session_type, ASM_STATE_PLAYING,
- sound_codec_asm_callback, (void*)*slotid, ASM_RESOURCE_NONE, &errorcode)) {
+ if(!ASM_register_sound_ex((int)param->param, &param->session_handle, param->session_type, ASM_STATE_PLAYING,
+ sound_codec_asm_callback, (void*)*slotid, ASM_RESOURCE_NONE, &errorcode, __asm_process_message)) {
debug_critical("ASM_register_sound() failed %d\n", errorcode);
pthread_mutex_unlock(&g_slot_mutex);
return MM_ERROR_POLICY_INTERNAL;
@@ -454,7 +456,7 @@ static int _MMSoundMgrCodecStopCallback(int param)
if(g_slots[param].session_type != ASM_EVENT_CALL && g_slots[param].session_type != ASM_EVENT_VIDEOCALL) {
debug_msg("[CODEC MGR] ASM unregister\n");
- if(!ASM_unregister_sound(g_slots[param].session_handle, g_slots[param].session_type, &errorcode)) {
+ if(!ASM_unregister_sound_ex(g_slots[param].session_handle, g_slots[param].session_type, &errorcode, __asm_process_message)) {
debug_error("[CODEC MGR] Unregister sound failed 0x%X\n", errorcode);
}
}