[UTC][sound-pool][Non-ACR][Added TC to test .ogg file format]
authoraravind.gara <aravind.gara@samsung.com>
Mon, 25 Sep 2017 10:46:49 +0000 (19:46 +0900)
committerJihun Park <jihun87.park@samsung.com>
Fri, 29 Sep 2017 02:29:25 +0000 (02:29 +0000)
Change-Id: Ia5cf1e80692e84efa5ce2ea96486154b5cbe91e9
Signed-off-by: aravind.gara <aravind.gara@samsung.com>
src/utc/sound-pool/res/a.wav [deleted file]
src/utc/sound-pool/res/sound_1.wav [new file with mode: 0644]
src/utc/sound-pool/res/sound_2.ogg [new file with mode: 0644]
src/utc/sound-pool/tct-sound-pool-core_mobile.h
src/utc/sound-pool/tct-sound-pool-core_wearable.h
src/utc/sound-pool/utc-sound-pool.c

diff --git a/src/utc/sound-pool/res/a.wav b/src/utc/sound-pool/res/a.wav
deleted file mode 100644 (file)
index 77abc3a..0000000
Binary files a/src/utc/sound-pool/res/a.wav and /dev/null differ
diff --git a/src/utc/sound-pool/res/sound_1.wav b/src/utc/sound-pool/res/sound_1.wav
new file mode 100644 (file)
index 0000000..77abc3a
Binary files /dev/null and b/src/utc/sound-pool/res/sound_1.wav differ
diff --git a/src/utc/sound-pool/res/sound_2.ogg b/src/utc/sound-pool/res/sound_2.ogg
new file mode 100644 (file)
index 0000000..0a5bb55
Binary files /dev/null and b/src/utc/sound-pool/res/sound_2.ogg differ
index 7473146f19edd478091905303483b6b3bdc750fd..64c7fd43190f942dbd4f128d8fedf04623f8adbb 100644 (file)
@@ -20,6 +20,7 @@
 #include "tct_common.h"
 
 extern void utc_sound_pool_startup(void);
+extern void utc_sound_pool_stream_play_p4_startup(void);
 extern void utc_sound_pool_cleanup(void);
 
 extern int utc_sound_pool_create_p(void);
@@ -34,6 +35,7 @@ extern int utc_sound_pool_unload_source_n(void);
 extern int utc_sound_pool_stream_play_p(void);
 extern int utc_sound_pool_stream_play_p2(void);
 extern int utc_sound_pool_stream_play_p3(void);
+extern int utc_sound_pool_stream_play_p4(void);
 extern int utc_sound_pool_stream_play_n(void);
 extern int utc_sound_pool_stream_pause_p(void);
 extern int utc_sound_pool_stream_pause_p2(void);
