📄 aud_alert_info.c
字号:
#ifdef __cplusplusextern "C" {#endif/*================================================================================================== Module Name: aud_alert_info.c General Description: Utility function to check if an alert, vibrate, or dtma tone is being played.==================================================================================================== Motorola Confidential Proprietary Advanced Technology and Software Operations (c) Copyright Motorola 1999, All Rights Reserved Revision History: Modification TrackingAuthor Date Number Description of Changes------------------------- ------------ ---------- -------------------------------------------w16355 05/20/2004 LIBdd89151 Interface function for battery drain. - Added a function to let the SBCM task know what accessory we're using with it's volume.Ravit Leijden Van AMstel 25/02/2002 LIBbb21281 Add MyTone DB to LCA phoneKevin Tang 02/02/02 LIBbb10803 Added new interfaces to support dealing with file namesSteve Hagino 10/02/2000 CSGce74921 SBCM improperly implements batt offsets in RX - Creation of file Portability: This module is portable to other compilers.==================================================================================================== INCLUDE FILES==================================================================================================*/#include <ENGINE_AUDIO/aud_alert_info.h> #ifndef TD_AUD_TONE_REQ_TONE_TYPE_INCLUDE#include <ENGINE_AUDIO/td_aud_tone_req_tone_type.h>#endif/*================================================================================================== LOCAL FUNCTION PROTOTYPES==================================================================================================*/ /*================================================================================================== LOCAL CONSTANTS==================================================================================================*/TD_AUD_TONE_REQ_TONE_TYPE_T current_tone_name = DL_AUDIO_TONE_TYPE_INVALID_TONE;/*================================================================================================== LOCAL TYPEDEFS (STRUCTURES, UNIONS, ENUMS)==================================================================================================*//*================================================================================================== LOCAL MACROS==================================================================================================*//*================================================================================================== LOCAL VARIABLES==================================================================================================*/ AUD_DEVICE_AND_VOLUME_T aud_device_and_volume_g = { 0 };/*================================================================================================== GLOBAL VARIABLES==================================================================================================*//*================================================================================================== LOCAL FUNCTIONS==================================================================================================*//*================================================================================================== GLOBAL FUNCTIONS==================================================================================================*//*==================================================================================================FUNCTION: aud_is_alert_tone_onDESCRIPTION: This function makes a request to the Audio Manager to check if a alert is being played.ARGUMENTS PASSED: None. RETURN VALUE: BOOL. Returns true if alert is being played, other false.PRE-CONDITIONS: None POST-CONDITIONS: NoneIMPORTANT NOTES: None==================================================================================================*/BOOLaud_is_alert_tone_on(void){ if(current_tone_name >= DL_AUDIO_TONE_TYPE_NETWORK_LITE_ID_LIMIT && current_tone_name < DL_AUDIO_TONE_TYPE_ALERT_SOUND_LIMIT) { return TRUE; } else { return FALSE; }}/*==================================================================================================FUNCTION: aud_is_vibrator_onDESCRIPTION: This function makes a request to the Audio Manager to check if vibrator is on.ARGUMENTS PASSED: None. RETURN VALUE: BOOL. Returns TRUE if vibrate is on, false otherwisePRE-CONDITIONS: None POST-CONDITIONS: NoneIMPORTANT NOTES: None==================================================================================================*/BOOLaud_is_vibrator_on(void){ return isVibAlert(current_tone_name);}/*==================================================================================================FUNCTION: aud_is_key_tone_onDESCRIPTION: This function makes a request to the Audio Manager to check if a dtmf tone is being played.ARGUMENTS PASSED: None. RETURN VALUE: BOOL. Returns TRUE if key tone is being played, FALSE otherwise.PRE-CONDITIONS: None POST-CONDITIONS: NoneIMPORTANT NOTES: None==================================================================================================*/BOOLaud_is_key_tone_on(void){ if(current_tone_name >= DL_AUDIO_TONE_TYPE_NUMBERKEY0_DTMF && current_tone_name < DL_AUDIO_TONE_TYPE_KEY_LITE_ID_LIMIT ) { return TRUE; } else { return FALSE; }}/*==================================================================================================FUNCTION: aud_get_device_and_volumeDESCRIPTION: This function returns the current active accessory, the volume step used with it, and whether the audio is stereo or mono.ARGUMENTS PASSED: None. RETURN VALUE: AUD_DEVICE_AND_VOLUME_T * device_and_volume - A reference to a structure holding the current active accessory, the volume step currently used, and a bit indicating if the audio is mono or stereo.PRE-CONDITIONS: None POST-CONDITIONS: NoneIMPORTANT NOTES: None==================================================================================================*/AUD_DEVICE_AND_VOLUME_T *aud_get_device_and_volume( void ){ return( &aud_device_and_volume_g );}/*==================================================================================================FUNCTION: aud_set_device_and_volumeDESCRIPTION: This function stores the current active accessory, the volume step used with it, and whether the audio is stereo or mono.ARGUMENTS PASSED: AUD_DEVICE_AND_VOLUME_T * device_and_volume - A reference to a structure holding the current active accessory, the volume step currently used, and a bit indicating if the audio is mono or stereo. RETURN VALUE: None.PRE-CONDITIONS: None POST-CONDITIONS: NoneIMPORTANT NOTES: None==================================================================================================*/voidaud_set_device_and_volume( AUD_DEVICE_AND_VOLUME_T * device_and_volume ){ aud_device_and_volume_g = ( *device_and_volume );}#ifdef __cplusplus}#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -