summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/Makefile.am2
-rw-r--r--test/asm_testsuite.c12
2 files changed, 13 insertions, 1 deletions
diff --git a/test/Makefile.am b/test/Makefile.am
index df09a2e..83a7a07 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -7,6 +7,8 @@ asm_testsuite_CFLAGS = -I$(srcdir)/../include \
$(DLOG_CFLAGS) \
$(VCONF_CFLAGS)
+asm_testsuite_CFLAGS += -fPIC -pie
+
asm_testsuite_DEPENDENCIES = $(srcdir)/../.libs/libaudio-session-mgr.la
asm_testsuite_LDADD = $(AUDIOSESSIONMGR_LIBS) \
diff --git a/test/asm_testsuite.c b/test/asm_testsuite.c
index 88b8f32..c5b963f 100644
--- a/test/asm_testsuite.c
+++ b/test/asm_testsuite.c
@@ -20,7 +20,17 @@ asm_callback (int handle, ASM_event_sources_t event_src, ASM_sound_commands_t co
{
g_print ("\n[%s] handle = %d, event src = %d, command = %d, sound_state = %d, cb_data = %p\n\n",
__func__, handle, event_src, command, sound_status, cb_data);
- return ASM_CB_RES_NONE;
+ switch (command) {
+ case ASM_COMMAND_PLAY:
+ case ASM_COMMAND_RESUME:
+ return ASM_CB_RES_PLAYING;
+ case ASM_COMMAND_STOP:
+ return ASM_CB_RES_STOP;
+ case ASM_COMMAND_PAUSE:
+ return ASM_CB_RES_PAUSE;
+ default:
+ return ASM_CB_RES_NONE;
+ }
}
ASM_cb_result_t