FreeCalypso > hg > fc-magnetite
comparison src/aci2/bmi/MmiSounds.h @ 3:93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 26 Sep 2016 00:29:36 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
2:c41a534f33c6 | 3:93999a60b835 |
---|---|
1 #ifndef _MMI_SOUNDS_H_ | |
2 #define _MMI_SOUNDS_H_ 1 | |
3 | |
4 /******************************************************************************* | |
5 | |
6 CONDAT (UK) | |
7 | |
8 ******************************************************************************** | |
9 | |
10 This software product is the property of Condat (UK) Ltd and may not be | |
11 disclosed to any third party without the express permission of the owner. | |
12 | |
13 ******************************************************************************** | |
14 | |
15 $Project name: Basic MMI | |
16 $Project code: BMI (6349) | |
17 $Module: Sounds | |
18 $File: MmiSounds.h | |
19 $Revision: 1.0 | |
20 | |
21 $Author: Condat(UK) | |
22 $Date: 25/10/00 | |
23 | |
24 ******************************************************************************** | |
25 | |
26 Description: | |
27 | |
28 This provides the implementation of the sounds for the basic MMI | |
29 | |
30 1. Playing various system sounds such as the paging ring, | |
31 new sms message etc. | |
32 2. The menus used to enable or disable the system sounds | |
33 3. The menu used to select the paging ring tone | |
34 4. The menu used to select the volume. | |
35 5. The menu used to select the key press tone or dtmf | |
36 | |
37 The mmi should play system sounds by calling soundExec with the appropriate | |
38 SoundsXXXX message it is possible to go directly to the audio driver to play | |
39 a sound but this will bypass any user settings to turn sounds on or off. | |
40 | |
41 The MelodySelect and SettingXXXX messages are used to control the key events | |
42 during menu handling, entry to the sounds menus is through the soundsXXXX | |
43 functions. These display the appropriate menu and handle the keypad events. | |
44 | |
45 The settings are read from PCM on startup and saved whenever a setting menu | |
46 is selected. | |
47 | |
48 ******************************************************************************** | |
49 $History: MmiSounds.h | |
50 | |
51 25/10/00 Original Condat(UK) BMI version. | |
52 | |
53 Nov 04, 2005 REF:DRT OMAPS00053737 xdeepadh | |
54 Description: MIDI Ringer Linear Flash Support. | |
55 Solution: The Midi Ringer application has been enhanced to loadand play the midi files from LFS. | |
56 | |
57 Apr 05, 2005 REF: ENH 29994 xdeepadh | |
58 Description: Implementation of Generic Midi Ringer and Modification of existing Midi Test Application | |
59 Solution: Generic Midi Ringer and Midi Test Application were implemented. | |
60 | |
61 Nov 29, 2004 REF: CRR 25051 xkundadu | |
62 Description: INCALL SCREEN – ADJUSTING THE VOLUME | |
63 Fix: Added volume level list linked to up/down keys. | |
64 User can select the speaker volume among those levels. | |
65 | |
66 Dec 23, 2005 REF: SR13878 x0020906 | |
67 Description: Set Default ring tone value. | |
68 Fix : Added a function setDefaultSound () | |
69 | |
70 $End | |
71 | |
72 *******************************************************************************/ | |
73 #include "MmiLists.h" | |
74 | |
75 #ifdef FF_MIDI_RINGER | |
76 #include "general.h" | |
77 #endif | |
78 /******************************************************************************* | |
79 | |
80 Basic definitions | |
81 | |
82 *******************************************************************************/ | |
83 | |
84 /* Redefine the alloc and free memory routines for use in the sounds | |
85 module. | |
86 */ | |
87 | |
88 #define ALLOC_MEMORY mfwAlloc | |
89 #define FREE_MEMORY mfwFree | |
90 | |
91 /* Apr 05, 2005 REF: ENH 29994 xdeepadh */ | |
92 /* Maximum files to be displayed in the MMI */ | |
93 #define MIDI_MAX_FILES 10 | |
94 | |
95 | |
96 | |
97 /* Provide message ids for the messages we will deal with in | |
98 the sounds module. | |
99 */ | |
100 typedef enum | |
101 { | |
102 SoundsNone = SoundsDummy, | |
103 SoundsStop, | |
104 SoundsPagingStart, | |
105 SoundsMuteClick, | |
106 SoundsRingAlarm, | |
107 SoundsRingOrganiser, | |
108 SoundsCreditRing, | |
109 SoundsSMSRing, | |
110 SoundsSMSBroadcast, | |
111 SoundsErrorTone, | |
112 SoundsBattLowIdle, | |
113 SoundsBattLowDedic, | |
114 SoundsConnCharger, | |
115 SoundsDisconnCharger, | |
116 SoundsSwitchOff, | |
117 MelodySelect, | |
118 SettingVibrator, | |
119 SettingKeypadTone, | |
120 SettingSMSTone, | |
121 SettingSMSBroadcastTone, | |
122 SettingBatteryLowBeep, | |
123 SettingCreditLowBeep, | |
124 SettingOrganiserAlert, | |
125 SettingAlarm, | |
126 SettingVolume, | |
127 SettingLanguage, | |
128 SoundsDone, | |
129 SoundsCancel | |
130 } SoundSettingState; | |
131 | |
132 // Nov 29, 2004 REF: CRR 25051 xkundadu | |
133 // Description: INCALL SCREEN – ADJUSTING THE VOLUME | |
134 // Fix: Added these enum variables corresponds to speaker volume evels. | |
135 // Maximum value allowed is 255 and minimum value is 1. So eqully divided into | |
136 // five levels. | |
137 typedef enum | |
138 { | |
139 OutVolumeLevel1 = 1, | |
140 OutVolumeLevel2 = 60, | |
141 OutVolumeLevel3 = 125, | |
142 OutVolumeLevel4 =190, | |
143 OutVolumeLevel5 = 255 | |
144 } T_OUT_VOLUME_LEVEL; | |
145 | |
146 typedef struct | |
147 { | |
148 T_MMI_CONTROL mmi_control; | |
149 T_MFW_HND sounds_win; /* MFW win handler */ | |
150 T_MFW_HND parent; | |
151 T_MFW_HND melody_handler; /* MFW sms handler */ | |
152 unsigned char local_status; | |
153 ListMenuData * menu_list_data; | |
154 } T_MELODY_INFO; | |
155 | |
156 #ifdef FF_MIDI_RINGER | |
157 typedef struct | |
158 { | |
159 const char* melody_name; | |
160 const void* melody; | |
161 UINT32 melody_size; | |
162 } T_MELODY; | |
163 #endif | |
164 | |
165 /******************************************************************************* | |
166 | |
167 Public Methods | |
168 | |
169 *******************************************************************************/ | |
170 | |
171 void soundInit( MfwHnd parent ); | |
172 void soundExit( void ); | |
173 void soundExec( int reason, MmiState next ); | |
174 | |
175 /* functions setting the focus for entering configuration menus. | |
176 */ | |
177 #ifdef NEPTUNE_BOARD | |
178 void volumeMenuScrollUp(); | |
179 void volumeMenuScrollDown(); | |
180 void restorePreviousVolumeSetting(); | |
181 void volumeMenuStartPlaying(); | |
182 #endif | |
183 | |
184 int settingsVibrator( MfwMnu* m, MfwMnuItem* i ); | |
185 int settingsLanguages( MfwMnu* m, MfwMnuItem* i ); | |
186 int soundsRinger( MfwMnu* m, MfwMnuItem* i ); | |
187 int soundsVolume( MfwMnu* m, MfwMnuItem* i ); | |
188 | |
189 int soundsKeypadSilent(MfwMnu* m, MfwMnuItem* i); | |
190 int soundsKeypadClick(MfwMnu* m, MfwMnuItem* i); | |
191 int soundsKeypadDTMF(MfwMnu* m, MfwMnuItem* i); | |
192 | |
193 int soundsNewMessage( MfwMnu* m, MfwMnuItem* i ); | |
194 int soundsNewBroadcast( MfwMnu* m, MfwMnuItem* i ); | |
195 int soundsBatteryLow( MfwMnu* m, MfwMnuItem* i ); | |
196 int soundsCreditLow( MfwMnu* m, MfwMnuItem* i ); | |
197 int soundsOrganiser( MfwMnu* m, MfwMnuItem* i ); | |
198 int soundsAlarm( MfwMnu* m, MfwMnuItem* i ); | |
199 | |
200 void soundReasonRinger(void); | |
201 void soundReasonSmsTone(void); | |
202 void soundReasonAlarm(void); | |
203 | |
204 void soundsVolSilent(void); | |
205 void soundsVolLow(void); | |
206 void soundsVolMedium(void); | |
207 void soundsVolHigh(void); | |
208 void soundsVolInc(void); | |
209 void restoreSilentModeVolume(void); | |
210 void setSilentModeVolume(void); | |
211 | |
212 UBYTE getCurrentVoulmeSettings(void); | |
213 void setSoundsReason(USHORT reason); | |
214 | |
215 // Nov 29, 2004 REF: CRR 25051 xkundadu | |
216 // Description: INCALL SCREEN – ADJUSTING THE VOLUME | |
217 // Fix: Prototypes for the volume setting functions. | |
218 void SetVolumeLevel1(void); | |
219 void SetVolumeLevel2(void); | |
220 void SetVolumeLevel3(void); | |
221 void SetVolumeLevel4(void); | |
222 void SetVolumeLevel5(void); | |
223 /* Apr 05, 2005 REF: ENH 29994 xdeepadh */ | |
224 #ifdef FF_MIDI_RINGER | |
225 int sounds_midi_return_file_number(void); | |
226 char* sounds_midi_return_file_name(UBYTE index); | |
227 T_MELODY sounds_midi_return_memory_location(UBYTE index); | |
228 //Nov 04, 2005 REF:DRT OMAPS00053737 xdeepadh | |
229 int sounds_populate_midi_files(char **file_names, int max_files_count,char* dir_name_p); | |
230 void sounds_midi_init(void); | |
231 void sounds_midi_exit(void); | |
232 void sounds_unpopulate_midi_files(char **file_names); | |
233 void sounds_midi_ringer_start_cb(void *parameter); | |
234 void sounds_midi_ringer_stop_cb(void *parameter); | |
235 void sounds_midi_player_start_cb(void *parameter); | |
236 void sounds_midi_player_stop_cb(void *parameter); | |
237 int get_ringer_mode(void); | |
238 void IdleScreenVolumeTimer(); | |
239 char *sounds_midi_GetExtension(char *src);//Jul 20, 2005 REF: SPR 30772 xdeepadh | |
240 | |
241 //Nov 04, 2005 REF:DRT OMAPS00053737 xdeepadh | |
242 #ifdef FF_MIDI_LOAD_FROM_LFS | |
243 int sounds_load_lfs_midi_files( int max_files_count); | |
244 #endif | |
245 #endif | |
246 | |
247 /* Store into structure from FFS - RAVI - 23-12-2005 */ | |
248 #ifdef NEPTUNE_BOARD | |
249 void setDefaultSound(); | |
250 #endif | |
251 /* END RAVI */ | |
252 | |
253 /******************************************************************************* | |
254 | |
255 End of File | |
256 | |
257 *******************************************************************************/ | |
258 | |
259 #endif //_MMI_SOUNDS_H_ |