Remove unused function
[platform/core/multimedia/libmm-camcorder.git] / src / include / mm_camcorder_sound.h
index 199f27c..cdeed58 100644 (file)
@@ -26,6 +26,7 @@
 | INCLUDE FILES                                                                                |
 ========================================================================================*/
 
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -34,16 +35,14 @@ extern "C" {
 | GLOBAL DEFINITIONS AND DECLARATIONS FOR CAMCORDER                                    |
 ========================================================================================*/
 
+
 /*=======================================================================================
 | MACRO DEFINITIONS                                                                    |
 ========================================================================================*/
-#define _MMCAMCORDER_FILEPATH_CAPTURE_SND       "/usr/share/sounds/mm-camcorder/capture_shutter_01.wav"
-#define _MMCAMCORDER_FILEPATH_CAPTURE2_SND      "/usr/share/sounds/mm-camcorder/capture_shutter_02.wav"
-#define _MMCAMCORDER_FILEPATH_REC_START_SND     "/usr/share/sounds/mm-camcorder/recording_start_01.wav"
-#define _MMCAMCORDER_FILEPATH_REC_STOP_SND      "/usr/share/sounds/mm-camcorder/recording_stop_01.wav"
-#define _MMCAMCORDER_FILEPATH_AF_SUCCEED_SND    "/usr/share/sounds/mm-camcorder/af_succeed.wav"
-#define _MMCAMCORDER_FILEPATH_AF_FAIL_SND       "/usr/share/sounds/mm-camcorder/af_fail.wav"
-#define _MMCAMCORDER_FILEPATH_NO_SND            "/usr/share/sounds/mm-camcorder/no_sound.wav"
+#define _MMCAMCORDER_SAMPLE_SOUND_NAME_CAPTURE01 "camera-shutter-01"
+#define _MMCAMCORDER_SAMPLE_SOUND_NAME_CAPTURE02 "camera-shutter-02"
+#define _MMCAMCORDER_SAMPLE_SOUND_NAME_REC_START "recording-start"
+#define _MMCAMCORDER_SAMPLE_SOUND_NAME_REC_STOP  "recording-stop"
 
 /*=======================================================================================
 | ENUM DEFINITIONS                                                                     |
@@ -51,7 +50,6 @@ extern "C" {
 typedef enum {
        _MMCAMCORDER_SOUND_STATE_NONE,
        _MMCAMCORDER_SOUND_STATE_INIT,
-       _MMCAMCORDER_SOUND_STATE_PREPARE,
        _MMCAMCORDER_SOUND_STATE_PLAYING,
 } _MMCamcorderSoundState;
 
@@ -61,23 +59,14 @@ typedef enum {
 /**
  * Structure of sound info
  */
-typedef struct __SOUND_INFO {
-       SF_INFO sfinfo;
-       SNDFILE *infile;
-       short *pcm_buf;
-       int pcm_size;
-       char *filename;
-
-       MMSoundPcmHandle_t handle;
-
-       int thread_run;
-       pthread_t thread;
-       pthread_mutex_t play_mutex;
-       pthread_cond_t play_cond;
-       pthread_mutex_t open_mutex;
-       pthread_cond_t open_cond;
-       system_audio_route_t route_policy_backup;
-
+typedef struct _SOUND_INFO {
+       /* mutex and cond */
+       GMutex play_mutex;
+       GCond play_cond;
+       GMutex open_mutex;
+       GCond open_cond;
+
+       /* state */
        _MMCamcorderSoundState state;
 } SOUND_INFO;
 
@@ -89,12 +78,12 @@ typedef struct __SOUND_INFO {
 /*=======================================================================================
 | GLOBAL FUNCTION PROTOTYPES                                                           |
 ========================================================================================*/
-gboolean _mmcamcorder_sound_init(MMHandleType handle, char *filename);
-gboolean _mmcamcorder_sound_prepare(MMHandleType handle);
-gboolean _mmcamcorder_sound_play(MMHandleType handle);
+gboolean _mmcamcorder_sound_init(MMHandleType handle);
+gboolean _mmcamcorder_sound_play(MMHandleType handle, const char *sample_name, gboolean sync_play);
 gboolean _mmcamcorder_sound_finalize(MMHandleType handle);
 
-void _mmcamcorder_sound_solo_play(MMHandleType handle, const char *filepath, gboolean sync);
+int _mmcamcorder_sound_solo_play(MMHandleType handle, const char *sample_name, gboolean sync_play);
+void _mmcamcorder_sound_solo_play_wait(MMHandleType handle);
 
 #ifdef __cplusplus
 }