FreeCalypso > hg > fc-tourmaline
diff src/ui/bmi/mmiVoiceMemo.c @ 92:c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 08 Nov 2020 06:39:16 +0000 |
parents | 67bfe9f274f6 |
children | e41c934ecd97 |
line wrap: on
line diff
--- a/src/ui/bmi/mmiVoiceMemo.c Sun Nov 08 05:12:05 2020 +0000 +++ b/src/ui/bmi/mmiVoiceMemo.c Sun Nov 08 06:39:16 2020 +0000 @@ -28,25 +28,25 @@ $History: MmiVoiceMemo.c Mar 28, 2007 DR: OMAPS00122762 x0039928 - Description: MM: Deleting a PCM Voice Memo message in one particular memory, + Description: MM: Deleting a PCM Voice Memo message in one particular memory, delete them in all memories Solution: voice memo position and pcm voice memo position is provided for all the devices. - + Mar 31, 2006 ER: OMAPS00067709 x0pleela -Description: Voice Buffering implementation on C+ for PTT via PCM API +Description: Voice Buffering implementation on C+ for PTT via PCM API Solution: Added prototype for voice_buffering_stop_recording - Updating voicebuffering data for play stopped in play callback - + Updating voicebuffering data for play stopped in play callback + Mar 15, 2006 ER: OMAPS00067709 x0pleela -Description: Voice Buffering implementation on C+ for PTT via PCM API -Solution: Defined new macro "PCM_VOICE_MEMO_MAX_DURATION" to restrict the recording +Description: Voice Buffering implementation on C+ for PTT via PCM API +Solution: Defined new macro "PCM_VOICE_MEMO_MAX_DURATION" to restrict the recording timeout to 20 secs for PCM voice memo and voice buffering - Added prototypes of new functions inputVoiceMemoNumberEditor, voiceMemoNumberCB, + Added prototypes of new functions inputVoiceMemoNumberEditor, voiceMemoNumberCB, voice_buffering_tim_cb, voice_buffering_data_reset Added following new functions: - pcm_voice_memo_play: Sets voice memo type to PCM_VOICE_MEMO which indicates + pcm_voice_memo_play: Sets voice memo type to PCM_VOICE_MEMO which indicates PCM voice memo is active and start playing the voice - pcm_voice_memo_record: Sets voice memo type to PCM_VOICE_MEMO which indicates + pcm_voice_memo_record: Sets voice memo type to PCM_VOICE_MEMO which indicates PCM voice memo is active and start recording the voice voice_buffering_edit_num: Opens an edtor for the user to enter PTT number. Also resets voice buffering data with default values @@ -54,14 +54,14 @@ inputVoiceMemoNumberEditor: Settings of Editor voice_buffering_record_start: Starts recording voice and conects to the PTT number if the call is not active. If in call, then start playing the voice - voice_buffering_record_stop: Stops the timer and recording. If call is not active the + voice_buffering_record_stop: Stops the timer and recording. If call is not active the disconnects the call - voice_buffering_playback_start: Starts playing the voice. If any error while playing, + voice_buffering_playback_start: Starts playing the voice. If any error while playing, stops timer and recording - voice_buffering_stop_recording: A wrapper function for record stop to invoke from other + voice_buffering_stop_recording: A wrapper function for record stop to invoke from other modules. Stops the timer and recording voice_buffering_stop_playing: A wrapper function for play stop to invoke from other modules - voice_buffering_tim_cb: Timer callback. Stops the timer. If PTT call is not setup disconnect + voice_buffering_tim_cb: Timer callback. Stops the timer. If PTT call is not setup disconnect the call, else call record stop voice_buffering_data_reset: Resets voice buffering data to default values @@ -76,15 +76,15 @@ Function: voice_memo_riv_play_cb Changes: Added code to allow user to accept ant incoming call after the buffering phase - + Feb 27, 2006 ER: OMAPS00067709 x0pleela -Description: Voice Buffering implementation on C+ for PTT via PCM API -Solution: Defined a global variable gPcm_voice_Memo which indicates which Voice memo is active +Description: Voice Buffering implementation on C+ for PTT via PCM API +Solution: Defined a global variable gPcm_voice_Memo which indicates which Voice memo is active and corresponding audio APIs will be invoked and duplication of code is avoided Feb 24, 2006 ER: OMAPS00067709 x0pleela -Description: Voice Buffering implementation on C+ for PTT via PCM API -Solution: Defined new macro PCM_VOICE_MEMO_MAX_DURATION which defines maximum +Description: Voice Buffering implementation on C+ for PTT via PCM API +Solution: Defined new macro PCM_VOICE_MEMO_MAX_DURATION which defines maximum recording and playing duration for PCM voice memo and voice buffering Implemented following functions to support PCM voice memo feature pcm_voice_memo_init: Initialization of PCM voice memo @@ -100,7 +100,7 @@ pcm_voice_memo_kbd_cb: Keyboard event handler pcm_voice_memo_riv_record_cb: Callback that handles the return status for PCM voice memo recording pcm_voice_memo_riv_play_cb:Callback that handles the return status for PCM voice memo palying - + 09/04/01 Original Condat(UK) BMI version. $End @@ -231,7 +231,7 @@ //x0pleela 09 Mar, 2006 ER:OMAPS00067709 #ifdef FF_PCM_VM_VB EXTERN T_voice_buffering voice_buffering_data; -EXTERN T_call call_data; +EXTERN T_call call_data; #endif /******************************************************************************* @@ -279,11 +279,11 @@ GLOBAL void voice_memo_init (void) { TRACE_FUNCTION ("voice_memo_init()"); - + #ifdef FF_PCM_VM_VB voice_buffering_data_reset(); #endif - + } /******************************************************************************* @@ -301,7 +301,7 @@ GLOBAL void voice_memo_exit (void) { TRACE_FUNCTION ("voice_memo_exit()"); - + } @@ -329,7 +329,7 @@ #ifdef FF_PCM_VM_VB set_voice_memo_type( AMR_VOICE_MEMO); #endif - + //create a new voice memo dialog voice_memo_start (win, VM_PLAY); return 1; // ADDED BY RAVI - 29-11-2005 @@ -361,17 +361,17 @@ txtId = TxtFFS; FFS_flashData.PCM_voicememo_storage = SNAP_STG_FFS; break; - + case 1: txtId = TxtNORMS; FFS_flashData.PCM_voicememo_storage = SNAP_STG_NORMS; break; - + case 2: txtId = TxtNAND; FFS_flashData.PCM_voicememo_storage = SNAP_STG_NAND; break; - + case 3: txtId = TxtTflash; FFS_flashData.PCM_voicememo_storage = SNAP_STG_MMC; @@ -383,7 +383,7 @@ TRACE_EVENT_P1("STorage set to %d ", FFS_flashData.PCM_voicememo_storage); //Display the dialgbox to the user. voice_memo_dialog_create(parent_win,txtId,TxtSelected); - return MFW_EVENT_CONSUMED; + return MFW_EVENT_CONSUMED; } /******************************************************************************* @@ -411,7 +411,7 @@ txtId = TxtFFS; FFS_flashData.voicebuffer_storage = SNAP_STG_FFS; break; - + case 1: txtId = TxtNORMS; FFS_flashData.voicebuffer_storage = SNAP_STG_NORMS; @@ -421,7 +421,7 @@ txtId = TxtNAND; FFS_flashData.voicebuffer_storage = SNAP_STG_NAND; break; - + case 3: txtId = TxtTflash; FFS_flashData.voicebuffer_storage = SNAP_STG_MMC; @@ -433,7 +433,7 @@ TRACE_EVENT_P1("STorage set to %d ", FFS_flashData.voicebuffer_storage); //Display the dialgbox to the user. voice_memo_dialog_create(parent_win,txtId,TxtSelected); - return MFW_EVENT_CONSUMED; + return MFW_EVENT_CONSUMED; } /******************************************************************************* @@ -461,17 +461,17 @@ txtId = TxtFFS; FFS_flashData.voicememo_storage = SNAP_STG_FFS; break; - + case 1: txtId = TxtNORMS; FFS_flashData.voicememo_storage = SNAP_STG_NORMS; break; - + case 2: txtId = TxtNAND; FFS_flashData.voicememo_storage = SNAP_STG_NAND; break; - + case 3: txtId = TxtTflash; FFS_flashData.voicememo_storage = SNAP_STG_MMC; @@ -483,7 +483,7 @@ TRACE_EVENT_P1("STorage set to %d ", FFS_flashData.voicememo_storage); //Display the dialgbox to the user. voice_memo_dialog_create(parent_win,txtId,TxtSelected); - return MFW_EVENT_CONSUMED; + return MFW_EVENT_CONSUMED; } #endif @@ -580,7 +580,7 @@ ** Initialise values to safe defualts */ data->play_sk2 = TxtSoftBack; - + /* * return window handle */ @@ -629,7 +629,7 @@ */ FREE_MEMORY ((void *)data, sizeof (T_voice_memo)); } - + //x0pleela 27 Feb, 2006 ER: OMAPA00067709 //Set gVoiceMemo to NONE while destroying voice memo dialog #ifdef FF_PCM_VM_VB @@ -656,9 +656,9 @@ T_voice_memo * data = (T_voice_memo *)win_data->user; // T_DISPLAY_DATA display_info; // RAVI - + SHORT mfw_aud_retVal = 0; /* x0039928 - Lint warning fix */ - #ifdef FF_PCM_VM_VB + #ifdef FF_PCM_VM_VB UBYTE vm_type; //to store voice memo type #endif @@ -685,15 +685,15 @@ if (value EQ VM_PLAY) { TRACE_EVENT ("VM_PLAY()"); - + mfw_aud_retVal = mfw_aud_vm_start_playback(voice_memo_riv_play_cb); - + if (mfw_aud_retVal == MFW_AUD_VM_OK) { //start the second timer data->time = 0; tim_start (data->info_tim); - + //Set the Right Softkey Id data->play_sk2 = TxtStop; } @@ -707,7 +707,7 @@ { //Display a dialog and exit TRACE_EVENT_P1 ("ERROR : mfw_aud_vm_start_playback failed with return value : %d", mfw_aud_retVal); - + voice_memo_dialog_create( win, TxtPlayback, TxtFailed); } } @@ -722,17 +722,17 @@ vm_type = get_voice_memo_type(); if(vm_type EQ PCM_VOICE_MEMO) - mfw_aud_retVal = mfw_aud_vm_start_record(PCM_VOICE_MEMO_MAX_DURATION, + mfw_aud_retVal = mfw_aud_vm_start_record(PCM_VOICE_MEMO_MAX_DURATION, voice_memo_riv_record_cb); else { if(vm_type EQ AMR_VOICE_MEMO ) -#endif +#endif mfw_aud_retVal = mfw_aud_vm_start_record(VOICE_MEMO_MAX_DURATION, voice_memo_riv_record_cb); #ifdef FF_PCM_VM_VB } #endif - + // If the Riviera call failed if (mfw_aud_retVal == MFW_AUD_VM_OK) { @@ -748,21 +748,21 @@ /* RAVI - 20-1-2006 */ /* Silent Implementation */ #ifdef NEPTUNE_BOARD - audio_PlaySoundID(0, TONES_KEYBEEP, getCurrentVoulmeSettings(), + audio_PlaySoundID(0, TONES_KEYBEEP, getCurrentVoulmeSettings(), AUDIO_PLAY_ONCE ); /* GW#2355 /CQ11341 */ #else /* play Keybeep */ audio_PlaySoundID(0, TONES_KEYBEEP, 200, AUDIO_PLAY_ONCE ); /* GW#2355 /CQ11341 */ #endif /* END RAVI */ - + voice_memo_dialog_create( win, TxtRecording, TxtFull ); } else { //Display a dialog and exit TRACE_EVENT_P1 ("ERROR : mfw_aud_vm_start_record failed with return value : %d", mfw_aud_retVal); - + voice_memo_dialog_create( win, TxtRecording, TxtFailed ); } } @@ -889,7 +889,7 @@ // char buf[40]; // RAVI //x0pleela 08 Mar, 2006 ER:OMAPS00067709 -#ifdef FF_PCM_VM_VB +#ifdef FF_PCM_VM_VB UBYTE vm_type; //to store voice memo type #endif @@ -903,12 +903,12 @@ if(vm_type EQ PCM_VOICE_MEMO) vm_duration = PCM_VOICE_MEMO_MAX_DURATION; - else + else { if (vm_type EQ AMR_VOICE_MEMO) #endif vm_duration = VOICE_MEMO_MAX_DURATION; -#ifdef FF_PCM_VM_VB +#ifdef FF_PCM_VM_VB } #endif @@ -950,7 +950,7 @@ case VM_RECORD: data->time++; - + if (data->time < vm_duration) { TRACE_EVENT ("continue the second timer"); @@ -969,7 +969,7 @@ //x0pleela 27 Feb, 2006 ER:OMAPS00067709 //changed from Macro VOICE_MEMO_MAX_DURATION to local variable vm_duration mfw_aud_vm_set_duration(vm_duration); - + #ifndef _SIMULATION_ /* ** Stop recording the Voice Memo. @@ -1038,7 +1038,7 @@ ** Stop playing the Voice Memo and Delete it. */ mfw_aud_retVal = mfw_aud_vm_stop_playback(voice_memo_riv_play_cb); - + if (mfw_aud_retVal != MFW_AUD_VM_OK) TRACE_EVENT_P1 ("ERROR : mfw_aud_vm_stop_playback failed with return value : %d", mfw_aud_retVal); #else @@ -1055,16 +1055,16 @@ else if (Identifier EQ VM_RECORD) { mfw_aud_vm_set_duration(data->time); - + #ifndef _SIMULATION_ /* ** Stop recording the Voice Memo. */ mfw_aud_retVal = mfw_aud_vm_stop_record(voice_memo_riv_record_cb); - + if (mfw_aud_retVal != MFW_AUD_VM_OK) TRACE_EVENT_P1 ("ERROR : mfw_aud_vm_stop_record failed with return value : %d", mfw_aud_retVal); - + //go back to the previous dialog SEND_EVENT (win, VM_DESTROY, 0, 0); #else @@ -1082,7 +1082,7 @@ ** Stop playing the Voice Memo. */ mfw_aud_retVal = mfw_aud_vm_stop_playback(voice_memo_riv_play_cb); - + if (mfw_aud_retVal != MFW_AUD_VM_OK) TRACE_EVENT_P1 ("ERROR : mfw_aud_vm_stop_playback failed with return value : %d", mfw_aud_retVal); #else @@ -1154,7 +1154,7 @@ static void voice_memo_dialog_create(T_MFW_HND win, int str1, int str2) { T_DISPLAY_DATA display_info; - + TRACE_FUNCTION ("voice_memo_dialog_create()"); dlg_initDisplayData_TextId( &display_info, TxtNull, TxtNull, str1, str2, COLOUR_STATUS); @@ -1198,14 +1198,14 @@ record_status->recorded_duration); mfw_aud_vm_set_duration((UINT8)record_status->recorded_duration); } - #ifdef FF_PCM_VM_VB + #ifdef FF_PCM_VM_VB } break; case PCM_VOICE_MEMO: { T_AUDIO_VM_PCM_RECORD_STATUS *pcm_vm_record_status; - + pcm_vm_record_status = (T_AUDIO_VM_PCM_RECORD_STATUS *)parameter; if (pcm_vm_record_status->status != AUDIO_OK) { @@ -1220,13 +1220,13 @@ } } break; - + case VOICE_BUFFERING: { T_AUDIO_VBUF_PCM_RECORD_STATUS *vbuf_pcm_record_status; vbuf_pcm_record_status = (T_AUDIO_VBUF_PCM_RECORD_STATUS *)parameter; - + if (vbuf_pcm_record_status->status != AUDIO_OK) { TRACE_EVENT_P1("ERROR : voice_memo_riv_record_cb received AUDIO_ERROR, recorded duration is %d", @@ -1240,21 +1240,21 @@ //check for reason to call record_stop switch( voice_buffering_data.rec_stop_reason) { - case CALLING_PARTY_END_CALL: //calling party hangs up + case CALLING_PARTY_END_CALL: //calling party hangs up case CALLED_PARTY_END_CALL: //called party hangs up voice_buffering_data.call_active = FALSE; break; - + case PLAY_ERROR: //recording timeout while playing voice_buffering_data.buffering_phase = FALSE; break; - - case CALL_END_BEF_SETUP: //calling party hangs up before call setup + + case CALL_END_BEF_SETUP: //calling party hangs up before call setup case USER_SEL_STOP: //user selected "STOP" option, then just return case RECORDING_TIMEOUT: //recording timeout case CALLED_PARTY_NOT_AVAILABLE: //not reachable default: - break; + break; } voice_buffering_data.recording_possible = TRUE; voice_buffering_data.incoming_call_discon = FALSE; @@ -1262,20 +1262,20 @@ timDelete(voice_buffering_data.voice_buffering_tim); } //x0pleela 03 Apr, 2006 ER: OMAPS00067709 - //Set voice memo type to NONE - set_voice_memo_type(NONE); - } - + //Set voice memo type to NONE + set_voice_memo_type(NONE); + } + break; - + default: break; } - + #endif /* FF_PCM_VM_VB */ - + /* BEGIN ADD: Req ID: : Sumit : 14-Mar-05 */ #endif /* NEPTUNE_BOARD */ /* END ADD: Req ID: : Sumit : 14-Mar-05 */ @@ -1312,8 +1312,8 @@ { TRACE_EVENT("INFO : voice_memo_riv_play_cb received AUDIO_OK"); } - - #ifdef FF_PCM_VM_VB + + #ifdef FF_PCM_VM_VB } break; @@ -1331,12 +1331,12 @@ } } break; - + case VOICE_BUFFERING: { T_AUDIO_VBUF_PCM_PLAY_STATUS *voice_buffering_play_status; voice_buffering_play_status = (T_AUDIO_VBUF_PCM_PLAY_STATUS *)parameter; - + if (voice_buffering_play_status->status != AUDIO_OK) { TRACE_EVENT("ERROR : voice_memo_riv_play_cb received AUDIO_ERROR"); @@ -1351,20 +1351,20 @@ //x0pleela 06 Jul, 2006 DR: OMAPS00067709 //Fix from AS team vocoder_mute_ul(0); - + //x0pleela 03 Apr, 2006 ER: OMAPS00067709 - //Set voice memo type to NONE - set_voice_memo_type(NONE); - } - + //Set voice memo type to NONE + set_voice_memo_type(NONE); + } + break; - + default: break; } - + - + #endif /* FF_PCM_VM_VB */ /* BEGIN ADD: Req ID: : Sumit : 14-Mar-05 */ @@ -1380,7 +1380,7 @@ $Function: pcm_voice_memo_play - $Description: Sets voice memo type to PCM_VOICE_MEMO which indicates PCM voice memo is + $Description: Sets voice memo type to PCM_VOICE_MEMO which indicates PCM voice memo is active and start playing the voice $Returns: @@ -1399,14 +1399,14 @@ set_voice_memo_type( PCM_VOICE_MEMO); //create a new voice memo dialog voice_memo_start (win, VM_PLAY); - return 1; + return 1; } /******************************************************************************* $Function: pcm_voice_memo_record - $Description: Sets voice memo type to PCM_VOICE_MEMO which indicates PCM voice memo is + $Description: Sets voice memo type to PCM_VOICE_MEMO which indicates PCM voice memo is active and start recording the voice @@ -1433,7 +1433,7 @@ $Function: voice_buffering_edit_num - $Description: Opens an edtor for the user to enter PTT number. Also resets voice buffering data + $Description: Opens an edtor for the user to enter PTT number. Also resets voice buffering data with default values $Returns: @@ -1449,17 +1449,17 @@ T_phbk *Phbk = data->phbk; TRACE_FUNCTION ("voice_buffering_edit_num()"); - + set_voice_memo_type( VOICE_BUFFERING ); - + memset( Phbk->phbk->edt_buf_number, '\0', PHB_MAX_LEN ); Phbk->input_number_win = inputVoiceMemoNumberEditor( win, Phbk->edt_buf_number ); //Reset voice buffering data with default values voice_buffering_data_reset(); - + /* Always return event consumed */ - return MFW_EVENT_CONSUMED; + return MFW_EVENT_CONSUMED; } /******************************************************************************* @@ -1478,7 +1478,7 @@ { T_MFW_WIN *win_data = ( (T_MFW_HDR *) win )->data; tBookStandard *data = (tBookStandard *) win_data->user; - + TRACE_FUNCTION("voiceMemoNumberCB()"); switch ( reason ) @@ -1492,7 +1492,7 @@ data->phbk->input_number_win = 0; } break; - + case INFO_KCD_RIGHT: case INFO_KCD_HUP: { @@ -1500,7 +1500,7 @@ data->phbk->input_number_win = 0; } break; - + default: { /* otherwise no action to be performed @@ -1523,9 +1523,9 @@ MfwHnd inputVoiceMemoNumberEditor( MfwHnd parent, void *buffer ) { T_AUI_EDITOR_DATA editor_data; - + TRACE_FUNCTION ("inputVoiceMemoNumberEditor()"); - + AUI_edit_SetDefault(&editor_data); AUI_edit_SetDisplay(&editor_data, NUMBER_EDITOR, COLOUR_EDITOR_XX, EDITOR_FONT); AUI_edit_SetEvents(&editor_data, 0, FALSE, FOREVER, (T_AUI_EDIT_CB)voiceMemoNumberCB); @@ -1533,14 +1533,14 @@ AUI_edit_SetAltTextStr(&editor_data, 0, NULL, TRUE, TxtSoftBack); AUI_edit_SetBuffer(&editor_data, ATB_DCS_ASCII, (UBYTE *)buffer, NUMBER_LENGTH); AUI_edit_SetMode(&editor_data, 0, ED_CURSOR_UNDERLINE); - + return AUI_edit_Start(parent, &editor_data); } /******************************************************************************* $Function: voice_buffering_record_start - $Description: Starts recording voice and conects to the PTT number if the call is not active. + $Description: Starts recording voice and conects to the PTT number if the call is not active. If in call, then start playing the voice $Returns: @@ -1564,19 +1564,19 @@ if( voice_buffering_data.recording_possible ) { //create timer - voice_buffering_data.voice_buffering_tim= tim_create (win, 20000, + voice_buffering_data.voice_buffering_tim= tim_create (win, 20000, (T_MFW_CB)voice_buffering_tim_cb); //start timer timStart(voice_buffering_data.voice_buffering_tim); voice_buffering_data.buffering_phase = TRUE; voice_buffering_data.recording_possible = FALSE; - mfw_aud_retVal = mfw_aud_vm_start_record(PCM_VOICE_MEMO_MAX_DURATION, - voice_memo_riv_record_cb); + mfw_aud_retVal = mfw_aud_vm_start_record(PCM_VOICE_MEMO_MAX_DURATION, + voice_memo_riv_record_cb); if(voice_buffering_data.call_active ) { //start playing the recorded voice - voice_buffering_playback_start(); + voice_buffering_playback_start(); } else { @@ -1604,7 +1604,7 @@ { //Display a dialog and exit TRACE_EVENT_P1 ("ERROR : voice_buffering_record_start failed with return value : %d", mfw_aud_retVal); - + voice_memo_dialog_create( win, TxtRecording, TxtFailed ); } } @@ -1612,10 +1612,10 @@ else { //Display a dialog saying "Already Recording" - voice_memo_dialog_create(win, TxtAlready, TxtRecording); + voice_memo_dialog_create(win, TxtAlready, TxtRecording); } win_show (win); - return 1; + return 1; } /******************************************************************************* @@ -1639,7 +1639,7 @@ //store window handler voice_buffering_data.win_hnd = win; - + voice_buffering_data.rec_stop_reason = USER_SEL_STOP; voice_buffering_data.recording_possible = TRUE; @@ -1647,11 +1647,11 @@ { //stop the timer, if recording timStop(voice_buffering_data.voice_buffering_tim); - + /* destroy the redial windows if exit*/ cm_redial_abort(); cm_disconnect(call_data.outCall); - + if (!call_data.calls.numCalls) { call_data.ignore_disconnect = TRUE; @@ -1663,8 +1663,8 @@ //Stop recording voice_buffering_stop_recording(); } - - return 1; + + return 1; } /******************************************************************************* @@ -1705,7 +1705,7 @@ //update the reason to stop recording voice_buffering_data.rec_stop_reason = PLAY_ERROR; - //stop recording + //stop recording voice_buffering_stop_recording(); } } @@ -1716,7 +1716,7 @@ $Function: voice_buffering_stop_recording - $Description: A wrapper function for record stop to invoke from other modules. + $Description: A wrapper function for record stop to invoke from other modules. Stops the timer and recording $Returns: @@ -1728,12 +1728,12 @@ { SHORT mfw_aud_retVal; - TRACE_FUNCTION ("voice_buffering_stop_recording()"); + TRACE_FUNCTION ("voice_buffering_stop_recording()"); //stop the timer, if recording timStop(voice_buffering_data.voice_buffering_tim); - - mfw_aud_retVal = mfw_aud_vm_stop_record(voice_memo_riv_record_cb); + + mfw_aud_retVal = mfw_aud_vm_stop_record(voice_memo_riv_record_cb); if (mfw_aud_retVal != MFW_AUD_VM_OK) { @@ -1749,7 +1749,7 @@ $Function: voice_buffering_stop_playing - $Description: A wrapper function for play stop to invoke from other modules. + $Description: A wrapper function for play stop to invoke from other modules. $Returns: @@ -1760,9 +1760,9 @@ { SHORT mfw_aud_retVal; - TRACE_FUNCTION ("voice_buffering_stop_playing()"); - - mfw_aud_retVal = mfw_aud_vm_stop_playback(voice_memo_riv_play_cb); + TRACE_FUNCTION ("voice_buffering_stop_playing()"); + + mfw_aud_retVal = mfw_aud_vm_stop_playback(voice_memo_riv_play_cb); if (mfw_aud_retVal != MFW_AUD_VM_OK) { @@ -1779,7 +1779,7 @@ $Function: voice_memo_tim_cb - $Description: Timer callback. Stops the timer. If PTT call is not setup disconnect the call, + $Description: Timer callback. Stops the timer. If PTT call is not setup disconnect the call, else call record stop $Returns: @@ -1800,12 +1800,12 @@ { timStop(voice_buffering_data.voice_buffering_tim); } - voice_buffering_data.rec_stop_reason = RECORDING_TIMEOUT; - + voice_buffering_data.rec_stop_reason = RECORDING_TIMEOUT; + if( !voice_buffering_data.call_active ) //timeout before call setup { cm_disconnect(call_data.outCall); - + if (!call_data.calls.numCalls) { call_data.ignore_disconnect = TRUE; @@ -1813,13 +1813,13 @@ } } else //timeout after call setup - { - mfw_aud_retVal = mfw_aud_vm_stop_record(voice_memo_riv_record_cb); - + { + mfw_aud_retVal = mfw_aud_vm_stop_record(voice_memo_riv_record_cb); + if (mfw_aud_retVal != MFW_AUD_VM_OK) { TRACE_EVENT_P1 ("ERROR : mfw_aud_vm_stop_record failed with return value : %d", mfw_aud_retVal); - + //display dialog saying "Recording Stop Failed" voice_memo_dialog_create( voice_buffering_data.win_hnd, TxtRecording, TxtStopFailed ); } @@ -1852,6 +1852,6 @@ voice_buffering_data.buffering_phase = FALSE; voice_buffering_data.incoming_call_discon = FALSE; voice_buffering_data.play_stopped = FALSE; - + } #endif