summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPrince <prince@P-Ubuntu.(none)>2012-10-31 15:57:00 +0900
committerPrince <prince@P-Ubuntu.(none)>2012-10-31 15:59:14 +0900
commitebeae0b96788b84c8574c0fc7af0d8bb7beb903e (patch)
treedfb162d54a816564aab29591f61fccc86b554879
parent98a93dcc1aea1ab37b27b6d56e4461af33f29e88 (diff)
downloadedje-multisense-plugin-ebeae0b96788b84c8574c0fc7af0d8bb7beb903e.tar.gz
edje-multisense-plugin-ebeae0b96788b84c8574c0fc7af0d8bb7beb903e.tar.bz2
edje-multisense-plugin-ebeae0b96788b84c8574c0fc7af0d8bb7beb903e.zip
New MMSound API is being used for explicit multisense session.
Change-Id: I841329822e3e6808ceebebfc8b142a203cf3f119
-rw-r--r--packaging/edje_multisense_plugin.spec2
-rw-r--r--src/tizen_sound_player/tizen_sound_player.c14
2 files changed, 13 insertions, 3 deletions
diff --git a/packaging/edje_multisense_plugin.spec b/packaging/edje_multisense_plugin.spec
index 6d56690..de740ef 100644
--- a/packaging/edje_multisense_plugin.spec
+++ b/packaging/edje_multisense_plugin.spec
@@ -40,4 +40,4 @@ rm -f edje-multisense-plugin*.tar.bz2 edje-multisense-plugin-*.tar.bz2.cdbs-conf
%doc AUTHORS COPYING ChangeLog INSTALL NEWS README
%{_libdir}/remix/*
%manifest %{name}.manifest
-/usr/share/license/%{name}
+/usr/share/license/%{name} \ No newline at end of file
diff --git a/src/tizen_sound_player/tizen_sound_player.c b/src/tizen_sound_player/tizen_sound_player.c
index d052f1e..6882005 100644
--- a/src/tizen_sound_player/tizen_sound_player.c
+++ b/src/tizen_sound_player/tizen_sound_player.c
@@ -59,15 +59,22 @@ remix_player_reset_device (RemixEnv *env, RemixBase *base)
if (player_data->handle)
{
+ mm_sound_pcm_play_stop(player_data->handle);
mm_sound_pcm_play_close(player_data->handle);
player_data->handle = NULL;
}
old_buffer_size = player_data->buffer_size;
- player_data->buffer_size = mm_sound_pcm_play_open(&player_data->handle,
+ player_data->buffer_size = mm_sound_pcm_play_open_no_session(&player_data->handle,
player_data->frequency,
player_data->channel,
DEFAULT_FORMAT,
VOLUME_TYPE_SYSTEM);
+ if(mm_sound_pcm_play_start(player_data->handle) < 0)
+ {
+ remix_set_error (env, REMIX_ERROR_SYSTEM);
+ return RemixNone;
+ }
+
if(player_data->buffer_size < 0)
{
remix_set_error (env, REMIX_ERROR_SYSTEM);
@@ -173,7 +180,10 @@ remix_player_destroy (RemixEnv *env, RemixBase *base)
WRN("\nFail to unregister VCONFKEY_SYSMAN_EARJACK key callback");
if(player_data->handle)
- mm_sound_pcm_play_close(player_data->handle);
+ {
+ mm_sound_pcm_play_stop(player_data->handle);
+ mm_sound_pcm_play_close(player_data->handle);
+ }
if(player_data->playbuffer) free(player_data->playbuffer);
free (player_data);
return 0;