diff options
author | Seungbae Shin <seungbae.shin@samsung.com> | 2012-02-10 19:23:03 +0900 |
---|---|---|
committer | Seungbae Shin <seungbae.shin@samsung.com> | 2012-02-10 19:23:03 +0900 |
commit | d1362942eb3028f1f8996881628455b6f8b9f5c8 (patch) | |
tree | 586b1d3e8cf8461d93bc67a7999f9936aa4d234a /include | |
parent | 8f337116f8d6434479f4833f48dec430198cc69f (diff) | |
download | libmm-sound-d1362942eb3028f1f8996881628455b6f8b9f5c8.tar.gz libmm-sound-d1362942eb3028f1f8996881628455b6f8b9f5c8.tar.bz2 libmm-sound-d1362942eb3028f1f8996881628455b6f8b9f5c8.zip |
update to latest
Diffstat (limited to 'include')
-rw-r--r-- | include/mm_sound.h | 59 | ||||
-rw-r--r-- | include/mm_sound_private.h | 31 |
2 files changed, 6 insertions, 84 deletions
diff --git a/include/mm_sound.h b/include/mm_sound.h index 4d964b3..f100f50 100644 --- a/include/mm_sound.h +++ b/include/mm_sound.h @@ -39,7 +39,6 @@ extern "C" { #endif -#define DEPRECATED_API __attribute__ ((deprecated)) /** @addtogroup SOUND @{ @@ -1339,25 +1338,10 @@ int mm_sound_stop_sound(int handle); /** - * Enumerations for DTMF + * Enumerations for TONE */ typedef enum { - MM_SOUND_DTMF_0, /**< Predefined DTMF 0 */ - MM_SOUND_DTMF_1, /**< Predefined DTMF 1 */ - MM_SOUND_DTMF_2, /**< Predefined DTMF 2 */ - MM_SOUND_DTMF_3, /**< Predefined DTMF 3 */ - MM_SOUND_DTMF_4, /**< Predefined DTMF 4 */ - MM_SOUND_DTMF_5, /**< Predefined DTMF 5 */ - MM_SOUND_DTMF_6, /**< Predefined DTMF 6 */ - MM_SOUND_DTMF_7, /**< Predefined DTMF 7 */ - MM_SOUND_DTMF_8, /**< Predefined DTMF 8 */ - MM_SOUND_DTMF_9, /**< Predefined DTMF 9 */ - MM_SOUND_DTMF_ASTERISK, /**< Predefined DTMF Asterisk (*) */ - MM_SOUND_DTMF_SHARP, /**< Predefined DTMF Sharp (#) */ -}MMSoundDtmf_t; - -typedef enum { MM_SOUND_TONE_DTMF_0 = 0, /**< Predefined DTMF 0 */ MM_SOUND_TONE_DTMF_1, /**< Predefined DTMF 1 */ MM_SOUND_TONE_DTMF_2, /**< Predefined DTMF 2 */ @@ -1471,46 +1455,15 @@ typedef enum { }MMSoundTone_t; typedef unsigned long sound_time_msec_t; /**< millisecond unit */ -/** - * This function is to play dtmf sound. - * - * @param num [in] DTMF number (0~9, *, #) - * volume [in] volume type - * time [in] how long sound (110~ 5000 ms) - * handle [in] Handle of mm_sound_play_sound - * - * @return This function returns MM_ERROR_NONE on success, or negative value - * with error code. - * - * @remark It doesn't provide stop - * @see volume_type_t MMSoundDtmf_t - * @pre None. - * @post DTMF sound will be generated. - * @par Example - * @code -int ret = 0; - -ret = mm_sound_play_dtmf(MM_SOUND_DTMF_9, VOLUME_TYPE_SYSTEM, 1000); //play 1 second -if(ret < 0) -{ - printf("play dtmf failed\n"); -} -else -{ - printf("play dtmf success\n"); -} - * @endcode - */ -DEPRECATED_API int mm_sound_play_dtmf(MMSoundDtmf_t num, const volume_type_t vol_type, const sound_time_msec_t time); /** * This function is to play tone sound. * - * @param num [in] DTMF number (0~7, *, #) + * @param num [in] predefined tone type (MMSoundTone_t) * volume type [in] volume type * volume [in] volume ratio (0.0 ~1.0) - * time [in] how long sound (110~ 5000 ms) - * handle [in] Handle of mm_sound_play_sound + * duration [in] millisecond (-1 for infinite) + * handle [in] Handle of mm_sound_play_tone * * @return This function returns MM_ERROR_NONE on success, or negative value * with error code. @@ -1518,12 +1471,12 @@ DEPRECATED_API int mm_sound_play_dtmf(MMSoundDtmf_t num, const volume_type_t vol * @remark It doesn't provide stop * @see volume_type_t MMSoundTone_t * @pre None. - * @post DTMF sound will be generated. + * @post TONE sound will be played. * @par Example * @code int ret = 0; -ret = mm_sound_play_tone(TONE_DTMF_9, VOLUME_TYPE_SYSTEM, 1000); //play 1 second +ret = mm_sound_play_tone(MM_SOUND_TONE_DTMF_9, VOLUME_TYPE_SYSTEM, 1.0, 1000, &handle); //play 1 second with volume ratio 1.0 if(ret < 0) { printf("play tone failed\n"); diff --git a/include/mm_sound_private.h b/include/mm_sound_private.h index a889c90..2534daa 100644 --- a/include/mm_sound_private.h +++ b/include/mm_sound_private.h @@ -197,37 +197,6 @@ int mm_sound_set_path(int gain, int output, int input, int option); */ int mm_sound_get_path(int *gain, int *output, int *input, int *option); -/** - * This function is to play beep sound. - * - * @param vol_type [in] volume type - * duration [in] duration of beep sound in ms. -1 indicates infinite duration. minimum duration is 100ms and actual playable duration is multiple of 100ms. - * handle [out] Handle - * - * @return This function returns MM_ERROR_NONE on success, or negative value - * with error code. - * - * @remark use mm_sound_stop_sound to stop beep before given duration - * @see volume_type_t - * @pre None. - * @post Beep sound will be started to play. - * @par Example - * @code -int ret = 0; -int handle = 0; -ret = mm_sound_play_beep (VOLUME_TYPE_SYSTEM, 1000, &handle); //play 1000 ms = 1 sec. -if(ret < 0) -{ - printf("play tone failed\n"); -} -else -{ - printf("play tone success\n"); -} - * @endcode - */ -DEPRECATED_API int mm_sound_play_beep (const volume_type_t vol_type, const int duration, int *handle); - int mm_sound_pcm_play_open_ex (MMSoundPcmHandle_t *handle, const unsigned int rate, MMSoundPcmChannel_t channel, MMSoundPcmFormat_t format, const volume_type_t vol_type, int asm_event); /** |