am_app_logic_processor_va_vr.cc
来自「Motorola synergy audio component」· CC 代码 · 共 266 行
CC
266 行
/* (c) Copyright Motorola 1997 - 2004, All rights reserved. Motorola Confidential Proprietary Contains confidential proprietary information of Motorola, Inc. Reverse engineering is prohibited. The copyright notice does not imply publication. DESCRIPTION: This file contains the application logic layer of processing voice recognition related requests. *************** REVISION HISTORY ********************************************* Date Author Reference ======== ======== ========================== 2004-09-09 w16355 CR - LIBff14638 Bluephone: Audio Manager support for full duplex AMR voice. - Renamed VA/VR tones from AM to DL for consistency. 04-02-11 w17860 LIBdd75133 Phone looses audio when we do VA recording and close flip immediately. 01-01-29 mtaraba CSGce79517 Fix VA record in a call 00-12-21 mtaraba CSGce82934 main_comp_hardware.h within engine_audio vob should be removed 00-09-01 blamers CR - CSGce61298 Complete functionality for VA FF/Rew - Remove unused tone types. AM_AUDIO_TONE_TYPE_VA_FAST_FORWARD AM_AUDIO_TONE_TYPE_VA_GET_TIME 00-08-09 mtaraba CR - CSGce55882 Eliminate file gsm.h from audio manager 00-05-05 shagino CR - CSGce56425 Implement handsfree_status funtion - Updated DL types to match new naming convention 99-10-25 ktang PR - CSGce40785 GRiEF Audio: DL Audio Tone Types and DL DB Feature IDs - replaced td tone types and ids with DL tone types and ids 99-08-02 mkloza PR - CSGce34326 GRiEF: Stubout all Audio SEEM calls - stubout ckm calls 98-01-21 slam PR - CSGce16260 Double flip in VA/VR audio operation - Move VA/VR server reset codes from disable_va_vr_command() to the calling functions. 97-09-08 slam PR - CSGce12890 97-08-28 slam PR - CSGce11610 97-08-05 slam PR - CSGce11610 97-07-21 slam PR - CSGce10240 97-06-20 slam PR - CSGce10240 97-06-17 slam PR - CSGce10240 97-06-06 slam PR - CSGce10240 97-06-02 slam PR - CSGce10240 97-05-28 slam PR - CSGce10240 97-05-19 slam PR - CSGce10240************** INCLUDES ******************************************************/#include <SUAPI/suapi.h>#include <ENGINE_AUDIO/audio_conditional_compile_def.h>#include <ENGINE_AUDIO/td_ckm_phone_adaptor_type.h>#include <audio/am_app_logic_processor_main.h>#include <audio/am_va_vr_command_types.h>#include <audio/AM_App_Logic_Processor.H>#include <audio/AM_Tone_Sequence_Handler.H>#include <audio/AM_Timer_Container.H>#include <audio/AM_Timer_Non_SC.H>/************** LOCAL CONSTANTS ***********************************************//************** LOCAL STRUCTURES, ENUMS, AND TYPEDEFS *************************//************** LOCAL FUNCTION PROTOTYPES *************************************//************** LOCAL MACROS **************************************************//************** LOCAL VARIABLES ***********************************************//************** FUNCTION DEFINITIONS ******************************************/#if ((AUDIO_SPEAKER_DEPENDENT_VR == TRUE) ||\ (AUDIO_DIGITAL_VOICE_ANNOTATOR == TRUE))/* DESCRIPTION: This function will add a specified VA/VR event within the AM event queue. INPUTS: audio event to be added OUTPUTS: None IMPORTANT NOTES: 1. This function definition is valid only when conditional compilation flag of speaker dependent voice recognition, analog VA or digital VA is set to TRUE.*/void AM_App_Logic_Processor::generate_va_vr_command( DL_AUDIO_TONE_TYPE_T event ){ AM_AUDIO_PATH_TYPE path_type = AM_AUDIO_PATH_ID_INVALID_TONE; switch(event) { case DL_AUDIO_TONE_TYPE_SDVR_CAPTURE_WITH_VA: path_type = AM_AUDIO_PATH_ID_VA_VR_IO; event = DL_AUDIO_TONE_TYPE_SDVR_CAPTURE; break; case DL_AUDIO_TONE_TYPE_VA_RECORD: path_type = AM_AUDIO_PATH_ID_VA_IO; break; case DL_AUDIO_TONE_TYPE_SDVR_CAPTURE: case DL_AUDIO_TONE_TYPE_SDVR: path_type = AM_AUDIO_PATH_ID_VR_IO; break; case DL_AUDIO_TONE_TYPE_VA_PLAYBACK: case DL_AUDIO_TONE_TYPE_VOICE_TAG: path_type = AM_AUDIO_PATH_ID_VA_VR_OUTPUT; break; case DL_AUDIO_TONE_TYPE_SDVR_TRAIN: case DL_AUDIO_TONE_TYPE_SDVR_DELETE: case DL_AUDIO_TONE_TYPE_SDVR_GET_MODELS: case DL_AUDIO_TONE_TYPE_VA_ERASE: case DL_AUDIO_TONE_TYPE_VA_VR_REFORMAT: case DL_AUDIO_TONE_TYPE_SDVR_ENABLE: case DL_AUDIO_TONE_TYPE_SDVR_DISABLE: path_type = AM_AUDIO_PATH_ID_VA_VR_NON_AUDIO; break; default: path_type = AM_AUDIO_PATH_ID_INVALID_TONE; }; // make sure we found a match in the table if( path_type != AM_AUDIO_PATH_ID_INVALID_TONE ) { // push the specified VA/VR event onto the event queue eventqueuehandler.Push( event, path_type); update_audio(); } }/* DESCRIPTION: This function will remove a specified VA/VR event from the AM event queue. INPUTS: audio event to be removed OUTPUTS: None IMPORTANT NOTES: 1. This function definition is valid only when conditional compilation flag of speaker dependent voice recognition, analog VA or digital VA is set to TRUE.*/void AM_App_Logic_Processor::disable_va_vr_command( DL_AUDIO_TONE_TYPE_T event ){ // pushing and popping a VA/VR reset command is to prevent a VA/VR abort // command to go out when a VA/VR request is completed eventqueuehandler.Push(DL_AUDIO_TONE_TYPE_VA_VR_RESET, AM_AUDIO_PATH_ID_VA_VR_NON_AUDIO); update_audio(); // remove the specified VA/VR event from the event queue eventqueuehandler.Remove( event, 0 ); // remove the VA/VR Reset event from the event queue eventqueuehandler.Remove( DL_AUDIO_TONE_TYPE_VA_VR_RESET , 0); update_audio();}/* DESCRIPTION: This function will remove all VA/VR related events from the AM event queue and also inform the hardware layer to abort all VA/VR activities. INPUTS: None OUTPUTS: None IMPORTANT NOTES: 1. This function definition is valid only when conditional compilation flag of speaker dependent voice recognition, analog VA or digital VA is set to TRUE.*/void AM_App_Logic_Processor::disable_all_VA_VR( void ){ eventqueuehandler.RemoveAll(AM_AUDIO_PATH_ID_VA_IO); eventqueuehandler.RemoveAll(AM_AUDIO_PATH_ID_VR_IO); eventqueuehandler.RemoveAll(AM_AUDIO_PATH_ID_VA_VR_IO); eventqueuehandler.RemoveAll(AM_AUDIO_PATH_ID_VA_VR_OUTPUT); eventqueuehandler.RemoveAll(AM_AUDIO_PATH_ID_VA_VR_NON_AUDIO); // remove all VA/VR related events from the event queue update_audio();}/* DESCRIPTION: This function will remove all VA/VR related events from the AM event queue. INPUTS: None OUTPUTS: None IMPORTANT NOTES: 1. This function definition is valid only when conditional compilation flag of speaker dependent voice recognition, analog VA or digital VA is set to TRUE.*/void AM_App_Logic_Processor::remove_all_VA_VR ( void ){ eventqueuehandler.RemoveAll(AM_AUDIO_PATH_ID_VA_IO); eventqueuehandler.RemoveAll(AM_AUDIO_PATH_ID_VR_IO); eventqueuehandler.RemoveAll(AM_AUDIO_PATH_ID_VA_VR_IO); eventqueuehandler.RemoveAll(AM_AUDIO_PATH_ID_VA_VR_OUTPUT); eventqueuehandler.RemoveAll(AM_AUDIO_PATH_ID_VA_VR_NON_AUDIO);}/* DESCRIPTION: This function will generate a beep and start another timer when we are doing va in a call. INPUTS: None OUTPUTS: None IMPORTANT NOTES: 1. This function definition is valid only when conditional compilation flag of speaker dependent voice recognition, analog VA or digital VA is set to TRUE.*/void AM_App_Logic_Processor::generate_va_beep( void ){ if ((relay_layer.is_incall()) && (relay_layer.is_va_record()) && (!tx_mute_status())) { // make a beep primitive_builder.build_va_beep(); // start another timer va_beep_timer.ResetTimer( VA_BEEP_DELAY ); }}#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?