annotate src/ui3/mfw/mfw_aud.c @ 420:e8ddbb0837ed

src/ui3: initial import of TCS3/LoCosto BMI & MFW code
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 21 Jan 2018 03:09:00 +0000
parents
children b66631a0b632
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
420
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 /*
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 | PROJECT: MMI-Framework (8417) $Workfile:: mfw_aud.c $|
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 | $Author:: NDH $Revision:: 1 $|
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 | CREATED: 04.02.03 $Modtime:: 10.04.00 14:58 $|
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 | STATE : code |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 MODULE : MFW_AUD
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 PURPOSE : This module contains Audio Riveria Interface functions.
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 HISTORY:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 Mar 28, 2007 DR: OMAPS00122762 x0039928
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 Description: MM: Deleting a PCM Voice Memo message in one particular memory,
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 delete them in all memories
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 Solution: voice memo position and pcm voice memo position is provided for all the devices.
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 July 03,2006 REF :OMAPS00083150 x0047075
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 Description :Audio muted on call swap / hold
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 Solution :Function call hl_drv_enable_vocoder() and hl_drv_disable_vocoder() are replaced with hl_drv_set_vocoder_state()
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 Mar 15, 2006 ER: OMAPS00067709 x0pleela
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 Description: Voice Buffering implementation on C+ for PTT via PCM API
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 Solution: Defined new macros of folder and file names for PCM voice memo and Voice buffering
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26 Defined new macros for Microphone and network gain of PCM VM and Voice buffering
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27 Defined new functions set_voice_memo_type, get_voice_memo_type, set_voice_buffering_rec_stop_reason
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 Function: mfw_aud_vm_delete_file
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 Changes:Handling file deletion forPCM voice memo also
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 Function: mfw_aud_vm_start_playback, mfw_aud_vm_stop_playback, mfw_aud_vm_start_record,
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32 mfw_aud_vm_stop_record, mfw_aud_vm_get_duration, mfw_aud_vm_set_duration
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33 Changes: Added code to call respective audio APIs for PCM voice memo and voice buffering
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 Feb 24, 2006 ER: OMAPS00067709 x0pleela
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36 Description: Voice Buffering implementation on C+ for PTT via PCM API
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37 Solution: Defined a global variable gPcm_voice_Memo which indicates which Voice memo is active
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 and corresponding audio APIs will be invoked and duplication of code is avoided
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40 Feb 24, 2006 ER: OMAPS00067709 x0pleela
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41 Description: Voice Buffering implementation on C+ for PTT via PCM API
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42 Solution: Adding new macros PCM_VM_FILE_NAME, PCM_VM_FOLDER to define new files for PCM voice memo
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43 Following functions are implemented to support PCM voice memo feature
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44 mfw_aud_vm_pcm_delete_file: Delete the file which held the PCM Voice Memo
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45 mfw_aud_vm_pcm_start_playback: Start playback of a previously recorded PCM Voice Memo
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46 mfw_aud_vm_pcm_stop_playback: Stop playback of a previously recorded PCM Voice Memo
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47 mfw_aud_vm_pcm_start_record: Configure Riviera and start recording a PCM Voice Memo
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48 mfw_aud_vm_pcm_stop_record: Stop recording a PCM Voice Memo
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49 mfw_aud_vm_pcm_get_duration: Get the duration of the previously recorded PCM Voice Memo
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50 mfw_aud_vm_pcm_set_duration: Set the duration of the previously recorded PCM Voice Memo
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
51
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
52 Apr 06, 2006 ERT: OMAPS00070660 x0039928(sumanth)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
53 Description: Need to reduce flash foot-print for Locosto Lite
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
54 Solution: Voice Memo feature is put under the flag #ifndef FF_NO_VOICE_MEMO to compile
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
55 out voice memo feature if the above flag is enabled.
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
56
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
57 Mar 03, 2005 REF: CRR MMI-ENH-28950 xnkulkar
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
58 Description: RE: Vocoder interface change
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
59 Solution: Function call 'enable_tch_vocoder()' is replaced with new functions 'hl_drv_enable_vocoder()'
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
60 and 'hl_drv_disable_vocoder()'
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
61
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
62 Aug 25, 2004 REF: CRR 20655 xnkulkar
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
63 Description: Voice Memo functionality not working
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
64 Solution: The voice recording functionality was failing because
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
65 " mmi" folder is not present. As a solution, we create the
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
66 "mmi" folder and then proceed with recording.
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
67 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
68
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
69
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
70 /*
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
71 ** Include Files
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
72 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
73
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
74 #define ENTITY_MFW
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
75
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
76 /* BEGIN ADD: Req ID: : Sumit : 14-Mar-05 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
77 #ifndef NEPTUNE_BOARD
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
78 /* END ADD: Req ID: : Sumit : 14-Mar-05 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
79
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
80 /* includes */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
81 #include <string.h>
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
82
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
83 #include "typedefs.h"
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
84 #include "vsi.h"
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
85 #include "pei.h"
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
86 #include "custom.h"
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
87 #include "gsm.h"
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
88
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
89 #include "mfw_ffs.h"
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
90 #include "mfw_aud.h"
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
91 #include "mfw_fm.h"
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
92 #ifndef FF_NO_VOICE_MEMO
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
93 #include "Audio/audio_api.h"
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
94 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
95
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
96 // Mar 03, 2005 REF: CRR MMI-ENH-28950 xnkulkar
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
97 #include "hl_audio_drv.h"
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
98
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
99 //x0pleela 06 Jul, 2006 DR: OMAPS00067709
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
100 //fix from AS team
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
101 #ifdef FF_PCM_VM_VB
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
102 #include "l1audio_cust.h"
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
103 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
104 /*
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
105 ** Local Variable Definitions
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
106 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
107
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
108 #ifndef FF_NO_VOICE_MEMO
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
109 static T_RV_RETURN_PATH voice_memo_return_path;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
110
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
111
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
112 /*
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
113 ** Local Macro Definitions
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
114 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
115
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
116 #define VM_FILE_NAME "vmfile" // FFS File Name
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
117 #define VM_FOLDER "/mmi/vm"
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
118
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
119 //x0pleela 24 Feb, 2006 ER OMAPS00067709
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
120 #ifdef FF_PCM_VM_VB
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
121 #define PCM_VM_FILE_NAME "pcmvm" // FFS PCM voice memo File Name
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
122 #define PCM_VM_FOLDER "/mmi/pcmvm" //PCM oice memo folder
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
123
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
124 //x0pleela 09 Mar, 2006 ER OMAPS00067709
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
125 #define VOICE_BUFF_FILE_NAME "vbfile" // FFS Voice buffering File Name
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
126 #define VOICE_BUFF_FOLDER "/mmi/vb" //Voice buffering folder
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
127
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
128 //x0pleela 01 Mar, 2006 ER OMAPS00067709
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
129 //Microphone and network gain for PCM VM and Voice buffering
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
130 #define PCM_VM_MICROPHONE_GAIN (0x20) // Enable recording from microphone
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
131 #define PCM_VM_NETWORK_GAIN (0x20) // Enable recording from network
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
132 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
133
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
134 #define VM_MICROPHONE_GAIN (0x0100) // Default Gain of 1
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
135 #define VM_NETWORK_GAIN (0x0100) // Default Gain of 1
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
136
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
137 #define VM_TONE_DURATION (50)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
138 #define VM_TONE_INTERVAL (50)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
139 #define VM_TONE_AMPLITUDE (-24) // Default Amplitude of -24dB
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
140
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
141 //x0pleela 27 Feb, 2006 ER:OMAPS00067709
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
142 #ifdef FF_PCM_VM_VB
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
143 static T_VOICEMEMO VoiceMemoType; /* Voice memo type*/
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
144
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
145 //x0pleela 09 Mar, 2006 ER OMAPS00067709
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
146 GLOBAL T_voice_buffering voice_buffering_data; /* Voice buffering data */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
147 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
148
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
149
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
150 /*
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
151 ** Local Function Prototypes
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
152 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
153
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
154 static void mfw_aud_vm_create_file(const char *folder, const char *fname, UBYTE index);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
155 static void configure_callback_fn(void (*callback_fn)(void *));
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
156 #ifdef FF_MMI_FILEMANAGER
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
157 static void configure_vm_filename(UINT16 *vm_filename, const char *folder, const char *fname, UBYTE index);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
158 #else
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
159 static void configure_vm_filename(char *vm_filename, const char *folder, const char *fname, UBYTE index);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
160 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
161
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
162 /*
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
163 ** Public function Definitions
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
164 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
165
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
166 #ifdef FF_PCM_VM_VB
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
167 /*
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
168 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
169 | PROJECT: MMI-Framework (8417) MODULE: MFW_AUD |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
170 | STATE : code ROUTINE: set_voice_memo_type |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
171 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
172
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
173 PURPOSE : Function to set the type of voice memo
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
174 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
175 //x0pleela 09 Mar, 2006 ER:OMAPS00067709
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
176
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
177 void set_voice_memo_type( T_VOICEMEMO voice_memo_type)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
178 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
179 TRACE_FUNCTION("set_voice_memo_type()");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
180 VoiceMemoType = voice_memo_type;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
181 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
182
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
183 /*
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
184 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
185 | PROJECT: MMI-Framework (8417) MODULE: MFW_AUD |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
186 | STATE : code ROUTINE: get_voice_memo_type |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
187 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
188
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
189 PURPOSE : Function to get the type of voice memo
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
190 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
191 //x0pleela 08 Mar, 2006 ER:OMAPS00067709
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
192
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
193 GLOBAL T_VOICEMEMO get_voice_memo_type( void)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
194 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
195 TRACE_FUNCTION("get_voice_memo_type()");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
196 return VoiceMemoType;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
197 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
198
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
199 /*
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
200 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
201 | PROJECT: MMI-Framework (8417) MODULE: MFW_AUD |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
202 | STATE : code ROUTINE: set_voice_buffering_rec_stop_reason |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
203 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
204
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
205 PURPOSE : Function to set the reason to call record stop
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
206 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
207 //x0pleela 07 Mar, 2006 ER:OMAPS00067709
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
208 GLOBAL void set_voice_buffering_rec_stop_reason( T_VOICE_BUFFERING_STATUS reason)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
209 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
210 TRACE_FUNCTION("set_voice_memo_type()");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
211 voice_buffering_data.rec_stop_reason = reason;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
212 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
213 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
214
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
215 /*
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
216 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
217 | PROJECT: MMI-Framework (8417) MODULE: MFW_AUD |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
218 | STATE : code ROUTINE: mfw_aud_vm_delete_file |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
219 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
220
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
221
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
222 PURPOSE : Delete the file which held the Voice Memo
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
223
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
224 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
225 SHORT mfw_aud_vm_delete_file(void)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
226 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
227 #ifdef FF_MMI_FILEMANAGER
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
228 UINT16 tmpFile[AUDIO_PATH_NAME_MAX_SIZE];
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
229 char path[AUDIO_PATH_NAME_MAX_SIZE];
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
230 #else
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
231 char tmpFile[AUDIO_PATH_NAME_MAX_SIZE];
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
232 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
233
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
234 TRACE_FUNCTION("mfw_aud_vm_delete_file");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
235 memset(tmpFile, 0x00, AUDIO_PATH_NAME_MAX_SIZE);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
236 #ifdef FF_PCM_VM_VB
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
237 //x0pleela 06 Mar, 2006 ER:OMAPS00067709
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
238 //deleting PCM Voice memo file
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
239 if( get_voice_memo_type() EQ PCM_VOICE_MEMO)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
240 #ifdef FF_MMI_FILEMANAGER
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
241 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
242 switch(FFS_flashData.PCM_voicememo_storage)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
243 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
244 case SNAP_STG_FFS:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
245 strcpy(path, "/FFS");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
246 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
247
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
248 case SNAP_STG_NORMS:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
249 strcpy(path, "/NOR");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
250 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
251
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
252 case SNAP_STG_NAND:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
253 strcpy(path, "/NAND");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
254 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
255
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
256 case SNAP_STG_MMC:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
257 strcpy(path, "/MMC");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
258 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
259 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
260
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
261 strcat(path, PCM_VM_FOLDER);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
262 configure_vm_filename(tmpFile, path, PCM_VM_FILE_NAME, 0);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
263 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
264 #else
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
265 configure_vm_filename(tmpFile, PCM_VM_FOLDER, PCM_VM_FILE_NAME, 0);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
266 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
267 else
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
268 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
269 if (get_voice_memo_type() EQ AMR_VOICE_MEMO)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
270 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
271 #ifdef FF_MMI_FILEMANAGER
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
272 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
273 switch(FFS_flashData.voicememo_storage)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
274 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
275 case SNAP_STG_FFS:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
276 strcpy(path, "/FFS");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
277 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
278
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
279 case SNAP_STG_NORMS:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
280 strcpy(path, "/NOR");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
281 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
282
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
283 case SNAP_STG_NAND:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
284 strcpy(path, "/NAND");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
285 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
286
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
287 case SNAP_STG_MMC:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
288 strcpy(path, "/MMC");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
289 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
290 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
291
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
292 strcat(path, VM_FOLDER);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
293 configure_vm_filename(tmpFile, path, VM_FILE_NAME, 0);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
294 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
295 #else
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
296 configure_vm_filename(tmpFile, VM_FOLDER, VM_FILE_NAME, 0);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
297 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
298
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
299 #ifdef FF_PCM_VM_VB
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
300 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
301 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
302 #ifdef FF_MMI_FILEMANAGER
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
303 rfs_remove(tmpFile);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
304 #else
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
305 ffs_remove(tmpFile);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
306 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
307
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
308 return MFW_AUD_VM_OK;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
309 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
310
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
311
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
312 /*
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
313 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
314 | PROJECT: MMI-Framework (8417) MODULE: MFW_AUD |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
315 | STATE : code ROUTINE: mfw_aud_vm_start_playback |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
316 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
317
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
318
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
319 PURPOSE : Start playback of a previously recorded Voice Memo
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
320
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
321 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
322 SHORT mfw_aud_vm_start_playback(void (*callback_fn)(void *))
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
323 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
324 T_AUDIO_RET audio_riv_retVal=AUDIO_ERROR;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
325 T_AUDIO_VM_PLAY_PARAMETER mfw_vm_play_param;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
326
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
327 #ifdef FF_MMI_FILEMANAGER
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
328 char path[AUDIO_PATH_NAME_MAX_SIZE];
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
329 T_RFS_STAT fstat; /* Mar 28, 2007 DR: OMAPS00122762 x0039928 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
330 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
331 //x0pleela 01 Mar, 2006 ER:OMAPS00067709
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
332 #ifdef FF_PCM_VM_VB
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
333 T_AUDIO_VM_PCM_PLAY_PARAMETER mfw_vm_pcm_play_param; /* Defined new variable for pcm VM */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
334 T_AUDIO_VBUF_PCM_PLAY_PARAMETER mfw_vbuf_pcm_play_param; /* Defined new variable for voice buffering*/
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
335 UBYTE vm_type; /*to store voice memo type */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
336 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
337
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
338 TRACE_FUNCTION("mfw_aud_vm_start_playback");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
339 #ifndef FF_MMI_FILEMANAGER /* Mar 28, 2007 DR: OMAPS00122762 x0039928*/
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
340 #ifdef FF_PCM_VM_VB
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
341 //x0pleela 23 Mar, 2006 ER:OMAPS00067709
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
342 switch( get_voice_memo_type() )
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
343 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
344 case AMR_VOICE_MEMO:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
345 #endif /* FF_PCM_VM_VB */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
346 if (FFS_flashData.voice_memo_position EQ 0)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
347 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
348 return MFW_AUD_VM_MEM_EMPTY;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
349 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
350 #ifdef FF_PCM_VM_VB
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
351 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
352
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
353 case PCM_VOICE_MEMO:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
354 if (FFS_flashData.pcm_voice_memo_position EQ 0)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
355 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
356 return MFW_AUD_VM_MEM_EMPTY;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
357 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
358 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
359 default:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
360 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
361 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
362 #endif /* FF_PCM_VM_VB */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
363 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
364
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
365 //x0pleela 27 Feb, 2006 ER:OMAPS00067709
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
366 //Set up the PCM Voice Memo filename in FFS
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
367 #ifdef FF_PCM_VM_VB
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
368 //get the voice memo type
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
369 vm_type = get_voice_memo_type();
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
370 if( vm_type EQ PCM_VOICE_MEMO )
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
371 #ifdef FF_MMI_FILEMANAGER
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
372 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
373 switch(FFS_flashData.PCM_voicememo_storage)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
374 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
375 case SNAP_STG_FFS:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
376 strcpy(path, "/FFS");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
377 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
378
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
379 case SNAP_STG_NORMS:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
380 strcpy(path, "/NOR");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
381 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
382
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
383 case SNAP_STG_NAND:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
384 strcpy(path, "/NAND");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
385 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
386
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
387 case SNAP_STG_MMC:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
388 strcpy(path, "/MMC");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
389 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
390 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
391
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
392 strcat(path, PCM_VM_FOLDER);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
393 configure_vm_filename(mfw_vm_pcm_play_param.memo_name, path, PCM_VM_FILE_NAME, 0);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
394 /* Mar 28, 2007 DR: OMAPS00122762 x0039928 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
395 /* Fix: File empty is returned if the file desnot exist */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
396 #ifdef FF_MMI_FILEMANAGER
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
397 if(rfs_stat(mfw_vm_pcm_play_param.memo_name,&fstat) != RFS_EOK)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
398 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
399 return MFW_AUD_VM_MEM_EMPTY;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
400 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
401 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
402 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
403 #else
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
404 configure_vm_filename(mfw_vm_pcm_play_param.memo_name, PCM_VM_FOLDER, PCM_VM_FILE_NAME, 0);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
405 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
406 //x0pleela 09 Mar, 2006 ER:OMAPS00067709
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
407 //Set up the Voice buffering filename in FFS
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
408 else if (vm_type EQ VOICE_BUFFERING )
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
409 #ifdef FF_MMI_FILEMANAGER
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
410 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
411 switch(FFS_flashData.voicebuffer_storage)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
412 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
413 case SNAP_STG_FFS:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
414 strcpy(path, "/FFS");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
415 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
416
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
417 case SNAP_STG_NORMS:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
418 strcpy(path, "/NOR");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
419 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
420
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
421 case SNAP_STG_NAND:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
422 strcpy(path, "/NAND");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
423 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
424
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
425 case SNAP_STG_MMC:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
426 strcpy(path, "/MMC");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
427 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
428 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
429
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
430 strcat(path, VOICE_BUFF_FOLDER);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
431 configure_vm_filename(mfw_vbuf_pcm_play_param.memo_name, path, VOICE_BUFF_FILE_NAME, 0);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
432 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
433 #else
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
434 configure_vm_filename(mfw_vbuf_pcm_play_param.memo_name, VOICE_BUFF_FOLDER, VOICE_BUFF_FILE_NAME, 0);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
435 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
436 else
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
437 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
438 if (vm_type EQ AMR_VOICE_MEMO)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
439 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
440 #ifdef FF_MMI_FILEMANAGER
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
441 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
442 switch(FFS_flashData.voicememo_storage)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
443 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
444 case SNAP_STG_FFS:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
445 strcpy(path, "/FFS");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
446 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
447
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
448 case SNAP_STG_NORMS:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
449 strcpy(path, "/NOR");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
450 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
451
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
452 case SNAP_STG_NAND:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
453 strcpy(path, "/NAND");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
454 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
455
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
456 case SNAP_STG_MMC:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
457 strcpy(path, "/MMC");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
458 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
459 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
460
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
461 strcat(path, VM_FOLDER);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
462 configure_vm_filename(mfw_vm_play_param.memo_name, path, VM_FILE_NAME, 0);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
463 /* Mar 28, 2007 DR: OMAPS00122762 x0039928 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
464 /* Fix: File empty is returned if the file desnot exist */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
465 #ifdef FF_MMI_FILEMANAGER
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
466 if(rfs_stat(mfw_vm_play_param.memo_name,&fstat) != RFS_EOK)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
467 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
468 return MFW_AUD_VM_MEM_EMPTY;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
469 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
470 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
471 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
472 #else
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
473 //Set up the Voice Memo filename in FFS
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
474 configure_vm_filename(mfw_vm_play_param.memo_name, VM_FOLDER, VM_FILE_NAME, 0);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
475 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
476 #ifdef FF_PCM_VM_VB
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
477 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
478 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
479 // Call Riviera function to start playback.
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
480 #ifndef WIN32 // only if not in Windows
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
481 //x0pleela 27 Feb, 2006 ER:OMAPS00067709
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
482
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
483 configure_callback_fn(callback_fn);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
484 #ifdef FF_PCM_VM_VB
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
485 //x0pleela 06 Mar, 2006 ER:OMAPS00067709
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
486 if( vm_type EQ PCM_VOICE_MEMO )
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
487 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
488 //update mfw_vm_pcm_play_param
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
489 mfw_vm_pcm_play_param.memo_duration = mfw_aud_vm_get_duration();
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
490 mfw_vm_pcm_play_param.speaker_gain = PCM_VM_MICROPHONE_GAIN;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
491 mfw_vm_pcm_play_param.network_gain= 0;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
492
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
493 //Start playing PCM Voice memo
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
494 audio_riv_retVal = audio_vm_pcm_play_start(&mfw_vm_pcm_play_param,
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
495 voice_memo_return_path);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
496 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
497 else if ( vm_type EQ VOICE_BUFFERING )
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
498 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
499 //update mfw_vbuf_pcm_play_param
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
500 mfw_vbuf_pcm_play_param.memo_duration = PCM_VOICE_MEMO_MAX_DURATION;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
501 mfw_vbuf_pcm_play_param.speaker_gain = 0;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
502 mfw_vbuf_pcm_play_param.network_gain= PCM_VM_NETWORK_GAIN;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
503
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
504 //x0pleela 06 Jul, 2006 DR: OMAPS00067709
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
505 //Fix from AS team
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
506 vocoder_mute_ul(1);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
507
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
508 //Set up the Voice buffering filename in FFS
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
509 audio_riv_retVal = audio_voice_buffering_pcm_play_start (&mfw_vbuf_pcm_play_param,
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
510 voice_memo_return_path);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
511 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
512 else
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
513 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
514 if (vm_type EQ AMR_VOICE_MEMO)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
515 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
516 audio_riv_retVal = audio_vm_play_start(&mfw_vm_play_param,
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
517 voice_memo_return_path);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
518 #ifdef FF_PCM_VM_VB
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
519 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
520 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
521 // If the Riviera call failed
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
522 if (audio_riv_retVal != RV_OK)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
523 return MFW_AUD_VM_RIVIERA_FAILED;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
524 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
525 return MFW_AUD_VM_OK;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
526 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
527
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
528
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
529 /*
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
530 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
531 | PROJECT: MMI-Framework (8417) MODULE: MFW_AUD |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
532 | STATE : code ROUTINE: mfw_aud_vm_stop_playback |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
533 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
534
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
535
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
536 PURPOSE : Stop playback of a previously recorded Voice Memo
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
537
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
538 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
539 SHORT mfw_aud_vm_stop_playback(void (*callback_fn)(void *))
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
540 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
541 T_AUDIO_RET audio_riv_retVal=AUDIO_ERROR;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
542 //x0pleela 06 Mar, 2006 ER:OMAPS00067709
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
543 #ifdef FF_PCM_VM_VB
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
544 UBYTE vm_type; //to store voice memo type
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
545 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
546
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
547 TRACE_FUNCTION("mfw_aud_vm_stop_playback");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
548 configure_callback_fn(callback_fn);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
549
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
550 #ifndef WIN32 // only if not in Windows
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
551 #ifdef FF_PCM_VM_VB
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
552 //x0pleela 06 Mar, 2006 ER:OMAPS00067709
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
553 //get the voice memo type
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
554 vm_type = get_voice_memo_type();
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
555
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
556 //x0pleela 27 Feb, 2006 ER:OMAPS00067709
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
557 //Stop playing PCM Voice memo
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
558 if( vm_type EQ PCM_VOICE_MEMO )
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
559 audio_riv_retVal = audio_vm_pcm_play_stop(voice_memo_return_path);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
560 //Stop playing
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
561 else if ( vm_type EQ VOICE_BUFFERING )
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
562 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
563 audio_riv_retVal = audio_voice_buffering_pcm_play_stop (voice_memo_return_path);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
564 //x0pleela 06 Jul, 2006 DR: OMAPS00067709
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
565 //Fix from AS team
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
566 vocoder_mute_ul(0);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
567 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
568 else
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
569 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
570 if (vm_type EQ AMR_VOICE_MEMO)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
571 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
572 audio_riv_retVal = audio_vm_play_stop(voice_memo_return_path);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
573 #ifdef FF_PCM_VM_VB
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
574 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
575 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
576 // If the Riviera call failed
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
577 if (audio_riv_retVal != RV_OK)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
578 return MFW_AUD_VM_RIVIERA_FAILED;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
579
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
580 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
581
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
582 return MFW_AUD_VM_OK;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
583 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
584
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
585
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
586 #ifdef FF_MMI_FILEMANAGER
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
587 void path_init(UBYTE vmtype)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
588 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
589 T_RFS_RET ffsResult;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
590 T_RFS_DIR f_dir, f_dir1;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
591 char dir_path[FM_MAX_DIR_PATH_LENGTH];
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
592 UINT16 dir_path_uc[FM_MAX_DIR_PATH_LENGTH];
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
593
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
594 memset(dir_path, 0, FM_MAX_DIR_PATH_LENGTH);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
595 switch(vmtype)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
596 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
597 case AMR_VOICE_MEMO:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
598 switch(FFS_flashData.voicememo_storage)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
599 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
600 case SNAP_STG_FFS:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
601 strcpy(dir_path, "/FFS/mmi");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
602 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
603
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
604 case SNAP_STG_NORMS:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
605 strcpy(dir_path, "/NOR/mmi");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
606 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
607
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
608 case SNAP_STG_NAND:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
609 strcpy(dir_path, "/NAND/mmi");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
610 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
611
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
612 case SNAP_STG_MMC:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
613 strcpy(dir_path, "/MMC/mmi");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
614 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
615 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
616 convert_u8_to_unicode(dir_path, dir_path_uc);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
617 ffsResult = rfs_opendir(dir_path_uc,&f_dir);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
618 TRACE_EVENT_P2("Opendir - ffsResult %d Dir path %s", ffsResult,dir_path);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
619
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
620 if(RFS_ENOENT == ffsResult)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
621 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
622 ffsResult = rfs_mkdir(dir_path_uc, RFS_IRWXU);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
623 TRACE_EVENT_P2("Makedir - ffsResult %d Dir path %s", ffsResult,dir_path);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
624 if(ffsResult == 0)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
625 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
626 strcat(dir_path, "/vm");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
627 convert_u8_to_unicode(dir_path, dir_path_uc);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
628 ffsResult = rfs_mkdir(dir_path_uc, RFS_IRWXU);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
629 TRACE_EVENT_P2("Makedir - ffsResult %d Dir path %s", ffsResult,dir_path);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
630 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
631 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
632 else if(ffsResult > 0)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
633 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
634 strcat(dir_path, "/vm");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
635 convert_u8_to_unicode(dir_path, dir_path_uc);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
636 ffsResult = rfs_opendir(dir_path_uc,&f_dir1);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
637 TRACE_EVENT_P2("Opendir - ffsResult %d Dir path %s", ffsResult,dir_path);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
638
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
639 if(RFS_ENOENT == ffsResult)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
640 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
641 ffsResult = rfs_mkdir(dir_path_uc, RFS_IRWXU);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
642 TRACE_EVENT_P2("Makedir - ffsResult %d Dir path %s", ffsResult,dir_path);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
643 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
644 else if (ffsResult > 0)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
645 rfs_closedir(&f_dir1);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
646
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
647 rfs_closedir(&f_dir);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
648 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
649 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
650
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
651 case PCM_VOICE_MEMO:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
652 switch(FFS_flashData.PCM_voicememo_storage)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
653 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
654 case SNAP_STG_FFS:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
655 strcpy(dir_path, "/FFS/mmi");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
656 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
657
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
658 case SNAP_STG_NORMS:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
659 strcpy(dir_path, "/NOR/mmi");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
660 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
661
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
662 case SNAP_STG_NAND:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
663 strcpy(dir_path, "/NAND/mmi");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
664 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
665
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
666 case SNAP_STG_MMC:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
667 strcpy(dir_path, "/MMC/mmi");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
668 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
669 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
670 convert_u8_to_unicode(dir_path, dir_path_uc);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
671 ffsResult = rfs_opendir(dir_path_uc,&f_dir);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
672 TRACE_EVENT_P2("Opendir - ffsResult %d Dir path %s", ffsResult,dir_path);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
673
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
674 if(RFS_ENOENT == ffsResult)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
675 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
676 ffsResult = rfs_mkdir(dir_path_uc, RFS_IRWXU);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
677 TRACE_EVENT_P2("Makedir - ffsResult %d Dir path %s", ffsResult,dir_path);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
678 if(ffsResult == 0)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
679 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
680 strcat(dir_path, "/pcmvm");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
681 convert_u8_to_unicode(dir_path, dir_path_uc);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
682 ffsResult = rfs_opendir(dir_path_uc,&f_dir1);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
683 TRACE_EVENT_P2("Opendir - ffsResult %d Dir path %s", ffsResult,dir_path);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
684
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
685 if(RFS_ENOENT == ffsResult)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
686 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
687 ffsResult = rfs_mkdir(dir_path_uc, RFS_IRWXU);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
688 TRACE_EVENT_P2("Makedir - ffsResult %d Dir path %s", ffsResult,dir_path);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
689 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
690 else if (ffsResult > 0)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
691 rfs_closedir(&f_dir1);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
692
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
693 rfs_closedir(&f_dir);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
694 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
695
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
696 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
697 else if(ffsResult > 0)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
698 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
699 strcat(dir_path, "/pcmvm");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
700 convert_u8_to_unicode(dir_path, dir_path_uc);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
701 ffsResult = rfs_opendir(dir_path_uc,&f_dir1);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
702 TRACE_EVENT_P2("Opendir - ffsResult %d Dir path %s", ffsResult,dir_path);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
703
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
704 if(RFS_ENOENT == ffsResult)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
705 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
706 ffsResult = rfs_mkdir(dir_path_uc, RFS_IRWXU);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
707 TRACE_EVENT_P2("Makedir - ffsResult %d Dir path %s", ffsResult,dir_path);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
708 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
709 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
710
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
711 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
712
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
713 case VOICE_BUFFERING:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
714 switch(FFS_flashData.voicebuffer_storage)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
715 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
716 case SNAP_STG_FFS:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
717 strcpy(dir_path, "/FFS/mmi");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
718 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
719
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
720 case SNAP_STG_NORMS:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
721 strcpy(dir_path, "/NOR/mmi");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
722 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
723
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
724 case SNAP_STG_NAND:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
725 strcpy(dir_path, "/NAND/mmi");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
726 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
727
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
728 case SNAP_STG_MMC:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
729 strcpy(dir_path, "/MMC/mmi");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
730 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
731 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
732 convert_u8_to_unicode(dir_path, dir_path_uc);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
733 ffsResult = rfs_opendir(dir_path_uc,&f_dir);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
734 TRACE_EVENT_P2("Opendir - ffsResult %d Dir path %s", ffsResult,dir_path);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
735
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
736 if(RFS_ENOENT == ffsResult)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
737 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
738 ffsResult = rfs_mkdir(dir_path_uc, RFS_IRWXU);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
739 TRACE_EVENT_P2("Makedir - ffsResult %d Dir path %s", ffsResult,dir_path);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
740
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
741 if(ffsResult == 0)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
742 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
743 strcat(dir_path, "/vb");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
744 convert_u8_to_unicode(dir_path, dir_path_uc);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
745 ffsResult = rfs_opendir(dir_path_uc,&f_dir1);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
746 TRACE_EVENT_P2("Opendir - ffsResult %d Dir path %s", ffsResult,dir_path);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
747
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
748 if(RFS_ENOENT == ffsResult)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
749 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
750 ffsResult = rfs_mkdir(dir_path_uc, RFS_IRWXU);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
751 TRACE_EVENT_P2("Makedir - ffsResult %d Dir path %s", ffsResult,dir_path);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
752 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
753 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
754 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
755 else if(ffsResult > 0)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
756 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
757 strcat(dir_path, "/vb");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
758 convert_u8_to_unicode(dir_path, dir_path_uc);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
759 ffsResult = rfs_opendir(dir_path_uc,&f_dir1);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
760 TRACE_EVENT_P2("Opendir - ffsResult %d Dir path %s", ffsResult,dir_path);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
761
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
762 if(RFS_ENOENT == ffsResult)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
763 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
764 ffsResult = rfs_mkdir(dir_path_uc, RFS_IRWXU);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
765 TRACE_EVENT_P2("Makedir - ffsResult %d Dir path %s", ffsResult,dir_path);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
766 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
767 else if (ffsResult > 0)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
768 rfs_closedir(&f_dir1);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
769
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
770 rfs_closedir(&f_dir);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
771 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
772 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
773 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
774 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
775 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
776
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
777 /*
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
778 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
779 | PROJECT: MMI-Framework (8417) MODULE: MFW_AUD |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
780 | STATE : code ROUTINE: mfw_aud_vm_start_record |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
781 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
782
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
783
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
784 PURPOSE : Configure Riviera and start recording a Voice Memo
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
785
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
786 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
787 SHORT mfw_aud_vm_start_record(UBYTE max_duration, void (*callback_fn)(void *))
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
788 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
789 T_AUDIO_RET audio_riv_retVal=AUDIO_ERROR;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
790 T_AUDIO_VM_RECORD_PARAMETER mfw_vm_record_param;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
791 T_AUDIO_TONES_PARAMETER mfw_vm_tones_param;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
792
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
793 #ifdef FF_MMI_FILEMANAGER
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
794 char path[FM_MAX_DIR_PATH_LENGTH];
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
795 #else
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
796 char * mmiDir = "/mmi"; // Aug 25, 2004 REF: CRR 20655 xnkulkar
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
797 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
798
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
799 //x0pleela 27 Feb, 2006 ER:OMAPS00067709
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
800 //defining new variable for PCM recording
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
801 #ifdef FF_PCM_VM_VB
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
802 T_AUDIO_VM_PCM_RECORD_PARAMETER mfw_vm_pcm_record_param;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
803 T_AUDIO_VBUF_PCM_RECORD_PARAMETER mfw_vbuf_pcm_record_param;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
804 UBYTE vm_type; //to store voice memo type
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
805 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
806 TRACE_FUNCTION("mfw_aud_vm_start_record");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
807 configure_callback_fn(callback_fn);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
808
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
809 memset(path, 0, FM_MAX_DIR_PATH_LENGTH);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
810 //x0pleela 27 Feb, 2006 ER:OMAPS00067709
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
811 #ifdef FF_PCM_VM_VB
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
812 //x0pleela 06 Mar, 2006 ER:OMAPS00067709
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
813 //get the voice memo type
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
814 vm_type = get_voice_memo_type();
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
815
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
816 // We now create the "mmi" folder and then proceed with recording.
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
817 #ifdef FF_MMI_FILEMANAGER
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
818 path_init(vm_type);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
819 #else
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
820 flash_makedir(mmiDir);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
821 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
822
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
823 if( vm_type EQ PCM_VOICE_MEMO )
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
824 #ifdef FF_MMI_FILEMANAGER
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
825 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
826 switch(FFS_flashData.PCM_voicememo_storage)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
827 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
828 case SNAP_STG_FFS:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
829 strcpy(path, "/FFS");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
830 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
831
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
832 case SNAP_STG_NORMS:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
833 strcpy(path, "/NOR");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
834 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
835
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
836 case SNAP_STG_NAND:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
837 strcpy(path, "/NAND");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
838 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
839
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
840 case SNAP_STG_MMC:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
841 strcpy(path, "/MMC");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
842 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
843 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
844 strcat(path, PCM_VM_FOLDER);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
845 configure_vm_filename(mfw_vm_pcm_record_param.memo_name, path, PCM_VM_FILE_NAME, 0);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
846 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
847 #else
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
848 //Set up, and create, the PCM Voice Memo filename in FFS
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
849 configure_vm_filename(mfw_vm_pcm_record_param.memo_name, PCM_VM_FOLDER, PCM_VM_FILE_NAME, 0);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
850 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
851 //x0pleela 09 Mar, 2006 ER:OMAPS00067709
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
852 else if( vm_type EQ VOICE_BUFFERING)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
853 #ifdef FF_MMI_FILEMANAGER
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
854 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
855 switch(FFS_flashData.voicebuffer_storage)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
856 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
857 case SNAP_STG_FFS:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
858 strcpy(path, "/FFS");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
859 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
860
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
861 case SNAP_STG_NORMS:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
862 strcpy(path, "/NOR");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
863 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
864
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
865 case SNAP_STG_NAND:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
866 strcpy(path, "/NAND");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
867 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
868
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
869 case SNAP_STG_MMC:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
870 strcpy(path, "/MMC");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
871 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
872 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
873
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
874 strcat(path, VOICE_BUFF_FOLDER);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
875 configure_vm_filename(mfw_vbuf_pcm_record_param.memo_name, path, VOICE_BUFF_FILE_NAME, 0);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
876 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
877 #else
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
878 //Set up, and create, the Voice Buffering filename in FFS
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
879 configure_vm_filename(mfw_vbuf_pcm_record_param.memo_name, VOICE_BUFF_FOLDER, VOICE_BUFF_FILE_NAME, 0);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
880 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
881 else
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
882 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
883 if (vm_type EQ AMR_VOICE_MEMO)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
884 #endif /* FF_PCM_VM_VB */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
885 #ifdef FF_MMI_FILEMANAGER
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
886 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
887 switch(FFS_flashData.voicememo_storage)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
888 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
889 case SNAP_STG_FFS:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
890 strcpy(path, "/FFS");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
891 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
892
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
893 case SNAP_STG_NORMS:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
894 strcpy(path, "/NOR");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
895 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
896
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
897 case SNAP_STG_NAND:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
898 strcpy(path, "/NAND");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
899 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
900
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
901 case SNAP_STG_MMC:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
902 strcpy(path, "/MMC");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
903 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
904 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
905
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
906 strcat(path, VM_FOLDER);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
907 configure_vm_filename(mfw_vm_record_param.memo_name, path, VM_FILE_NAME, 0);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
908 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
909 #else
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
910 //Set up, and create, the Voice Memo filename in FFS
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
911 configure_vm_filename(mfw_vm_record_param.memo_name, VM_FOLDER, VM_FILE_NAME, 0);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
912 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
913 #ifdef FF_PCM_VM_VB
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
914 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
915 #endif /* FF_PCM_VM_VB */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
916 //Aug 25, 2004 REF: CRR 20655 xnkulkar
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
917
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
918
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
919 //x0pleela 27 Feb, 2006 ER:OMAPS00067709
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
920 #ifdef FF_PCM_VM_VB
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
921 if( vm_type EQ PCM_VOICE_MEMO )
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
922 //create PCM Voice memo file
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
923 #ifdef FF_MMI_FILEMANAGER
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
924 mfw_aud_vm_create_file(path, PCM_VM_FILE_NAME, 0);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
925 #else
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
926 mfw_aud_vm_create_file(PCM_VM_FOLDER, PCM_VM_FILE_NAME, 0);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
927 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
928 //x0pleela 09 Mar, 2006 ER:OMAPS00067709
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
929 else if( vm_type EQ VOICE_BUFFERING )
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
930 //create Voice Buffering file
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
931 #ifdef FF_MMI_FILEMANAGER
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
932 mfw_aud_vm_create_file(path, VOICE_BUFF_FILE_NAME, 0);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
933 #else
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
934 mfw_aud_vm_create_file(VOICE_BUFF_FOLDER, VOICE_BUFF_FILE_NAME, 0);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
935 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
936 else
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
937 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
938 if (vm_type EQ AMR_VOICE_MEMO)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
939 #endif /* FF_PCM_VM_VB */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
940 #ifdef FF_MMI_FILEMANAGER
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
941 mfw_aud_vm_create_file(path, VM_FILE_NAME, 0);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
942 #else
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
943 mfw_aud_vm_create_file(VM_FOLDER, VM_FILE_NAME, 0);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
944 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
945 #ifdef FF_PCM_VM_VB
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
946 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
947 #endif /* FF_PCM_VM_VB */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
948
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
949 #ifndef WIN32 // only if not in Windows
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
950 //x0pleela 27 Feb, 2006 ER:OMAPS00067709
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
951 //updating fields of structure T_AUDIO_VM_PCM_RECORD_PARAMETER for PCM VM recording
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
952 #ifdef FF_PCM_VM_VB
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
953 if( vm_type EQ PCM_VOICE_MEMO )
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
954 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
955 mfw_vm_pcm_record_param.memo_duration = (UINT32)max_duration;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
956 mfw_vm_pcm_record_param.microphone_gain = PCM_VM_MICROPHONE_GAIN;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
957 mfw_vm_pcm_record_param.network_gain = 0;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
958
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
959 audio_riv_retVal = audio_vm_pcm_record_start(&mfw_vm_pcm_record_param,
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
960 voice_memo_return_path);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
961 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
962 else if( vm_type EQ VOICE_BUFFERING )
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
963 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
964 mfw_vbuf_pcm_record_param.memo_duration = (UINT32)max_duration;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
965 mfw_vbuf_pcm_record_param.microphone_gain = PCM_VM_MICROPHONE_GAIN;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
966 mfw_vbuf_pcm_record_param.network_gain = 0;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
967
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
968 audio_riv_retVal = audio_voice_buffering_pcm_record_start( &mfw_vbuf_pcm_record_param,
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
969 voice_memo_return_path);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
970 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
971 else
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
972 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
973 if (vm_type EQ AMR_VOICE_MEMO )
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
974 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
975 #endif /* FF_PCM_VM_VB */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
976
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
977 // Setup the Voice Memo Tones
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
978 mfw_vm_record_param.memo_duration = (UINT32)max_duration;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
979 mfw_vm_record_param.compression_mode = FALSE; // No Compression
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
980 mfw_vm_record_param.microphone_gain = VM_MICROPHONE_GAIN;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
981 mfw_vm_record_param.network_gain = VM_NETWORK_GAIN;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
982
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
983 mfw_vm_tones_param.tones[0].start_tone = 0;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
984 mfw_vm_tones_param.tones[0].stop_tone = VM_TONE_DURATION;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
985 mfw_vm_tones_param.tones[0].frequency_tone = 520; // Tone 1 Frequecny in Hz
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
986 mfw_vm_tones_param.tones[0].amplitude_tone = VM_TONE_AMPLITUDE;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
987
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
988 mfw_vm_tones_param.tones[1].start_tone = mfw_vm_tones_param.tones[0].stop_tone + VM_TONE_INTERVAL;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
989 mfw_vm_tones_param.tones[1].stop_tone = mfw_vm_tones_param.tones[1].start_tone + VM_TONE_DURATION;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
990 mfw_vm_tones_param.tones[1].frequency_tone = 643; // Tone 2 Frequecny in Hz
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
991 mfw_vm_tones_param.tones[1].amplitude_tone = VM_TONE_AMPLITUDE;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
992
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
993 mfw_vm_tones_param.tones[2].start_tone = mfw_vm_tones_param.tones[1].stop_tone + VM_TONE_INTERVAL;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
994 mfw_vm_tones_param.tones[2].stop_tone = mfw_vm_tones_param.tones[2].start_tone + VM_TONE_DURATION;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
995 mfw_vm_tones_param.tones[2].frequency_tone = 775; // Tone 3 Frequecny in Hz
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
996 mfw_vm_tones_param.tones[2].amplitude_tone = VM_TONE_AMPLITUDE;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
997
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
998 mfw_vm_tones_param.frame_duration = mfw_vm_tones_param.tones[2].stop_tone * 2;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
999 mfw_vm_tones_param.sequence_duration = mfw_vm_tones_param.frame_duration * 2;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1000 mfw_vm_tones_param.period_duration = mfw_vm_tones_param.sequence_duration;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1001 mfw_vm_tones_param.repetition = TONE_INFINITE;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1002 // Call Riviera function to start recording.
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1003 // If the Riviera call failed
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1004 audio_riv_retVal = audio_vm_record_start(&mfw_vm_record_param,
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1005 &mfw_vm_tones_param,
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1006 voice_memo_return_path);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1007 #ifdef FF_PCM_VM_VB
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1008 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1009 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1010 #endif /* FF_PCM_VM_VB */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1011 if (audio_riv_retVal != RV_OK)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1012 return MFW_AUD_VM_RIVIERA_FAILED;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1013
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1014 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1015
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1016 return MFW_AUD_VM_OK;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1017 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1018
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1019
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1020 /*
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1021 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1022 | PROJECT: MMI-Framework (8417) MODULE: MFW_AUD |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1023 | STATE : code ROUTINE: mfw_aud_vm_stop_record |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1024 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1025
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1026
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1027 PURPOSE : Stop recording a Voice Memo
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1028
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1029 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1030 SHORT mfw_aud_vm_stop_record(void (*callback_fn)(void *))
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1031 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1032 T_AUDIO_RET audio_riv_retVal=AUDIO_ERROR;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1033
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1034 //x0pleela 06 Mar, 2006 ER:OMAPS00067709
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1035 #ifdef FF_PCM_VM_VB
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1036 UBYTE vm_type; //to store voice memo type
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1037 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1038 TRACE_FUNCTION("mfw_aud_vm_stop_record");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1039 configure_callback_fn(callback_fn);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1040
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1041 #ifndef WIN32 // only if not in Windows
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1042 //x0pleela 27 Feb, 2006 ER:OMAPS00067709
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1043 #ifdef FF_PCM_VM_VB
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1044 //x0pleela 06 Mar, 2006 ER:OMAPS00067709
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1045 //get the voice memo type
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1046 vm_type = get_voice_memo_type();
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1047
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1048 if( vm_type EQ PCM_VOICE_MEMO )
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1049 audio_riv_retVal = audio_vm_pcm_record_stop (voice_memo_return_path);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1050 //x0pleela 09 Mar, 2006 ER:OMAPS00067709
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1051 else if( vm_type EQ VOICE_BUFFERING)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1052 audio_riv_retVal = audio_voice_buffering_pcm_record_stop (voice_memo_return_path);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1053 else
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1054 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1055 if (vm_type EQ AMR_VOICE_MEMO)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1056 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1057 audio_riv_retVal = audio_vm_record_stop(voice_memo_return_path);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1058 #ifdef FF_PCM_VM_VB
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1059 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1060 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1061 // If the Riviera call failed
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1062 if (audio_riv_retVal != RV_OK)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1063 return MFW_AUD_VM_RIVIERA_FAILED;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1064 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1065
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1066 return MFW_AUD_VM_OK;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1067 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1068
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1069
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1070 /*
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1071 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1072 | PROJECT: MMI-Framework (8417) MODULE: MFW_AUD |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1073 | STATE : code ROUTINE: mfw_aud_vm_get_duration |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1074 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1075
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1076
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1077 PURPOSE : Get the duration of the previously recorded Voice Memo
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1078
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1079 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1080 UBYTE mfw_aud_vm_get_duration(void)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1081 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1082 TRACE_FUNCTION("mfw_aud_vm_get_duration");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1083 //x0pleela 06 Mar, 2006 ER:OMAPS00067709
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1084 #ifdef FF_PCM_VM_VB
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1085 //x0pleela 27 Feb, 2006 ER:OMAPS00067709
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1086 if( get_voice_memo_type() EQ PCM_VOICE_MEMO )
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1087 //get PCM Voice memo recorded duration
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1088 #ifdef FF_MMI_FILEMANAGER
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1089 /* Mar 28, 2007 DR: OMAPS00122762 x0039928 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1090 return FFS_flashData.pcm_voice_memo_position[FFS_flashData.PCM_voicememo_storage];
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1091 #else
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1092 return FFS_flashData.pcm_voice_memo_position;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1093 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1094 else
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1095 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1096 if (get_voice_memo_type() EQ AMR_VOICE_MEMO)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1097 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1098 #ifdef FF_MMI_FILEMANAGER
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1099 /* Mar 28, 2007 DR: OMAPS00122762 x0039928 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1100 return FFS_flashData.voice_memo_position[FFS_flashData.voicememo_storage];
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1101 #else
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1102 return FFS_flashData.voice_memo_position;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1103 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1104 #ifdef FF_PCM_VM_VB
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1105 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1106 return 0;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1107 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1108 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1109
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1110
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1111 /*
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1112 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1113 | PROJECT: MMI-Framework (8417) MODULE: MFW_AUD |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1114 | STATE : code ROUTINE: mfw_aud_vm_get_duration |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1115 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1116
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1117
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1118 PURPOSE : Set the duration of the previously recorded Voice Memo
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1119
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1120 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1121 void mfw_aud_vm_set_duration(UBYTE duration)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1122 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1123 TRACE_FUNCTION("mfw_aud_vm_set_duration");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1124 //x0pleela 06 Mar, 2006 ER:OMAPS00067709
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1125 #ifdef FF_PCM_VM_VB
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1126 if( get_voice_memo_type() EQ PCM_VOICE_MEMO )
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1127 //Set PCM Voice memo recorded duration
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1128 #ifdef FF_MMI_FILEMANAGER
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1129 /* Mar 28, 2007 DR: OMAPS00122762 x0039928 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1130 FFS_flashData.pcm_voice_memo_position[FFS_flashData.PCM_voicememo_storage] = duration;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1131 #else
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1132 FFS_flashData.pcm_voice_memo_position = duration;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1133 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1134 else
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1135 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1136 if ( get_voice_memo_type() EQ AMR_VOICE_MEMO)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1137 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1138 #ifdef FF_MMI_FILEMANAGER
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1139 /* Mar 28, 2007 DR: OMAPS00122762 x0039928 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1140 FFS_flashData.voice_memo_position[FFS_flashData.voicememo_storage] = duration;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1141 #else
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1142 FFS_flashData.voice_memo_position = duration;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1143 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1144 #ifdef FF_PCM_VM_VB
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1145 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1146 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1147
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1148 flash_write();
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1149 return;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1150 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1151
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1152 void rfs_data_write(const char* dir_name, const char* file_name, void* data_pointer, int data_size)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1153 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1154 T_RFS_FD fd;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1155 char file[FM_MAX_DIR_PATH_LENGTH];
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1156 UINT16 file_uc[FM_MAX_DIR_PATH_LENGTH];
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1157 // Need to check if already flash is formatted
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1158
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1159 sprintf(file, "%s/%s", dir_name, file_name);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1160 convert_u8_to_unicode(file, file_uc);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1161 fd = rfs_open(file_uc,
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1162 RFS_O_CREAT | RFS_O_WRONLY | RFS_O_TRUNC | RFS_O_APPEND, 0x777);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1163 rfs_write(fd, data_pointer, data_size);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1164
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1165 rfs_close(fd);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1166 return;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1167 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1168
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1169 /*
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1170 ** Local Function Definitions
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1171 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1172
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1173 /*
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1174 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1175 | PROJECT: MMI-Framework (8417) MODULE: MFW_AUD |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1176 | STATE : code ROUTINE: mfw_aud_vm_create_file |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1177 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1178
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1179
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1180 PURPOSE : Create the FFS file required for the Riviera Voice Memo
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1181
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1182 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1183 static void mfw_aud_vm_create_file(const char *folder, const char *fname, UBYTE index)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1184 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1185
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1186 #ifdef FF_MMI_FILEMANAGER
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1187 UINT16 dummy = 0x00;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1188 rfs_data_write(folder,fname, &dummy,sizeof(dummy));
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1189 #else
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1190 UBYTE dummy = 0x00;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1191 flash_data_write(folder, fname, &dummy, sizeof(dummy));
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1192 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1193 TRACE_FUNCTION("mfw_aud_vm_create_file");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1194 return;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1195 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1196
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1197
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1198 /*
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1199 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1200 | PROJECT: MMI-Framework (8417) MODULE: MFW_AUD |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1201 | STATE : code ROUTINE: configure_callback_fn |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1202 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1203
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1204
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1205 PURPOSE : Configure the Riviera Return PAth
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1206
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1207 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1208 static void configure_callback_fn(void (*callback_fn)(void *))
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1209 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1210 TRACE_FUNCTION("configure_callback_fn");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1211 voice_memo_return_path.addr_id = 0;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1212 voice_memo_return_path.callback_func = callback_fn;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1213
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1214 return;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1215 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1216
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1217
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1218
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1219 /*
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1220 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1221 | PROJECT: MMI-Framework (8417) MODULE: MFW_AUD |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1222 | STATE : code ROUTINE: configure_vm_filename |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1223 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1224
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1225
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1226 PURPOSE : Create the Voice memo filename from the incoming parameters
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1227
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1228 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1229 #ifdef FF_MMI_FILEMANAGER
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1230 static void configure_vm_filename(UINT16 *vm_filename, const char *folder, const char *fname, UBYTE index)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1231 #else
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1232 static void configure_vm_filename(char *vm_filename, const char *folder, const char *fname, UBYTE index)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1233 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1234 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1235 #ifdef FF_MMI_FILEMANAGER
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1236 char vm_filename_ascii[FM_MAX_DIR_PATH_LENGTH];
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1237 // convert_unicode_to_u8(vm_filename, vm_filename_ascii);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1238 // memset(vm_filename_ascii, 0x00, AUDIO_PATH_NAME_MAX_SIZE);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1239 strcpy(vm_filename_ascii, folder);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1240 strcat(vm_filename_ascii, "/");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1241 strcat(vm_filename_ascii, fname);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1242 convert_u8_to_unicode(vm_filename_ascii, vm_filename);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1243 #else
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1244 TRACE_FUNCTION("configure_vm_filename");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1245 memset(vm_filename, 0x00, AUDIO_PATH_NAME_MAX_SIZE);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1246 strcpy(vm_filename, folder);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1247 strcat(vm_filename, "/");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1248 strcat(vm_filename, fname);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1249 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1250 return;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1251 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1252 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1253
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1254 // Mar 03, 2005 REF: CRR MMI-ENH-28950 xnkulkar
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1255 // Commented as we are no more using 'enable_tch_vocoder()' from MFW
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1256 /*
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1257 #ifndef _SIMULATION_
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1258 void enable_tch_vocoder(BOOL enabled);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1259 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1260 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1261
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1262 /**********************************************************************
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1263 **
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1264 ** MFW Riviera Vocoder Interface functions
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1265 **
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1266 **********************************************************************/
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1267
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1268 void mfw_aud_l1_enable_vocoder ( void )
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1269 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1270 #ifndef _SIMULATION_
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1271 // Mar 03, 2005 REF: CRR MMI-ENH-28950 xnkulkar
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1272 // Call 'hl_drv_enable_vocoder()' instead of 'enable_tch_vocoder(TRUE)'
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1273 // enable_tch_vocoder(TRUE);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1274
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1275 // July 03, 2006 REF:DR OMAPS00083150 x0047075
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1276 //Fix:Use hl_drv_set_vocoder_state(TRUE) function instead of hl_drv_enable_vocoder() to enable the vocoder
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1277 hl_drv_set_vocoder_state(TRUE);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1278 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1279 return;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1280 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1281
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1282 void mfw_aud_l1_disable_vocoder ( void )
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1283 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1284 #ifndef _SIMULATION_
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1285 // Mar 03, 2005 REF: CRR MMI-ENH-28950 xnkulkar
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1286 // Call 'hl_drv_disable_vocoder()' instead of 'enable_tch_vocoder(FALSE)'
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1287 // enable_tch_vocoder(FALSE);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1288
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1289 //July 03, 2006 REF:DR OMAPS00083150 x0047075
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1290 //Fix:Use hl_drv_set_vocoder_state(FALSE) instead of hl_drv_disable_vocoder() to disable the vocoder
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1291 hl_drv_set_vocoder_state(FALSE);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1292 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1293 return;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1294 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1295
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1296 /****************************************************************/
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1297 /* NEPTUNE DEFINITIONS START HERE */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1298 /* BEGIN ADD: Req ID: : Sumit : 14-Mar-05 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1299 #else /* NEPTUNE_BOARD */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1300 #include "typedefs.h"
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1301 #include "mfw_aud.h"
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1302
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1303 SHORT mfw_aud_vm_delete_file(void)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1304 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1305 return MFW_AUD_VM_OK;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1306 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1307
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1308 SHORT mfw_aud_vm_start_playback(void (*callback_fn)(void *))
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1309 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1310 return MFW_AUD_VM_OK;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1311 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1312
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1313 SHORT mfw_aud_vm_stop_playback(void (*callback_fn)(void *))
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1314 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1315 return MFW_AUD_VM_OK;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1316 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1317
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1318 SHORT mfw_aud_vm_start_record(UBYTE max_duration, void (*callback_fn)(void *))
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1319 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1320 return MFW_AUD_VM_OK;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1321 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1322
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1323 SHORT mfw_aud_vm_stop_record(void (*callback_fn)(void *))
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1324 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1325 return MFW_AUD_VM_OK;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1326 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1327
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1328 UBYTE mfw_aud_vm_get_duration(void)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1329 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1330 return 0;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1331 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1332
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1333 void mfw_aud_vm_set_duration(UBYTE duration)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1334 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1335 return;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1336 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1337
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1338 /*
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1339 ** Layer1 Audio interface functions
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1340 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1341 void mfw_aud_l1_enable_vocoder ( void )
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1342 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1343 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1344
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1345 void mfw_aud_l1_disable_vocoder ( void )
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1346 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1347 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1348
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1349 #endif /* NEPTUNE_BOARD*/
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1350 /* END ADD: Req ID: : Sumit : 14-Mar-05 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1351