am_check_avail_timer.cc

来自「Motorola synergy audio component」· CC 代码 · 共 99 行

CC
99
字号
/* (c) Copyright Motorola 2000, 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 is the timer to let AM know it should check to see if VR is available *************** REVISION HISTORY *********************************************   Date       Author      Reference   ========   ========    ==========================   2004-11-05 w17860      LIBff24932              P4.4 Feature # 12583 Memory Reduction               - Remove Voice Dial and Voice Tag   00-12-21   mtaraba     CSGce82934              main_comp_hardware.h within engine_audio vob should be removed   11/09/00   qcf001      CSGce79507******************************************************************************/#include <ENGINE_AUDIO/audio_conditional_compile_def.h>#include <audio/AM_Check_Avail_Timer.H>#include <audio/AM_Timer_Container.H>#include <ENGINE_AUDIO/aud_prim_ids.h>#include <SUAPI/suapi.h>#include <ENGINE_AUDIO/am_hw_primitive_builder_interrupt.h>#include <audio/AM_Event_Handler.H>  #include <audio/AM_App_Logic_Processor.H>#include <audio/AM_Device_Layer_Interface.H>#include <ENGINE_AUDIO/td_vr_error_codes.h>#include <ENGINE_AUDIO/aud_interface.h>AM_Check_Avail_Timer am_check_avail_timer;extern AM_Event_Handler * am_event_handler;extern SU_SEMA_HANDLE sem_abort_complete;void AM_Check_Avail_Timer::RunSequence() {    void * msgptr = NULL;    msgptr =  suCreateMessage((UINT32)0, AUD_SDVR_CHECK_AVAIL_ID, SU_INVALID_HANDLE, NULL);    AM_SendMessage((char *) msgptr);}AM_Check_Avail_Timer::AM_Check_Avail_Timer() : AM_Timer_Base(){    InitialDelay = 3500;}#if (MAKE_FTR_VR == TRUE)void aud_sdvr_abort_immediate(void){       AM_VA_VR_COMMAND_TYPE command_in_progress;   UINT16 no_data[1];           if (aud_is_vr_active() == FALSE)   {               Send2DeviceLayer_vr_message(AM_VR_UNAVAILABLE_IND, 0);       am_timer_handler.Start(&am_check_avail_timer);       return;   }   suAcquireSem(sem_abort_complete, SU_NOWAIT, NULL);   command_in_progress =      am_event_handler->am_event_va_vr_server.get_command(AM_AUDIO_PATH_ID_VA_VR_NON_AUDIO);    if(command_in_progress == AM_SDVR_START_CAPTURE_CMD)   {        Send2DeviceLayer_SDVR_Capture_Complete_Ind(TD_DSP_FLASH_BUSY);   }   else if(command_in_progress == AM_SDVR_START_TRAIN_CMD)   {       Send2DeviceLayer_SDVR_Train_Complete_Ind(TD_VR_COMPLETE_DO_NOTHING, TD_DSP_FLASH_BUSY, 0);   }   else if(command_in_progress == AM_SDVR_START_RECOG_CMD)   {       Send2DeviceLayer_SDVR_Complete_Ind(TD_VR_COMPLETE_DO_NOTHING, 0, no_data);   }   Send2DeviceLayer_vr_message(AM_VR_UNAVAILABLE_IND, 0);   no_data[0] = 0;   am_event_handler->handle_aud_vr_stop_nomsg();   am_event_handler->am_event_logic_processor.update_audio();   am_event_handler->handle_aud_vr_disable_req_noresp();   am_event_handler->am_event_logic_processor.update_audio();   suAcquireSem(sem_abort_complete, 10, NULL);   suReleaseSem(sem_abort_complete, NULL);   am_timer_handler.Start(&am_check_avail_timer);   return;}#endif    

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?