@@ -69,11 +71,11 @@ extern int utc_sound_pool_set_state_changed_cb_n(void);
 extern int utc_sound_pool_unset_state_changed_cb_p(void);
 extern int utc_sound_pool_unset_state_changed_cb_n(void);
 testcase tc_array[] = {
-    {"utc_sound_pool_create_p", utc_sound_pool_create_p, utc_sound_pool_startup, utc_sound_pool_cleanup},
-    {"utc_sound_pool_create_n", utc_sound_pool_create_n, utc_sound_pool_startup, utc_sound_pool_cleanup},
-    {"utc_sound_pool_create_n2", utc_sound_pool_create_n2, utc_sound_pool_startup, utc_sound_pool_cleanup},
-    {"utc_sound_pool_destroy_p", utc_sound_pool_destroy_p, utc_sound_pool_startup, utc_sound_pool_cleanup},
-    {"utc_sound_pool_destroy_n", utc_sound_pool_destroy_n, utc_sound_pool_startup, utc_sound_pool_cleanup},
+    {"utc_sound_pool_create_p", utc_sound_pool_create_p, NULL, NULL},
+    {"utc_sound_pool_create_n", utc_sound_pool_create_n, NULL, NULL},
+    {"utc_sound_pool_create_n2", utc_sound_pool_create_n2, NULL, utc_sound_pool_cleanup},
+    {"utc_sound_pool_destroy_p", utc_sound_pool_destroy_p, NULL, NULL},
+    {"utc_sound_pool_destroy_n", utc_sound_pool_destroy_n, NULL, utc_sound_pool_cleanup},
     {"utc_sound_pool_load_source_from_file_p", utc_sound_pool_load_source_from_file_p, utc_sound_pool_startup, utc_sound_pool_cleanup},
     {"utc_sound_pool_load_source_from_file_n", utc_sound_pool_load_source_from_file_n, utc_sound_pool_startup, utc_sound_pool_cleanup},
     {"utc_sound_pool_unload_source_p", utc_sound_pool_unload_source_p, utc_sound_pool_startup, utc_sound_pool_cleanup},
@@ -81,6 +83,7 @@ testcase tc_array[] = {
     {"utc_sound_pool_stream_play_p", utc_sound_pool_stream_play_p, utc_sound_pool_startup, utc_sound_pool_cleanup},
     {"utc_sound_pool_stream_play_p2", utc_sound_pool_stream_play_p2, utc_sound_pool_startup, utc_sound_pool_cleanup},
     {"utc_sound_pool_stream_play_p3", utc_sound_pool_stream_play_p3, utc_sound_pool_startup, utc_sound_pool_cleanup},
+    {"utc_sound_pool_stream_play_p4", utc_sound_pool_stream_play_p, utc_sound_pool_stream_play_p4_startup, utc_sound_pool_cleanup},
     {"utc_sound_pool_stream_play_n", utc_sound_pool_stream_play_n, utc_sound_pool_startup, utc_sound_pool_cleanup},
     {"utc_sound_pool_stream_pause_p", utc_sound_pool_stream_pause_p, utc_sound_pool_startup, utc_sound_pool_cleanup},
     {"utc_sound_pool_stream_pause_p2", utc_sound_pool_stream_pause_p2, utc_sound_pool_startup, utc_sound_pool_cleanup},
@@ -91,16 +94,16 @@ testcase tc_array[] = {
     {"utc_sound_pool_stream_stop_p", utc_sound_pool_stream_stop_p, utc_sound_pool_startup, utc_sound_pool_cleanup},
     {"utc_sound_pool_stream_stop_n", utc_sound_pool_stream_stop_n, utc_sound_pool_startup, utc_sound_pool_cleanup},
     {"utc_sound_pool_stream_stop_n2", utc_sound_pool_stream_stop_n2, utc_sound_pool_startup, utc_sound_pool_cleanup},
-    {"utc_sound_pool_get_state_p", utc_sound_pool_get_state_p, utc_sound_pool_startup, utc_sound_pool_cleanup},
-    {"utc_sound_pool_get_state_n", utc_sound_pool_get_state_n, utc_sound_pool_startup, utc_sound_pool_cleanup},
-    {"utc_sound_pool_activate_p", utc_sound_pool_activate_p, utc_sound_pool_startup, utc_sound_pool_cleanup},
-    {"utc_sound_pool_activate_n", utc_sound_pool_activate_n, utc_sound_pool_startup, utc_sound_pool_cleanup},
-    {"utc_sound_pool_deactivate_p", utc_sound_pool_deactivate_p, utc_sound_pool_startup, utc_sound_pool_cleanup},
-    {"utc_sound_pool_deactivate_n", utc_sound_pool_deactivate_n, utc_sound_pool_startup, utc_sound_pool_cleanup},
-    {"utc_sound_pool_set_volume_p", utc_sound_pool_set_volume_p, utc_sound_pool_startup, utc_sound_pool_cleanup},
-    {"utc_sound_pool_set_volume_n", utc_sound_pool_set_volume_n, utc_sound_pool_startup, utc_sound_pool_cleanup},
-    {"utc_sound_pool_get_volume_p", utc_sound_pool_get_volume_p, utc_sound_pool_startup, utc_sound_pool_cleanup},
-    {"utc_sound_pool_get_volume_n", utc_sound_pool_get_volume_n, utc_sound_pool_startup, utc_sound_pool_cleanup},
+    {"utc_sound_pool_get_state_p", utc_sound_pool_get_state_p, NULL, utc_sound_pool_cleanup},
+    {"utc_sound_pool_get_state_n", utc_sound_pool_get_state_n, NULL, utc_sound_pool_cleanup},
+    {"utc_sound_pool_activate_p", utc_sound_pool_activate_p, NULL, utc_sound_pool_cleanup},
+    {"utc_sound_pool_activate_n", utc_sound_pool_activate_n, NULL, utc_sound_pool_cleanup},
+    {"utc_sound_pool_deactivate_p", utc_sound_pool_deactivate_p, NULL, utc_sound_pool_cleanup},
+    {"utc_sound_pool_deactivate_n", utc_sound_pool_deactivate_n, NULL, utc_sound_pool_cleanup},
+    {"utc_sound_pool_set_volume_p", utc_sound_pool_set_volume_p, NULL, utc_sound_pool_cleanup},
+    {"utc_sound_pool_set_volume_n", utc_sound_pool_set_volume_n, NULL, utc_sound_pool_cleanup},
+    {"utc_sound_pool_get_volume_p", utc_sound_pool_get_volume_p, NULL, utc_sound_pool_cleanup},
+    {"utc_sound_pool_get_volume_n", utc_sound_pool_get_volume_n, NULL, utc_sound_pool_cleanup},
     {"utc_sound_pool_stream_set_volume_p", utc_sound_pool_set_volume_p, utc_sound_pool_startup, utc_sound_pool_cleanup},
     {"utc_sound_pool_stream_set_volume_n", utc_sound_pool_set_volume_n, utc_sound_pool_startup, utc_sound_pool_cleanup},
     {"utc_sound_pool_stream_get_volume_p", utc_sound_pool_get_volume_p, utc_sound_pool_startup, utc_sound_pool_cleanup},
@@ -111,10 +114,10 @@ testcase tc_array[] = {
     {"utc_sound_pool_stream_get_priority_n", utc_sound_pool_stream_get_priority_n, utc_sound_pool_startup, utc_sound_pool_cleanup},
     {"utc_sound_pool_stream_get_state_p", utc_sound_pool_stream_get_state_p, utc_sound_pool_startup, utc_sound_pool_cleanup},
     {"utc_sound_pool_stream_get_state_n", utc_sound_pool_stream_get_state_n, utc_sound_pool_startup, utc_sound_pool_cleanup},
-    {"utc_sound_pool_set_state_changed_cb_p", utc_sound_pool_set_state_changed_cb_p, utc_sound_pool_startup, utc_sound_pool_cleanup},
-    {"utc_sound_pool_set_state_changed_cb_n", utc_sound_pool_set_state_changed_cb_n, utc_sound_pool_startup, utc_sound_pool_cleanup},
-    {"utc_sound_pool_unset_state_changed_cb_p", utc_sound_pool_unset_state_changed_cb_p, utc_sound_pool_startup, utc_sound_pool_cleanup},
-    {"utc_sound_pool_unset_state_changed_cb_n", utc_sound_pool_unset_state_changed_cb_n, utc_sound_pool_startup, utc_sound_pool_cleanup},
+    {"utc_sound_pool_set_state_changed_cb_p", utc_sound_pool_set_state_changed_cb_p, NULL, utc_sound_pool_cleanup},
+    {"utc_sound_pool_set_state_changed_cb_n", utc_sound_pool_set_state_changed_cb_n, NULL, utc_sound_pool_cleanup},
+    {"utc_sound_pool_unset_state_changed_cb_p", utc_sound_pool_unset_state_changed_cb_p, NULL, utc_sound_pool_cleanup},
+    {"utc_sound_pool_unset_state_changed_cb_n", utc_sound_pool_unset_state_changed_cb_n, NULL, utc_sound_pool_cleanup},
     {NULL, NULL}
 };
 #endif // __TCT_SOUND_POOL_NATIVE_H__
index 7473146f19edd478091905303483b6b3bdc750fd..64c7fd43190f942dbd4f128d8fedf04623f8adbb 100644 (file)
@@ -20,6 +20,7 @@
 #include "tct_common.h"
 
 extern void utc_sound_pool_startup(void);
+extern void utc_sound_pool_stream_play_p4_startup(void);
 extern void utc_sound_pool_cleanup(void);
 
 extern int utc_sound_pool_create_p(void);
@@ -34,6 +35,7 @@ extern int utc_sound_pool_unload_source_n(void);
 extern int utc_sound_pool_stream_play_p(void);
 extern int utc_sound_pool_stream_play_p2(void);
 extern int utc_sound_pool_stream_play_p3(void);
+extern int utc_sound_pool_stream_play_p4(void);
 extern int utc_sound_pool_stream_play_n(void);
 extern int utc_sound_pool_stream_pause_p(void);
 extern int utc_sound_pool_stream_pause_p2(void);
@@ -69,11 +71,11 @@ extern int utc_sound_pool_set_state_changed_cb_n(void);
 extern int utc_sound_pool_unset_state_changed_cb_p(void);
 extern int utc_sound_pool_unset_state_changed_cb_n(void);
 testcase tc_array[] = {
-    {"utc_sound_pool_create_p", utc_sound_pool_create_p, utc_sound_pool_startup, utc_sound_pool_cleanup},
-    {"utc_sound_pool_create_n", utc_sound_pool_create_n, utc_sound_pool_startup, utc_sound_pool_cleanup},
-    {"utc_sound_pool_create_n2", utc_sound_pool_create_n2, utc_sound_pool_startup, utc_sound_pool_cleanup},
-    {"utc_sound_pool_destroy_p", utc_sound_pool_destroy_p, utc_sound_pool_startup, utc_sound_pool_cleanup},
-    {"utc_sound_pool_destroy_n", utc_sound_pool_destroy_n, utc_sound_pool_startup, utc_sound_pool_cleanup},
+    {"utc_sound_pool_create_p", utc_sound_pool_create_p, NULL, NULL},
+    {"utc_sound_pool_create_n", utc_sound_pool_create_n, NULL, NULL},
+    {"utc_sound_pool_create_n2", utc_sound_pool_create_n2, NULL, utc_sound_pool_cleanup},
+    {"utc_sound_pool_destroy_p", utc_sound_pool_destroy_p, NULL, NULL},
+    {"utc_sound_pool_destroy_n", utc_sound_pool_destroy_n, NULL, utc_sound_pool_cleanup},
     {"utc_sound_pool_load_source_from_file_p", utc_sound_pool_load_source_from_file_p, utc_sound_pool_startup, utc_sound_pool_cleanup},
     {"utc_sound_pool_load_source_from_file_n", utc_sound_pool_load_source_from_file_n, utc_sound_pool_startup, utc_sound_pool_cleanup},
     {"utc_sound_pool_unload_source_p", utc_sound_pool_unload_source_p, utc_sound_pool_startup, utc_sound_pool_cleanup},
@@ -81,6 +83,7 @@ testcase tc_array[] = {
     {"utc_sound_pool_stream_play_p", utc_sound_pool_stream_play_p, utc_sound_pool_startup, utc_sound_pool_cleanup},
     {"utc_sound_pool_stream_play_p2", utc_sound_pool_stream_play_p2, utc_sound_pool_startup, utc_sound_pool_cleanup},
     {"utc_sound_pool_stream_play_p3", utc_sound_pool_stream_play_p3, utc_sound_pool_startup, utc_sound_pool_cleanup},
+    {"utc_sound_pool_stream_play_p4", utc_sound_pool_stream_play_p, utc_sound_pool_stream_play_p4_startup, utc_sound_pool_cleanup},
     {"utc_sound_pool_stream_play_n", utc_sound_pool_stream_play_n, utc_sound_pool_startup, utc_sound_pool_cleanup},
     {"utc_sound_pool_stream_pause_p", utc_sound_pool_stream_pause_p, utc_sound_pool_startup, utc_sound_pool_cleanup},
     {"utc_sound_pool_stream_pause_p2", utc_sound_pool_stream_pause_p2, utc_sound_pool_startup, utc_sound_pool_cleanup},
@@ -91,16 +94,16 @@ testcase tc_array[] = {
     {"utc_sound_pool_stream_stop_p", utc_sound_pool_stream_stop_p, utc_sound_pool_startup, utc_sound_pool_cleanup},
     {"utc_sound_pool_stream_stop_n", utc_sound_pool_stream_stop_n, utc_sound_pool_startup, utc_sound_pool_cleanup},
     {"utc_sound_pool_stream_stop_n2", utc_sound_pool_stream_stop_n2, utc_sound_pool_startup, utc_sound_pool_cleanup},
-    {"utc_sound_pool_get_state_p", utc_sound_pool_get_state_p, utc_sound_pool_startup, utc_sound_pool_cleanup},
-    {"utc_sound_pool_get_state_n", utc_sound_pool_get_state_n, utc_sound_pool_startup, utc_sound_pool_cleanup},
-    {"utc_sound_pool_activate_p", utc_sound_pool_activate_p, utc_sound_pool_startup, utc_sound_pool_cleanup},
-    {"utc_sound_pool_activate_n", utc_sound_pool_activate_n, utc_sound_pool_startup, utc_sound_pool_cleanup},
-    {"utc_sound_pool_deactivate_p", utc_sound_pool_deactivate_p, utc_sound_pool_startup, utc_sound_pool_cleanup},
-    {"utc_sound_pool_deactivate_n", utc_sound_pool_deactivate_n, utc_sound_pool_startup, utc_sound_pool_cleanup},
-    {"utc_sound_pool_set_volume_p", utc_sound_pool_set_volume_p, utc_sound_pool_startup, utc_sound_pool_cleanup},
-    {"utc_sound_pool_set_volume_n", utc_sound_pool_set_volume_n, utc_sound_pool_startup, utc_sound_pool_cleanup},
-    {"utc_sound_pool_get_volume_p", utc_sound_pool_get_volume_p, utc_sound_pool_startup, utc_sound_pool_cleanup},
-    {"utc_sound_pool_get_volume_n", utc_sound_pool_get_volume_n, utc_sound_pool_startup, utc_sound_pool_cleanup},
+    {"utc_sound_pool_get_state_p", utc_sound_pool_get_state_p, NULL, utc_sound_pool_cleanup},
+    {"utc_sound_pool_get_state_n", utc_sound_pool_get_state_n, NULL, utc_sound_pool_cleanup},
+    {"utc_sound_pool_activate_p", utc_sound_pool_activate_p, NULL, utc_sound_pool_cleanup},
+    {"utc_sound_pool_activate_n", utc_sound_pool_activate_n, NULL, utc_sound_pool_cleanup},
+    {"utc_sound_pool_deactivate_p", utc_sound_pool_deactivate_p, NULL, utc_sound_pool_cleanup},
+    {"utc_sound_pool_deactivate_n", utc_sound_pool_deactivate_n, NULL, utc_sound_pool_cleanup},
+    {"utc_sound_pool_set_volume_p", utc_sound_pool_set_volume_p, NULL, utc_sound_pool_cleanup},
+    {"utc_sound_pool_set_volume_n", utc_sound_pool_set_volume_n, NULL, utc_sound_pool_cleanup},
+    {"utc_sound_pool_get_volume_p", utc_sound_pool_get_volume_p, NULL, utc_sound_pool_cleanup},
+    {"utc_sound_pool_get_volume_n", utc_sound_pool_get_volume_n, NULL, utc_sound_pool_cleanup},
     {"utc_sound_pool_stream_set_volume_p", utc_sound_pool_set_volume_p, utc_sound_pool_startup, utc_sound_pool_cleanup},
     {"utc_sound_pool_stream_set_volume_n", utc_sound_pool_set_volume_n, utc_sound_pool_startup, utc_sound_pool_cleanup},
     {"utc_sound_pool_stream_get_volume_p", utc_sound_pool_get_volume_p, utc_sound_pool_startup, utc_sound_pool_cleanup},
@@ -111,10 +114,10 @@ testcase tc_array[] = {
     {"utc_sound_pool_stream_get_priority_n", utc_sound_pool_stream_get_priority_n, utc_sound_pool_startup, utc_sound_pool_cleanup},
     {"utc_sound_pool_stream_get_state_p", utc_sound_pool_stream_get_state_p, utc_sound_pool_startup, utc_sound_pool_cleanup},
     {"utc_sound_pool_stream_get_state_n", utc_sound_pool_stream_get_state_n, utc_sound_pool_startup, utc_sound_pool_cleanup},
-    {"utc_sound_pool_set_state_changed_cb_p", utc_sound_pool_set_state_changed_cb_p, utc_sound_pool_startup, utc_sound_pool_cleanup},
-    {"utc_sound_pool_set_state_changed_cb_n", utc_sound_pool_set_state_changed_cb_n, utc_sound_pool_startup, utc_sound_pool_cleanup},
-    {"utc_sound_pool_unset_state_changed_cb_p", utc_sound_pool_unset_state_changed_cb_p, utc_sound_pool_startup, utc_sound_pool_cleanup},
-    {"utc_sound_pool_unset_state_changed_cb_n", utc_sound_pool_unset_state_changed_cb_n, utc_sound_pool_startup, utc_sound_pool_cleanup},
+    {"utc_sound_pool_set_state_changed_cb_p", utc_sound_pool_set_state_changed_cb_p, NULL, utc_sound_pool_cleanup},
+    {"utc_sound_pool_set_state_changed_cb_n", utc_sound_pool_set_state_changed_cb_n, NULL, utc_sound_pool_cleanup},
+    {"utc_sound_pool_unset_state_changed_cb_p", utc_sound_pool_unset_state_changed_cb_p, NULL, utc_sound_pool_cleanup},
+    {"utc_sound_pool_unset_state_changed_cb_n", utc_sound_pool_unset_state_changed_cb_n, NULL, utc_sound_pool_cleanup},
     {NULL, NULL}
 };
 #endif // __TCT_SOUND_POOL_NATIVE_H__
index 8280865e2e954abd4f6fea1d8555fe746a2fb79d..b316a2140a584f96da1c31e7912f334103c2c675 100644 (file)
 #include <limits.h>
 #include <media/sound_pool.h>
 
-//& set: SoundPool
 #define API_NAMESPACE "[SOUND_POOL]"
 #define MAX_PATH 1024
 
 #define MAX_POOLS 8
 #define DEFAULT_PRIORITY 255
 #define DEFAULT_SAMPLE_TAG "sound_pool_test_file"
+#define DEFAULT_WRONG_SAMPLE_TAG "wrong_sample_tag"
+#define DEFAULT_WRONG_FILE_PATH "wrong_file_name"
 
 sound_pool_h g_test_pool = NULL;
 static char *file_path = NULL;
-static const char *test_file = "a.wav";
+static const char *testfile_name1 = "sound_1.wav";
+static const char *testfile_name2 = "sound_2.ogg";
 
+void utc_sound_pool_prepare_filepath(const char *testfile_name)
+{
+       char pzs_value[MAX_PATH] = {0,};
+       unsigned int size_of_path;
+
+       if (true == GetValueForTCTSetting("DEVICE_SUITE_TARGET_30", pzs_value, API_NAMESPACE )) {
+               PRINT_UTC_LOG("[Line : %d][%s] 'DEVICE_SUITE_TARGET_30' Values Received = %s\\n", __LINE__, API_NAMESPACE, pzs_value);
+               size_of_path = strlen(pzs_value) + strlen(testfile_name) + 10;
+               file_path = (char*)malloc(size_of_path);
+               snprintf(file_path, size_of_path, "%s/res/res/%s", pzs_value, testfile_name);
+       } else {
+               PRINT_UTC_LOG("[Line : %d][%s] GetValueForTCTSetting returned error for 'DEVICE_SUITE_TARGET_30'\\n", __LINE__, API_NAMESPACE);
+       }
+}
 /**
  * @function           utc_sound_pool_startup
  * @description                Called before each test.
@@ -42,22 +58,19 @@ static const char *test_file = "a.wav";
  */
 void utc_sound_pool_startup(void)
 {
-       char pszValue[MAX_PATH] = {0,};
-       if (true == GetValueForTCTSetting("DEVICE_SUITE_TARGET_30", pszValue, API_NAMESPACE ))
-       {
-               PRINT_UTC_LOG("[Line : %d][%s] 'DEVICE_SUITE_TARGET_30' Values Received = %s\\n", __LINE__, API_NAMESPACE,  pszValue);
-               unsigned int size_of_path = strlen(pszValue) + strlen(test_file) + 10;
-               file_path = (char*)malloc(size_of_path);
-               snprintf(file_path, size_of_path, "%s/res/res/%s", pszValue, test_file);
-       }
-       else
-       {
-               PRINT_UTC_LOG("[Line : %d][%s] GetValueForTCTSetting returned error for 'DEVICE_SUITE_TARGET_30'\\n", __LINE__, API_NAMESPACE);
-       }
+       utc_sound_pool_prepare_filepath(testfile_name1);
+}
 
-       sound_pool_create(&g_test_pool);
-       sound_pool_load_source_from_file(g_test_pool, file_path, DEFAULT_SAMPLE_TAG);
-       sound_pool_activate(g_test_pool);
+/**
+ * @function           utc_sound_pool_stream_play_p4_startup
+ * @description                Called before testcase utc_sound_pool_stream_play_p4.
+ *                  Added this new start up function to test the .ogg file format.
+ * @parameter          NA
+ * @return                     NA
+ */
+void utc_sound_pool_stream_play_p4_startup(void)
+{
+       utc_sound_pool_prepare_filepath(testfile_name2);
 }
 
 /**
@@ -68,36 +81,82 @@ void utc_sound_pool_startup(void)
  */
 void utc_sound_pool_cleanup(void)
 {
+
        if (g_test_pool) {
                sound_pool_deactivate(g_test_pool);
                sound_pool_unload_source(g_test_pool, DEFAULT_SAMPLE_TAG);
                sound_pool_destroy(g_test_pool);
                g_test_pool = NULL;
        }
+
+       if (file_path != NULL) {
+               free(file_path);
+               file_path = NULL;
+       }
 }
 
+/**
+ * @function           sound_pool_stream_prepare_to_play
+ * @description                sound pool creation, load the source and activate pool.
+ * @parameter          NA
+ * @return                     NA
+ */
+int sound_pool_stream_prepare_to_play(void)
+{
+
+       int ret = SOUND_POOL_ERROR_NONE;
+
+       ret = sound_pool_create(&g_test_pool);
+       assert_eq(ret, SOUND_POOL_ERROR_NONE);
+       ret = sound_pool_load_source_from_file(g_test_pool, file_path, DEFAULT_SAMPLE_TAG);
+       assert_eq(ret, SOUND_POOL_ERROR_NONE);
+       ret = sound_pool_activate(g_test_pool);
+       assert_eq(ret, SOUND_POOL_ERROR_NONE);
+       return 0;
+}
+
+
+/**
+ * @function           sound_pool_create_and_activate
+ * @description                sound pool createion and activation.
+ * @parameter          NA
+ * @return                     NA
+ */
+int sound_pool_create_and_activate(void)
+{
+
+       int ret = SOUND_POOL_ERROR_NONE;
+
+       ret = sound_pool_create(&g_test_pool);
+       assert_eq(ret, SOUND_POOL_ERROR_NONE);
+       ret = sound_pool_activate(g_test_pool);
+       assert_eq(ret, SOUND_POOL_ERROR_NONE);
+       return 0;
+}
+
+
 /**
  * @brief Positive test case of sound_pool_create()
  * @testcase           utc_sound_pool_create_p
  * @since_tizen                4.0
  * @description                Creates instances of sound pool up to its max number.
- *                                     MAX_POOLS-1 value is used due to one instance is created by
- *                                     utc_sound_pool_startup()
+ *
  */
 int utc_sound_pool_create_p(void)
 {
        int ret = SOUND_POOL_ERROR_NONE;
-       sound_pool_h test_pool [MAX_POOLS-1] = {NULL};
+       sound_pool_h test_pool [MAX_POOLS] = {NULL};
        int i;
 
-       for (i = 0; i < MAX_POOLS-1; ++i) {
+       for (i = 0; i < MAX_POOLS; ++i) {
                ret = sound_pool_create(&test_pool[i]);
                assert_eq(ret, SOUND_POOL_ERROR_NONE);
                assert_neq(test_pool[i], NULL);
        }
        // TC clean-up
-       for (i = 0; i < MAX_POOLS-1; ++i) {
-               sound_pool_destroy(test_pool[i]);
+       for (i = 0; i < MAX_POOLS; ++i) {
+               ret = sound_pool_destroy(test_pool[i]);
+               assert_eq(ret, SOUND_POOL_ERROR_NONE);
                test_pool[i] = NULL;
        }
 
@@ -134,6 +193,8 @@ int utc_sound_pool_create_n2(void)
        sound_pool_h test_pool [MAX_POOLS] = {NULL};
        int i;
 
+       ret = sound_pool_create(&g_test_pool);
+       assert_eq(ret, SOUND_POOL_ERROR_NONE);
        for (i = 0; i < MAX_POOLS-1; ++i) {
                ret = sound_pool_create(&test_pool[i]);
                assert_eq(ret, SOUND_POOL_ERROR_NONE);
@@ -163,8 +224,13 @@ int utc_sound_pool_create_n2(void)
  */
 int utc_sound_pool_destroy_p(void)
 {
+       int ret = SOUND_POOL_ERROR_NONE;
+
+       ret = sound_pool_create(&g_test_pool);
+       assert_eq(ret, SOUND_POOL_ERROR_NONE);
        assert_neq(g_test_pool, NULL);
-       const int ret = sound_pool_destroy(g_test_pool);
+
+       ret = sound_pool_destroy(g_test_pool);
        assert_eq(ret, SOUND_POOL_ERROR_NONE);
 
        g_test_pool = NULL;
@@ -180,7 +246,11 @@ int utc_sound_pool_destroy_p(void)
  */
 int utc_sound_pool_destroy_n(void)
 {
-       const int ret = sound_pool_destroy(NULL);
+       int ret = SOUND_POOL_ERROR_NONE;
+
+       ret = sound_pool_create(&g_test_pool);
+       assert_eq(ret, SOUND_POOL_ERROR_NONE);
+       ret = sound_pool_destroy(NULL);
        assert_eq(ret, SOUND_POOL_ERROR_INVALID_PARAMETER);
 
        return 0;
@@ -195,7 +265,10 @@ int utc_sound_pool_destroy_n(void)
  */
 int utc_sound_pool_load_source_from_file_p(void)
 {
-       const int ret = sound_pool_load_source_from_file(g_test_pool, file_path, "test_source_tag");
+       int ret;
+       ret = sound_pool_create(&g_test_pool);
+       assert_eq(ret, SOUND_POOL_ERROR_NONE);
+       ret = sound_pool_load_source_from_file(g_test_pool, file_path, DEFAULT_SAMPLE_TAG);
        assert_eq(ret, SOUND_POOL_ERROR_NONE);
 
        return 0;
@@ -211,10 +284,14 @@ int utc_sound_pool_load_source_from_file_p(void)
 int utc_sound_pool_load_source_from_file_n(void)
 {
        int ret = SOUND_POOL_ERROR_NONE;
+
+       sound_pool_create(&g_test_pool);
+       assert_eq(ret, SOUND_POOL_ERROR_NONE);
+
        ret = sound_pool_load_source_from_file(NULL, file_path, DEFAULT_SAMPLE_TAG);
        assert_eq(ret, SOUND_POOL_ERROR_INVALID_PARAMETER);
 
-       ret = sound_pool_load_source_from_file(g_test_pool, "wrong_file_name", "test_source_tag");
+       ret = sound_pool_load_source_from_file(g_test_pool, DEFAULT_WRONG_FILE_PATH, DEFAULT_SAMPLE_TAG);
        assert_eq(ret, SOUND_POOL_ERROR_NO_SUCH_FILE);
 
        ret = sound_pool_load_source_from_file(g_test_pool, NULL, DEFAULT_SAMPLE_TAG);
@@ -223,6 +300,10 @@ int utc_sound_pool_load_source_from_file_n(void)
        ret = sound_pool_load_source_from_file(g_test_pool, file_path, NULL);
        assert_eq(ret, SOUND_POOL_ERROR_INVALID_PARAMETER);
 
+       ret = sound_pool_load_source_from_file(g_test_pool, file_path, DEFAULT_SAMPLE_TAG);
+       assert_eq(ret, SOUND_POOL_ERROR_NONE);
+
+       /* Load source with same sample tag again */
        ret = sound_pool_load_source_from_file(g_test_pool, file_path, DEFAULT_SAMPLE_TAG);
        assert_eq(ret, SOUND_POOL_ERROR_INVALID_PARAMETER);
 
@@ -237,7 +318,11 @@ int utc_sound_pool_load_source_from_file_n(void)
  */
 int utc_sound_pool_unload_source_p(void)
 {
-       const int ret = sound_pool_unload_source(g_test_pool, DEFAULT_SAMPLE_TAG);
+       int ret;
+       ret = sound_pool_create(&g_test_pool);
+       assert_eq(ret, SOUND_POOL_ERROR_NONE);
+       sound_pool_load_source_from_file(g_test_pool, file_path, DEFAULT_SAMPLE_TAG);
+       ret = sound_pool_unload_source(g_test_pool, DEFAULT_SAMPLE_TAG);
        assert_eq(ret, SOUND_POOL_ERROR_NONE);
 
        return 0;
@@ -253,10 +338,12 @@ int utc_sound_pool_unload_source_p(void)
 int utc_sound_pool_unload_source_n(void)
 {
        int ret = SOUND_POOL_ERROR_NONE;
+       sound_pool_create(&g_test_pool);
+       sound_pool_load_source_from_file(g_test_pool, file_path, DEFAULT_SAMPLE_TAG);
        ret = sound_pool_unload_source(NULL, DEFAULT_SAMPLE_TAG);
        assert_eq(ret, SOUND_POOL_ERROR_INVALID_PARAMETER);
 
-       ret = sound_pool_unload_source(g_test_pool, "wrong_source_tag");
+       ret = sound_pool_unload_source(g_test_pool, DEFAULT_WRONG_SAMPLE_TAG);
        assert_eq(ret, SOUND_POOL_ERROR_KEY_NOT_AVAILABLE);
 
        return 0;
@@ -283,6 +370,8 @@ int utc_sound_pool_stream_play_p(void)
        sound_pool_stream_state_e state = SOUND_POOL_STREAM_STATE_NONE;
        sound_pool_stream_priority_policy_e priority_policy = SOUND_POOL_STREAM_PRIORITY_POLICY_SUSPENDED;
 
+    sound_pool_stream_prepare_to_play();
+
        ret = sound_pool_stream_play(g_test_pool, DEFAULT_SAMPLE_TAG,
                                                                loop, volume, priority, priority_policy, callback,
                                                                data, &id);
@@ -314,6 +403,7 @@ int utc_sound_pool_stream_play_p(void)
        ret = sound_pool_stream_get_state(g_test_pool, id, &state);
        assert_eq(ret, SOUND_POOL_ERROR_NONE);
        assert_eq(state, SOUND_POOL_STREAM_STATE_PLAYING);
+
        return 0;
 }
 
@@ -328,26 +418,22 @@ int utc_sound_pool_stream_play_p2(void)
        int ret = SOUND_POOL_ERROR_NONE;
        unsigned int id = 100;
        sound_pool_stream_state_e state = SOUND_POOL_STREAM_STATE_NONE;
-       sound_pool_h test_pool = NULL;
 
-       ret = sound_pool_create(&test_pool);
+       ret = sound_pool_create(&g_test_pool);
        assert_eq(ret, SOUND_POOL_ERROR_NONE);
-       ret = sound_pool_load_source_from_file(test_pool, file_path, DEFAULT_SAMPLE_TAG);
+       ret = sound_pool_load_source_from_file(g_test_pool, file_path, DEFAULT_SAMPLE_TAG);
        assert_eq(ret, SOUND_POOL_ERROR_NONE);
 
-       ret = sound_pool_stream_play(test_pool, DEFAULT_SAMPLE_TAG,
+       ret = sound_pool_stream_play(g_test_pool, DEFAULT_SAMPLE_TAG,
                                                                1, 0.5, DEFAULT_PRIORITY, SOUND_POOL_STREAM_PRIORITY_POLICY_SUSPENDED,
                                                                NULL, NULL, &id);
        assert_eq(ret, SOUND_POOL_ERROR_NONE);
        assert_neq(id, 100);
 
-       ret = sound_pool_stream_get_state(test_pool, id, &state);
+       ret = sound_pool_stream_get_state(g_test_pool, id, &state);
        assert_eq(ret, SOUND_POOL_ERROR_NONE);
        assert_eq(state, SOUND_POOL_STREAM_STATE_SUSPENDED);
 
-       sound_pool_destroy(test_pool);
-       test_pool = NULL;
-
        return 0;
 }
 
@@ -366,6 +452,7 @@ int utc_sound_pool_stream_play_p3(void)
        unsigned int id1, id2, id3;
        sound_pool_stream_state_e state = SOUND_POOL_STREAM_STATE_NONE;
 
+    sound_pool_stream_prepare_to_play();
        ret = sound_pool_stream_play(g_test_pool, DEFAULT_SAMPLE_TAG,
                                                                1, 0.5, 1, SOUND_POOL_STREAM_PRIORITY_POLICY_MUTE,
                                                                NULL, NULL, &id1);
@@ -414,13 +501,14 @@ int utc_sound_pool_stream_play_n(void)
        unsigned int id = 100;
        sound_pool_stream_priority_policy_e priority_policy = SOUND_POOL_STREAM_PRIORITY_POLICY_SUSPENDED;
 
+    sound_pool_stream_prepare_to_play();
        ret = sound_pool_stream_play(NULL, DEFAULT_SAMPLE_TAG,
                                                                loop, volume, priority, priority_policy, callback,
                                                                data, &id);
        assert_eq(ret, SOUND_POOL_ERROR_INVALID_PARAMETER);
        assert_eq(id, 100);
 
-       ret = sound_pool_stream_play(g_test_pool, "wrong_tag",
+       ret = sound_pool_stream_play(g_test_pool, DEFAULT_WRONG_SAMPLE_TAG,
                                                                        loop, volume, priority, priority_policy, callback,
                                                                        data, &id);
        assert_eq(ret, SOUND_POOL_ERROR_KEY_NOT_AVAILABLE);
@@ -469,6 +557,7 @@ int utc_sound_pool_stream_pause_p(void)
        sound_pool_stream_state_e state = SOUND_POOL_STREAM_STATE_NONE;
        unsigned int id = 100;
 
+    sound_pool_stream_prepare_to_play();
        ret = sound_pool_stream_play(g_test_pool, DEFAULT_SAMPLE_TAG,
                                                        1, 0.5, DEFAULT_PRIORITY, SOUND_POOL_STREAM_PRIORITY_POLICY_SUSPENDED, NULL,
                                                        NULL, &id);
@@ -494,9 +583,9 @@ int utc_sound_pool_stream_pause_p2(void)
 {
        int ret = SOUND_POOL_ERROR_NONE;
        sound_pool_stream_state_e state = SOUND_POOL_STREAM_STATE_NONE;
-
        unsigned int id = 100;
 
+    sound_pool_stream_prepare_to_play();
        ret = sound_pool_stream_play(g_test_pool, DEFAULT_SAMPLE_TAG,
                                                        1, 0.5, DEFAULT_PRIORITY, SOUND_POOL_STREAM_PRIORITY_POLICY_SUSPENDED, NULL,
                                                        NULL, &id);
@@ -537,6 +626,7 @@ int utc_sound_pool_stream_pause_n(void)
        unsigned int id = 100;
     sound_pool_stream_priority_policy_e priority_policy = SOUND_POOL_STREAM_PRIORITY_POLICY_SUSPENDED;
 
+    sound_pool_stream_prepare_to_play();
        ret = sound_pool_stream_play(g_test_pool, DEFAULT_SAMPLE_TAG,
                                                        loop, volume, priority, priority_policy, callback,
                                                        data, &id);
@@ -576,6 +666,7 @@ int utc_sound_pool_stream_resume_p(void)
        unsigned int id = 100;
     sound_pool_stream_priority_policy_e priority_policy = SOUND_POOL_STREAM_PRIORITY_POLICY_SUSPENDED;
 
+    sound_pool_stream_prepare_to_play();
        ret = sound_pool_stream_play(g_test_pool, DEFAULT_SAMPLE_TAG,
                                                        loop, volume, priority, priority_policy, callback,
                                                        data, &id);
@@ -600,9 +691,9 @@ int utc_sound_pool_stream_resume_p2(void)
 {
        int ret = SOUND_POOL_ERROR_NONE;
        sound_pool_stream_state_e state = SOUND_POOL_STREAM_STATE_NONE;
-
        unsigned int id = 100;
 
+    sound_pool_stream_prepare_to_play();
        ret = sound_pool_stream_play(g_test_pool, DEFAULT_SAMPLE_TAG,
                                                        1, 0.5, DEFAULT_PRIORITY, SOUND_POOL_STREAM_PRIORITY_POLICY_SUSPENDED, NULL,
                                                        NULL, &id);
@@ -645,6 +736,7 @@ int utc_sound_pool_stream_resume_n(void)
        unsigned int id = 100;
        sound_pool_stream_priority_policy_e priority_policy = SOUND_POOL_STREAM_PRIORITY_POLICY_SUSPENDED;
 
+    sound_pool_stream_prepare_to_play();
        ret = sound_pool_stream_play(g_test_pool, DEFAULT_SAMPLE_TAG,
                                                        loop, volume, priority, priority_policy, callback,
                                                        data, &id);
@@ -680,6 +772,7 @@ int utc_sound_pool_stream_stop_p(void)
        unsigned int id = 100;
        sound_pool_stream_priority_policy_e priority_policy = SOUND_POOL_STREAM_PRIORITY_POLICY_SUSPENDED;
 
+    sound_pool_stream_prepare_to_play();
        ret = sound_pool_stream_play(g_test_pool, DEFAULT_SAMPLE_TAG,
                                                        loop, volume, priority, priority_policy, callback,
                                                        data, &id);
@@ -710,6 +803,7 @@ int utc_sound_pool_stream_stop_n(void)
        unsigned int id = 100;
        sound_pool_stream_priority_policy_e priority_policy = SOUND_POOL_STREAM_PRIORITY_POLICY_SUSPENDED;
 
+    sound_pool_stream_prepare_to_play();
        ret = sound_pool_stream_play(g_test_pool, DEFAULT_SAMPLE_TAG,
                                                        loop, volume, priority, priority_policy, callback,
                                                        data, &id);
@@ -740,6 +834,7 @@ int utc_sound_pool_stream_stop_n2(void)
        unsigned int id = 0;
        sound_pool_stream_priority_policy_e priority_policy = SOUND_POOL_STREAM_PRIORITY_POLICY_SUSPENDED;
 
+    sound_pool_stream_prepare_to_play();
        ret = sound_pool_stream_play(g_test_pool, DEFAULT_SAMPLE_TAG,
                                                        loop, volume, priority, priority_policy, callback,
                                                        data, &id);
@@ -761,10 +856,11 @@ int utc_sound_pool_stream_stop_n2(void)
  */
 int utc_sound_pool_get_state_p(void)
 {
-       assert_neq(g_test_pool, NULL);
+       int ret = SOUND_POOL_ERROR_NONE;
        sound_pool_state_e state = SOUND_POOL_STATE_INACTIVE;
 
-       const int ret = sound_pool_get_state(g_test_pool, &state);
+       sound_pool_create_and_activate();
+       ret = sound_pool_get_state(g_test_pool, &state);
        assert_eq(ret, SOUND_POOL_ERROR_NONE);
        assert_eq(state, SOUND_POOL_STATE_ACTIVE);
 
@@ -780,11 +876,11 @@ int utc_sound_pool_get_state_p(void)
  */
 int utc_sound_pool_get_state_n(void)
 {
-       assert_neq(g_test_pool, NULL);
        int ret = SOUND_POOL_ERROR_NONE;
 
        sound_pool_state_e state = SOUND_POOL_STATE_INACTIVE;
 
+       sound_pool_create_and_activate();
        ret = sound_pool_get_state(NULL, &state);
        assert_eq(ret, SOUND_POOL_ERROR_INVALID_PARAMETER);
 
@@ -814,12 +910,12 @@ int utc_sound_pool_activate_p(void)
                ret = sound_pool_activate(test_pool[i]);
                assert_eq(ret, SOUND_POOL_ERROR_NONE);
        }
-// TC clean-up
+
+       // TC clean-up
        for (i = 0; i < MAX_POOLS-1; ++i) {
                sound_pool_destroy(test_pool[i]);
                test_pool[i] = NULL;
        }
-
        return 0;
 }
 
@@ -834,6 +930,7 @@ int utc_sound_pool_activate_n(void)
 {
        int ret = SOUND_POOL_ERROR_NONE;
 
+       sound_pool_create_and_activate();
        ret = sound_pool_activate(NULL);
        assert_eq(ret, SOUND_POOL_ERROR_INVALID_PARAMETER);
 
@@ -851,14 +948,14 @@ int utc_sound_pool_activate_n(void)
  */
 int utc_sound_pool_deactivate_p(void)
 {
-       assert_neq(g_test_pool, NULL);
        int ret = SOUND_POOL_ERROR_NONE;
+       int i;
 
+       sound_pool_create_and_activate();
        ret = sound_pool_deactivate(g_test_pool);
        assert_eq(ret, SOUND_POOL_ERROR_NONE);
 
        sound_pool_h test_pool [MAX_POOLS-1] = {NULL};
-       int i;
 
        for (i = 0; i < MAX_POOLS-1; ++i) {
                ret = sound_pool_create(&test_pool[i]);
@@ -868,7 +965,7 @@ int utc_sound_pool_deactivate_p(void)
                ret = sound_pool_activate(test_pool[i]);
                assert_eq(ret, SOUND_POOL_ERROR_NONE);
        }
-// TC clean-up
+       // TC clean-up
        for (i = 0; i < MAX_POOLS-1; ++i) {
                ret = sound_pool_deactivate(test_pool[i]);
                assert_eq(ret, SOUND_POOL_ERROR_NONE);
@@ -891,6 +988,7 @@ int utc_sound_pool_deactivate_n(void)
 {
        int ret = SOUND_POOL_ERROR_NONE;
 
+       sound_pool_create_and_activate();
        ret = sound_pool_deactivate(NULL);
        assert_eq(ret, SOUND_POOL_ERROR_INVALID_PARAMETER);
 
@@ -911,7 +1009,11 @@ int utc_sound_pool_deactivate_n(void)
  */
 int utc_sound_pool_set_volume_p(void)
 {
-       const int ret = sound_pool_set_volume(g_test_pool, 0.5f);
+       int ret = SOUND_POOL_ERROR_NONE;
+
+       ret = sound_pool_create(&g_test_pool);
+       assert_eq(ret, SOUND_POOL_ERROR_NONE);
+       ret = sound_pool_set_volume(g_test_pool, 0.5f);
        assert_eq(ret, SOUND_POOL_ERROR_NONE);
 
        return 0;
@@ -929,6 +1031,8 @@ int utc_sound_pool_set_volume_n(void)
 {
        int ret = SOUND_POOL_ERROR_NONE;
 
+       ret = sound_pool_create(&g_test_pool);
+       assert_eq(ret, SOUND_POOL_ERROR_NONE);
        ret = sound_pool_set_volume(NULL, 0.5f);
        assert_eq(ret, SOUND_POOL_ERROR_INVALID_PARAMETER);
 
@@ -947,8 +1051,12 @@ int utc_sound_pool_set_volume_n(void)
 int utc_sound_pool_get_volume_p(void)
 {
        float volume = 0.0;
+       int ret = SOUND_POOL_ERROR_NONE;
+
+       ret = sound_pool_create(&g_test_pool);
+       assert_eq(ret, SOUND_POOL_ERROR_NONE);
 
-       const int ret = sound_pool_get_volume(g_test_pool, &volume);
+       sound_pool_get_volume(g_test_pool, &volume);
        assert_eq(ret, SOUND_POOL_ERROR_NONE);
 
        return 0;
@@ -966,6 +1074,8 @@ int utc_sound_pool_get_volume_n(void)
        int ret = SOUND_POOL_ERROR_NONE;
        float volume = 0.0;
 
+       ret = sound_pool_create(&g_test_pool);
+       assert_eq(ret, SOUND_POOL_ERROR_NONE);
        ret = sound_pool_get_volume(NULL, &volume);
        assert_eq(ret, SOUND_POOL_ERROR_INVALID_PARAMETER);
 
@@ -986,6 +1096,7 @@ int utc_sound_pool_stream_set_volume_p(void)
        int ret = SOUND_POOL_ERROR_NONE;
        unsigned int id = 100;
 
+    sound_pool_stream_prepare_to_play();
        ret = sound_pool_stream_play(g_test_pool, DEFAULT_SAMPLE_TAG,
                                                        1, 0.5, DEFAULT_PRIORITY, SOUND_POOL_STREAM_PRIORITY_POLICY_SUSPENDED, NULL,
                                                        NULL, &id);
@@ -1015,6 +1126,7 @@ int utc_sound_pool_stream_set_volume_n(void)
        int ret = SOUND_POOL_ERROR_NONE;
        unsigned int id = 100;
 
+    sound_pool_stream_prepare_to_play();
        ret = sound_pool_stream_play(g_test_pool, DEFAULT_SAMPLE_TAG,
                                                        1, 0.5, DEFAULT_PRIORITY, SOUND_POOL_STREAM_PRIORITY_POLICY_SUSPENDED, NULL,
                                                        NULL, &id);
@@ -1048,6 +1160,7 @@ int utc_sound_pool_stream_get_volume_p(void)
        unsigned int id = 100;
        float volume = -1.0;
 
+    sound_pool_stream_prepare_to_play();
        ret = sound_pool_stream_play(g_test_pool, DEFAULT_SAMPLE_TAG,
                                                        1, 0.5, DEFAULT_PRIORITY, SOUND_POOL_STREAM_PRIORITY_POLICY_SUSPENDED, NULL,
                                                        NULL, &id);
@@ -1074,14 +1187,15 @@ int utc_sound_pool_stream_get_volume_n(void)
 {
        int ret = SOUND_POOL_ERROR_NONE;
        unsigned int id = 100;
+       float volume = 0.0;
 
+    sound_pool_stream_prepare_to_play();
        ret = sound_pool_stream_play(g_test_pool, DEFAULT_SAMPLE_TAG,
                                                        1, 0.5, DEFAULT_PRIORITY, SOUND_POOL_STREAM_PRIORITY_POLICY_SUSPENDED, NULL,
                                                        NULL, &id);
        assert_eq(ret, SOUND_POOL_ERROR_NONE);
        assert_neq(id, 100);
 
-       float volume = 0.0;
        ret = sound_pool_stream_get_volume(NULL, id, &volume);
        assert_eq(ret, SOUND_POOL_ERROR_INVALID_PARAMETER);
 
@@ -1105,6 +1219,7 @@ int utc_sound_pool_stream_set_priority_p(void)
        int ret = SOUND_POOL_ERROR_NONE;
        unsigned int id = 100;
 
+    sound_pool_stream_prepare_to_play();
        ret = sound_pool_stream_play(g_test_pool, DEFAULT_SAMPLE_TAG,
                                                        1, 0.5, DEFAULT_PRIORITY, SOUND_POOL_STREAM_PRIORITY_POLICY_SUSPENDED, NULL,
                                                        NULL, &id);
@@ -1134,6 +1249,7 @@ int utc_sound_pool_stream_set_priority_n(void)
        int ret = SOUND_POOL_ERROR_NONE;
        unsigned int id = 100;
 
+    sound_pool_stream_prepare_to_play();
        ret = sound_pool_stream_play(g_test_pool, DEFAULT_SAMPLE_TAG,
                                                        1, 0.5, DEFAULT_PRIORITY, SOUND_POOL_STREAM_PRIORITY_POLICY_SUSPENDED, NULL,
                                                        NULL, &id);
@@ -1161,6 +1277,7 @@ int utc_sound_pool_stream_get_priority_p(void)
        unsigned int id = 100;
        unsigned int priority = 0;
 
+    sound_pool_stream_prepare_to_play();
        ret = sound_pool_stream_play(g_test_pool, DEFAULT_SAMPLE_TAG,
                                                        1, 0.5, DEFAULT_PRIORITY, SOUND_POOL_STREAM_PRIORITY_POLICY_SUSPENDED, NULL,
                                                        NULL, &id);
@@ -1189,6 +1306,7 @@ int utc_sound_pool_stream_get_priority_n(void)
        unsigned int id = 100;
        unsigned int priority = 0;
 
+    sound_pool_stream_prepare_to_play();
        ret = sound_pool_stream_play(g_test_pool, DEFAULT_SAMPLE_TAG,
                                                                1, 0.5, DEFAULT_PRIORITY, SOUND_POOL_STREAM_PRIORITY_POLICY_SUSPENDED, NULL,
                                                                NULL, &id);
@@ -1220,7 +1338,9 @@ int utc_sound_pool_stream_get_state_p(void)
        unsigned int id = 100;
        sound_pool_stream_state_e state = SOUND_POOL_STREAM_STATE_NONE;
 
-       ret = sound_pool_deactivate(g_test_pool);
+       ret = sound_pool_create(&g_test_pool);
+       assert_eq(ret, SOUND_POOL_ERROR_NONE);
+       ret = sound_pool_load_source_from_file(g_test_pool, file_path, DEFAULT_SAMPLE_TAG);
        assert_eq(ret, SOUND_POOL_ERROR_NONE);
 
        ret = sound_pool_stream_play(g_test_pool, DEFAULT_SAMPLE_TAG,
@@ -1305,6 +1425,7 @@ int utc_sound_pool_stream_get_state_n(void)
        unsigned int id = 100;
        sound_pool_stream_state_e state = SOUND_POOL_STREAM_STATE_NONE;
 
+    sound_pool_stream_prepare_to_play();
        ret = sound_pool_stream_play(g_test_pool, DEFAULT_SAMPLE_TAG,
                                                        1, 0.5, DEFAULT_PRIORITY, SOUND_POOL_STREAM_PRIORITY_POLICY_SUSPENDED, NULL,
                                                        NULL, &id);
@@ -1346,11 +1467,10 @@ void sp_cb(sound_pool_h pool, sound_pool_state_e prev_state,
  */
 int utc_sound_pool_set_state_changed_cb_p(void)
 {
-       assert_neq(g_test_pool, NULL);
-
        int ret = SOUND_POOL_ERROR_NONE;
-
        sound_pool_state_e data = SOUND_POOL_STATE_INACTIVE;
+
+       sound_pool_create_and_activate();
        ret = sound_pool_set_state_changed_cb(g_test_pool, sp_cb, &data);
        assert_eq(ret, SOUND_POOL_ERROR_NONE);
 
@@ -1376,11 +1496,11 @@ int utc_sound_pool_set_state_changed_cb_p(void)
  */
 int utc_sound_pool_set_state_changed_cb_n(void)
 {
-       assert_neq(g_test_pool, NULL);
-
        int ret = SOUND_POOL_ERROR_NONE;
        sound_pool_state_e data = SOUND_POOL_STATE_INACTIVE;
 
+       sound_pool_create_and_activate();
+
        ret = sound_pool_set_state_changed_cb(NULL, sp_cb, &data);
        assert_eq(ret, SOUND_POOL_ERROR_INVALID_PARAMETER);
 
@@ -1400,10 +1520,10 @@ int utc_sound_pool_set_state_changed_cb_n(void)
  */
 int utc_sound_pool_unset_state_changed_cb_p(void)
 {
-       assert_neq(g_test_pool, NULL);
-
        sound_pool_state_e data = SOUND_POOL_STATE_INACTIVE;
        int ret = SOUND_POOL_ERROR_NONE;
+
+       sound_pool_create_and_activate();
        ret = sound_pool_set_state_changed_cb(g_test_pool, sp_cb, &data);
        assert_eq(ret, SOUND_POOL_ERROR_NONE);
 
@@ -1429,7 +1549,10 @@ int utc_sound_pool_unset_state_changed_cb_p(void)
  */
 int utc_sound_pool_unset_state_changed_cb_n(void)
 {
-       const int ret = sound_pool_unset_state_changed_cb(NULL);
+       int ret = SOUND_POOL_ERROR_NONE;
+
+       sound_pool_create_and_activate();
+       ret = sound_pool_unset_state_changed_cb(NULL);
        assert_eq(ret, SOUND_POOL_ERROR_INVALID_PARAMETER);
 
        return 0;