FreeCalypso > hg > fc-tourmaline
comparison src/ui/bmi/mmiSounds.c @ 92:c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 08 Nov 2020 06:39:16 +0000 |
parents | 67bfe9f274f6 |
children | 2cd1c1abdbb5 |
comparison
equal
deleted
inserted
replaced
91:c3d28a37caad | 92:c0052fe355d3 |
---|---|
46 $History: MmiSounds.c | 46 $History: MmiSounds.c |
47 | 47 |
48 Apr 09, 2008 DRT: OMAPS00163752 including changes from OMAPS00151417 x0086292 | 48 Apr 09, 2008 DRT: OMAPS00163752 including changes from OMAPS00151417 x0086292 |
49 Description: Rapid Scrolling of Ringer melodies will lockup phone | 49 Description: Rapid Scrolling of Ringer melodies will lockup phone |
50 Solution: Board froze when sending to many messages to AS task to stop audio, which froze | 50 Solution: Board froze when sending to many messages to AS task to stop audio, which froze |
51 the board whenever there were too many messages in queue. Instead we can check if | 51 the board whenever there were too many messages in queue. Instead we can check if |
52 audio is being played internally before sending stop message. | 52 audio is being played internally before sending stop message. |
53 | 53 |
54 Nov 06, 2007 DRT: OMAPS00151698 x0056422 | 54 Nov 06, 2007 DRT: OMAPS00151698 x0056422 |
55 Description: BMI requirments needed to support Bluetooth AVRCP in Locosto 5.x | 55 Description: BMI requirments needed to support Bluetooth AVRCP in Locosto 5.x |
56 Solution : In mfw_audResume, Pause, Stop functions, if BT is connected, send a callback. | 56 Solution : In mfw_audResume, Pause, Stop functions, if BT is connected, send a callback. |
57 In the case of audio play, handle the callback of START_IND from audio task and | 57 In the case of audio play, handle the callback of START_IND from audio task and |
58 post a callback to BT if expected. | 58 post a callback to BT if expected. |
59 | 59 |
60 August 01, 2007 DR: OMAPS00137399 x0080701 (Bharat) | 60 August 01, 2007 DR: OMAPS00137399 x0080701 (Bharat) |
61 Description: COMBO PLUS: Voice can not be heard in a call when MP3 tone was set | 61 Description: COMBO PLUS: Voice can not be heard in a call when MP3 tone was set |
62 Have an MP3 tone set as Ringer. Make a call to the target. | 62 Have an MP3 tone set as Ringer. Make a call to the target. |
63 Accept the same, no voice can be heard from the calling | 63 Accept the same, no voice can be heard from the calling |
64 device or from the board that received | 64 device or from the board that received |
65 Issue: Timing Synchronization Issue between BMI-ACI-L1. | 65 Issue: Timing Synchronization Issue between BMI-ACI-L1. |
66 BMI calls sAT_A to accept the call. ACI then sends the RING_OFF signal | 66 BMI calls sAT_A to accept the call. ACI then sends the RING_OFF signal |
67 to BMI, wherein BMI does a Ringer Stop. After this, ACI calls Vocoder | 67 to BMI, wherein BMI does a Ringer Stop. After this, ACI calls Vocoder |
68 Enable. However, the Ringer Stop goes to L1 much later after Vocoder | 68 Enable. However, the Ringer Stop goes to L1 much later after Vocoder |
69 Enable reaches L1 due to which the Vocoder eventually gets disabled. | 69 Enable reaches L1 due to which the Vocoder eventually gets disabled. |
73 as_stop for ringer_stop). This way, it is assured that the Vocoder | 73 as_stop for ringer_stop). This way, it is assured that the Vocoder |
74 Enable Request reaches L1 only after Ringer Stop is completely done | 74 Enable Request reaches L1 only after Ringer Stop is completely done |
75 | 75 |
76 April 25, 2007 DVT: OMAPS128828 x0061088(Prachi) | 76 April 25, 2007 DVT: OMAPS128828 x0061088(Prachi) |
77 Description: E1 Melody support | 77 Description: E1 Melody support |
78 Solution: Now E1 Melody will be supported through ringer. | 78 Solution: Now E1 Melody will be supported through ringer. |
79 | 79 |
80 Mar 30, 2007 REF: OMAPS00122691 x0039928 | 80 Mar 30, 2007 REF: OMAPS00122691 x0039928 |
81 Description: COMBO: No melody heard on parsing over different volums in tones menu | 81 Description: COMBO: No melody heard on parsing over different volums in tones menu |
82 Solution: Filename is passed with complete path to the audio service api. | 82 Solution: Filename is passed with complete path to the audio service api. |
83 | 83 |
84 Dec 05, 2006 ERT: OMAPS00101906 x0039928 | 84 Dec 05, 2006 ERT: OMAPS00101906 x0039928 |
85 Description: WAV format support on Locosto | 85 Description: WAV format support on Locosto |
86 Solution: .wav files are populated. | 86 Solution: .wav files are populated. |
87 | 87 |
88 Nov 23, 2006 ERT: OMAPS00101348 x0039928 | 88 Nov 23, 2006 ERT: OMAPS00101348 x0039928 |
89 Description: Open BAE support for SMS for Nokia Smart Messaging melody | 89 Description: Open BAE support for SMS for Nokia Smart Messaging melody |
90 Solution: .sms files are populated. | 90 Solution: .sms files are populated. |
91 | 91 |
92 Nov 07, 2006 ER: OMAPS00102732 x0pleela | 92 Nov 07, 2006 ER: OMAPS00102732 x0pleela |
93 Description: FFS Support for Intel Sibley Flash - Intel 256+64 non-ADMUX (PF38F4050M0Y0C0Q) | 93 Description: FFS Support for Intel Sibley Flash - Intel 256+64 non-ADMUX (PF38F4050M0Y0C0Q) |
94 Solution: Closing the opened directory if readdir is not successful and the new code | 94 Solution: Closing the opened directory if readdir is not successful and the new code |
95 is under the compilation flag FF_MMI_RELIANCE_FFS | 95 is under the compilation flag FF_MMI_RELIANCE_FFS |
96 | 96 |
97 25/10/00 Original Condat(UK) BMI version. | 97 25/10/00 Original Condat(UK) BMI version. |
98 | 98 |
99 Sep 26, 2006 DR: OMAPS00096365 x0pleela | 99 Sep 26, 2006 DR: OMAPS00096365 x0pleela |
100 Description: Play All Files option does not play all the midi files second time | 100 Description: Play All Files option does not play all the midi files second time |
101 Solution:Reset the index to -1 to avoid playing only the last file in function sounds_midi_player_start_cb() | 101 Solution:Reset the index to -1 to avoid playing only the last file in function sounds_midi_player_start_cb() |
102 | 102 |
103 Sep 11, 2006 DR: OMAPS00094182 xrashmic | 103 Sep 11, 2006 DR: OMAPS00094182 xrashmic |
104 Description: midi and mp3 files is not being populated on accessing corresponding menu, but only during bootup | 104 Description: midi and mp3 files is not being populated on accessing corresponding menu, but only during bootup |
105 Solution: Populate files on accessing the "browse files" list | 105 Solution: Populate files on accessing the "browse files" list |
106 | 106 |
107 Aug 08, 2006 REF:DRT OMAPS00085889 x0039928 | 107 Aug 08, 2006 REF:DRT OMAPS00085889 x0039928 |
108 Description: no sound when played voice memo just after listening a midi file | 108 Description: no sound when played voice memo just after listening a midi file |
109 Solution: stereo path is unset after reaching end of the file. | 109 Solution: stereo path is unset after reaching end of the file. |
110 | 110 |
111 Jun 06, 2006 REF:ER OMAPS00080844 xdeepadh | 111 Jun 06, 2006 REF:ER OMAPS00080844 xdeepadh |
112 Description: duplication of midi files in ffs area | 112 Description: duplication of midi files in ffs area |
113 Solution: The code to create and load the midi files from FFS to LFS is | 113 Solution: The code to create and load the midi files from FFS to LFS is |
114 removed. | 114 removed. |
115 | 115 |
116 Nov 23, 2005 REF : DR OMAPS00057378 x0039928 | 116 Nov 23, 2005 REF : DR OMAPS00057378 x0039928 |
117 Bug: All MIDI files are not displayed in MMI in locosto-lite | 117 Bug: All MIDI files are not displayed in MMI in locosto-lite |
118 Fix: Buffer memory allocated to copy the file contents is freed | 118 Fix: Buffer memory allocated to copy the file contents is freed |
119 properly and copying file from FFS to LFS is not terminated if error is | 119 properly and copying file from FFS to LFS is not terminated if error is |
120 returned for just any one file, instead it tries to copy other files. | 120 returned for just any one file, instead it tries to copy other files. |
121 | 121 |
122 Nov 21, 2005 REF:ER OMAPS00057430 nekkareb | 122 Nov 21, 2005 REF:ER OMAPS00057430 nekkareb |
123 Description: AAC Ringer Implementation | 123 Description: AAC Ringer Implementation |
124 Solution: The Midi Ringer application has been enhanced to support AAC as ringer. | 124 Solution: The Midi Ringer application has been enhanced to support AAC as ringer. |
125 | 125 |
126 Nov 04, 2005 REF:DRT OMAPS00053737 xdeepadh | 126 Nov 04, 2005 REF:DRT OMAPS00053737 xdeepadh |
127 Description: MIDI Ringer Linear Flash Support. | 127 Description: MIDI Ringer Linear Flash Support. |
128 Solution: The Midi Ringer application has been enhanced to loadand play the midi files from LFS. | 128 Solution: The Midi Ringer application has been enhanced to loadand play the midi files from LFS. |
129 | 129 |
130 Nov 02, 2005 REF:ER OMAPS00039044 xdeepadh | 130 Nov 02, 2005 REF:ER OMAPS00039044 xdeepadh |
152 Description: Implementation of Generic Midi Ringer and Modification of existing Midi Test Application | 152 Description: Implementation of Generic Midi Ringer and Modification of existing Midi Test Application |
153 Solution: Generic Midi Ringer and Midi Test Application were implemented. | 153 Solution: Generic Midi Ringer and Midi Test Application were implemented. |
154 | 154 |
155 Nov 29, 2004 REF: CRR 25051 xkundadu | 155 Nov 29, 2004 REF: CRR 25051 xkundadu |
156 Description: INCALL SCREEN ?ADJUSTING THE VOLUME | 156 Description: INCALL SCREEN ?ADJUSTING THE VOLUME |
157 Fix: Added volume level list linked to up/down keys. | 157 Fix: Added volume level list linked to up/down keys. |
158 User can select the speaker volume among those levels. | 158 User can select the speaker volume among those levels. |
159 Dec 23, 2005 REF: SR13873 x0020906 | 159 Dec 23, 2005 REF: SR13873 x0020906 |
160 Description: Selection configurable ring tones. Added for NEPTUNE | 160 Description: Selection configurable ring tones. Added for NEPTUNE |
161 Fix: When moving cursor in menu, stop old and play new ringtone. | 161 Fix: When moving cursor in menu, stop old and play new ringtone. |
162 When press of back / clear / hang up stop playing the ringtone. | 162 When press of back / clear / hang up stop playing the ringtone. |
163 Initially when the get into list, start playing first ringtone - As cursor is positioned. | 163 Initially when the get into list, start playing first ringtone - As cursor is positioned. |
164 | 164 |
165 $End | 165 $End |
166 | 166 |
167 *******************************************************************************/ | 167 *******************************************************************************/ |
168 | 168 |
213 #include "mfw_mnu.h" | 213 #include "mfw_mnu.h" |
214 #include "mfw_phb.h" | 214 #include "mfw_phb.h" |
215 #include "mfw_sms.h" | 215 #include "mfw_sms.h" |
216 | 216 |
217 //Apr 05, 2005 REF: ENH 29994 xdeepadh | 217 //Apr 05, 2005 REF: ENH 29994 xdeepadh |
218 #ifdef FF_MIDI_RINGER | 218 #ifdef FF_MIDI_RINGER |
219 #include "mfw_midi.h" | 219 #include "mfw_midi.h" |
220 | 220 |
221 #ifdef FF_MMI_MIDI_FORMAT | 221 #ifdef FF_MMI_MIDI_FORMAT |
222 #include "bae/bae_options.h" //Jul 20, 2005 REF: SPR 30772 xdeepadh | 222 #include "bae/bae_options.h" //Jul 20, 2005 REF: SPR 30772 xdeepadh |
223 #endif | 223 #endif |
258 | 258 |
259 #include "MmiTimers.h" | 259 #include "MmiTimers.h" |
260 | 260 |
261 #include "mmiColours.h" | 261 #include "mmiColours.h" |
262 //Apr 05, 2005 REF: ENH 29994 xdeepadh | 262 //Apr 05, 2005 REF: ENH 29994 xdeepadh |
263 #ifdef FF_MIDI_RINGER | 263 #ifdef FF_MIDI_RINGER |
264 #include "mmisamplemidifiles.h" | 264 #include "mmisamplemidifiles.h" |
265 #endif | 265 #endif |
266 | 266 |
267 /* OMAPS00151698, x0056422 */ | 267 /* OMAPS00151698, x0056422 */ |
268 #ifdef FF_MMI_A2DP_AVRCP | 268 #ifdef FF_MMI_A2DP_AVRCP |
274 extern char* MelodyTable[]; | 274 extern char* MelodyTable[]; |
275 extern T_call call_data; | 275 extern T_call call_data; |
276 | 276 |
277 // Aug 05, 2005 xdeepadh | 277 // Aug 05, 2005 xdeepadh |
278 #ifdef FF_MMI_AUDIO_PROFILE | 278 #ifdef FF_MMI_AUDIO_PROFILE |
279 extern UBYTE mfwAudPlay;//flag for audio | 279 extern UBYTE mfwAudPlay;//flag for audio |
280 #endif | 280 #endif |
281 | 281 |
282 /*August 01, 2007 DR: OMAPS00137399 x0080701 (Bharat) -- Start */ | 282 /*August 01, 2007 DR: OMAPS00137399 x0080701 (Bharat) -- Start */ |
283 | 283 |
284 #include "mfw_aud.h" | 284 #include "mfw_aud.h" |
353 #define AAC_PLAY_FROM_START 0 | 353 #define AAC_PLAY_FROM_START 0 |
354 #endif //FF_AAC_RINGER | 354 #endif //FF_AAC_RINGER |
355 | 355 |
356 | 356 |
357 //Apr 05, 2005 REF: ENH 29994 xdeepadh | 357 //Apr 05, 2005 REF: ENH 29994 xdeepadh |
358 #ifdef FF_MIDI_RINGER | 358 #ifdef FF_MIDI_RINGER |
359 | 359 |
360 extern UBYTE mfw_player_exit_flag;//Flag to check the playall option | 360 extern UBYTE mfw_player_exit_flag;//Flag to check the playall option |
361 extern int mfw_player_currently_playing_idx;//The current playing file index | 361 extern int mfw_player_currently_playing_idx;//The current playing file index |
362 #define MT_INFO_SCRN_TIMEOUT 1500//Timeout for InfoDialog | 362 #define MT_INFO_SCRN_TIMEOUT 1500//Timeout for InfoDialog |
363 int selected_tone=0; | 363 int selected_tone=0; |
390 | 390 |
391 static int winEvent( MfwEvt e, MfwWin *w ); | 391 static int winEvent( MfwEvt e, MfwWin *w ); |
392 static int keyEvent( MfwEvt e, MfwKbd *kc ); | 392 static int keyEvent( MfwEvt e, MfwKbd *kc ); |
393 static int keyEventLong( MfwEvt e, MfwKbd *kc ); | 393 static int keyEventLong( MfwEvt e, MfwKbd *kc ); |
394 | 394 |
395 /* x0039928 - Lint warning fix | 395 /* x0039928 - Lint warning fix |
396 static void ( *show )( void ); */ | 396 static void ( *show )( void ); */ |
397 | 397 |
398 //Apr 05, 2005 REF: ENH 29994 xdeepadh | 398 //Apr 05, 2005 REF: ENH 29994 xdeepadh |
399 #ifndef FF_MIDI_RINGER | 399 #ifndef FF_MIDI_RINGER |
400 static int playCurrentSound( MfwEvt e, MfwTim *tc ); | 400 static int playCurrentSound( MfwEvt e, MfwTim *tc ); |
401 #endif | 401 #endif |
402 static int getCallingMenu( MfwEvt e, MfwTim *tc ); | 402 static int getCallingMenu( MfwEvt e, MfwTim *tc ); |
403 static int setSelection( MfwEvt e, MfwWin *w ); | 403 static int setSelection( MfwEvt e, MfwWin *w ); |
404 #ifndef FF_MIDI_RINGER | 404 #ifndef FF_MIDI_RINGER |
548 /* static MfwHnd hWinDispTimer; // timer to show result windows x0039928 - Lint warning fix */ | 548 /* static MfwHnd hWinDispTimer; // timer to show result windows x0039928 - Lint warning fix */ |
549 | 549 |
550 /* Maintain vibrator state information here | 550 /* Maintain vibrator state information here |
551 */ | 551 */ |
552 | 552 |
553 /* x0039928 - Lint warning removal | 553 /* x0039928 - Lint warning removal |
554 static MfwHnd VibratorTimer; | 554 static MfwHnd VibratorTimer; |
555 static UBYTE Vibrating = NOT_VIBRATING; | 555 static UBYTE Vibrating = NOT_VIBRATING; |
556 static UBYTE vibrator_counter=0; */ | 556 static UBYTE vibrator_counter=0; */ |
557 | 557 |
558 /* General state information | 558 /* General state information |
559 */ | 559 */ |
560 | 560 |
565 | 565 |
566 | 566 |
567 /* Tune details | 567 /* Tune details |
568 */ | 568 */ |
569 static int CurrentTune = 0; | 569 static int CurrentTune = 0; |
570 #ifndef FF_MIDI_RINGER | 570 #ifndef FF_MIDI_RINGER |
571 static int LastTune = 0; | 571 static int LastTune = 0; |
572 #endif | 572 #endif |
573 | 573 |
574 static const MfwMnuAttr melody_menuAttrib = | 574 static const MfwMnuAttr melody_menuAttrib = |
575 { | 575 { |
591 | 591 |
592 /****************************************************************************** | 592 /****************************************************************************** |
593 *$Function: setDefaultSound | 593 *$Function: setDefaultSound |
594 * | 594 * |
595 *$Description: This function will read from Flash during boot up and updated the | 595 *$Description: This function will read from Flash during boot up and updated the |
596 * current ringer structure. So after reset the stored tones will get | 596 * current ringer structure. So after reset the stored tones will get |
597 * played. | 597 * played. |
598 * | 598 * |
599 *$Returns: none | 599 *$Returns: none |
600 * | 600 * |
601 *$Arguments: none | 601 *$Arguments: none |
664 *******************************************************************************/ | 664 *******************************************************************************/ |
665 void volMenuItemSelected(void) | 665 void volMenuItemSelected(void) |
666 { | 666 { |
667 | 667 |
668 TRACE_FUNCTION("volMenuItemSelected"); | 668 TRACE_FUNCTION("volMenuItemSelected"); |
669 | 669 |
670 /* Apr 05, 2005 REF: ENH 29994 xdeepadh */ | 670 /* Apr 05, 2005 REF: ENH 29994 xdeepadh */ |
671 #ifdef FF_MIDI_RINGER | 671 #ifdef FF_MIDI_RINGER |
672 /* Save the volume for a given ringer mode */ | 672 /* Save the volume for a given ringer mode */ |
673 TRACE_EVENT_P1("Volume set is %d",current.volumeSetting); | 673 TRACE_EVENT_P1("Volume set is %d",current.volumeSetting); |
674 mfw_ringer_set_volume(get_ringer_mode(),(T_AS_VOLUME)getCurrentVoulmeSettings()); | 674 mfw_ringer_set_volume(get_ringer_mode(),(T_AS_VOLUME)getCurrentVoulmeSettings()); |
675 #else | 675 #else |
676 volumeSetting2Pcm =TRUE; /* x0039928 - Lint warning removal */ | 676 volumeSetting2Pcm =TRUE; /* x0039928 - Lint warning removal */ |
709 void clearScrollSelectMenuItem(void) | 709 void clearScrollSelectMenuItem(void) |
710 { | 710 { |
711 TRACE_FUNCTION("clearScrollSelectMenuItem"); | 711 TRACE_FUNCTION("clearScrollSelectMenuItem"); |
712 scrollSelectMenuItem=FALSE; | 712 scrollSelectMenuItem=FALSE; |
713 // soundReason = SoundsNone; MZ this flag cleared when user exits the melody/Volume menu. | 713 // soundReason = SoundsNone; MZ this flag cleared when user exits the melody/Volume menu. |
714 //Apr 05, 2005 REF: ENH 29994 xdeepadh | 714 //Apr 05, 2005 REF: ENH 29994 xdeepadh |
715 #ifdef FF_MIDI_RINGER | 715 #ifdef FF_MIDI_RINGER |
716 mfw_player_stop(sounds_midi_player_stop_cb); | 716 mfw_player_stop(sounds_midi_player_stop_cb); |
717 #else | 717 #else |
718 stopPlayingMelody(); | 718 stopPlayingMelody(); |
719 #endif | 719 #endif |
720 } | 720 } |
733 *******************************************************************************/ | 733 *******************************************************************************/ |
734 void soundsSetVolume(void) | 734 void soundsSetVolume(void) |
735 { | 735 { |
736 | 736 |
737 TRACE_FUNCTION("soundsSetVolume"); | 737 TRACE_FUNCTION("soundsSetVolume"); |
738 //Apr 05, 2005 REF: ENH 29994 xdeepadh | 738 //Apr 05, 2005 REF: ENH 29994 xdeepadh |
739 #ifdef FF_MIDI_RINGER | 739 #ifdef FF_MIDI_RINGER |
740 //Create 0.5 second ringer delay timer. | 740 //Create 0.5 second ringer delay timer. |
741 hPlayerStartTimer = timCreate( 0, TIMHALFSECOND, (MfwCb)playCurrentVolumeTone); | 741 hPlayerStartTimer = timCreate( 0, TIMHALFSECOND, (MfwCb)playCurrentVolumeTone); |
742 //Set the audiopath to speaker. | 742 //Set the audiopath to speaker. |
743 mfw_ringer_set_audiopath(); | 743 mfw_ringer_set_audiopath(); |
744 //Set the voice limit to 32 and channel to stereo in idle mode | 744 //Set the voice limit to 32 and channel to stereo in idle mode |
745 mfw_player_midi_set_params(FF_MIDI_VOICE_LIMIT,MIDI_CHANNEL_STEREO); | 745 mfw_player_midi_set_params(FF_MIDI_VOICE_LIMIT,MIDI_CHANNEL_STEREO); |
746 //Nov 02, 2005 REF:ER OMAPS00039044 xdeepadh | 746 //Nov 02, 2005 REF:ER OMAPS00039044 xdeepadh |
747 //Set the Mp3 Parameters .Size of the file where the melody must start is set 0(from beginning) | 747 //Set the Mp3 Parameters .Size of the file where the melody must start is set 0(from beginning) |
748 //and channel is set to stereo. | 748 //and channel is set to stereo. |
749 #ifdef FF_MP3_RINGER | 749 #ifdef FF_MP3_RINGER |
750 mfw_player_mp3_set_params(MP3_PLAY_FROM_START,MP3_CHANNEL_STEREO); | 750 mfw_player_mp3_set_params(MP3_PLAY_FROM_START,MP3_CHANNEL_STEREO); |
751 #endif //FF_MP3_RINGER | 751 #endif //FF_MP3_RINGER |
752 | 752 |
753 //Nov 21, 2005 REF:ER OMAPS00057430 nekkareb | 753 //Nov 21, 2005 REF:ER OMAPS00057430 nekkareb |
754 //Set the AAC Parameters .Size of the file where the melody must start is set 0(from beginning) | 754 //Set the AAC Parameters .Size of the file where the melody must start is set 0(from beginning) |
755 //and channel is set to stereo. | 755 //and channel is set to stereo. |
756 #ifdef FF_AAC_RINGER | 756 #ifdef FF_AAC_RINGER |
757 mfw_player_aac_set_params(AAC_PLAY_FROM_START,AAC_CHANNEL_STEREO); | 757 mfw_player_aac_set_params(AAC_PLAY_FROM_START,AAC_CHANNEL_STEREO); |
758 #endif //FF_AAC_RINGER | 758 #endif //FF_AAC_RINGER |
759 | 759 |
760 #endif | 760 #endif |
761 | 761 |
791 *******************************************************************************/ | 791 *******************************************************************************/ |
792 | 792 |
793 void IdleScreenVolumeTimer() | 793 void IdleScreenVolumeTimer() |
794 { | 794 { |
795 TRACE_FUNCTION("IdleScreenVolumeTimer"); | 795 TRACE_FUNCTION("IdleScreenVolumeTimer"); |
796 //Apr 05, 2005 REF: ENH 29994 xdeepadh | 796 //Apr 05, 2005 REF: ENH 29994 xdeepadh |
797 #ifdef FF_MIDI_RINGER | 797 #ifdef FF_MIDI_RINGER |
798 //Create 0.5 second ringer delay timer. | 798 //Create 0.5 second ringer delay timer. |
799 hPlayerStartTimer = timCreate( 0, TIMHALFSECOND, (MfwCb)playCurrentVolumeTone); | 799 hPlayerStartTimer = timCreate( 0, TIMHALFSECOND, (MfwCb)playCurrentVolumeTone); |
800 //Set the audiopath to speaker. | 800 //Set the audiopath to speaker. |
801 mfw_ringer_set_audiopath(); | 801 mfw_ringer_set_audiopath(); |
802 //Set the voice limit to 32 and channel to stereo in idle mode | 802 //Set the voice limit to 32 and channel to stereo in idle mode |
831 *******************************************************************************/ | 831 *******************************************************************************/ |
832 void setSilentModeVolume(void) | 832 void setSilentModeVolume(void) |
833 { | 833 { |
834 | 834 |
835 // Aug 30, 2005 REF: SPR 34018 xdeepadh | 835 // Aug 30, 2005 REF: SPR 34018 xdeepadh |
836 #ifdef FF_MIDI_RINGER | 836 #ifdef FF_MIDI_RINGER |
837 | 837 |
838 T_AS_RINGER_INFO * ringer_info; | 838 T_AS_RINGER_INFO * ringer_info; |
839 T_AS_RINGER_INFO temp_ringer_info; | 839 T_AS_RINGER_INFO temp_ringer_info; |
840 TRACE_FUNCTION("setSilentModeVolume"); | 840 TRACE_FUNCTION("setSilentModeVolume"); |
841 | 841 |
848 current.volumeSetting = (UBYTE)AS_VOLUME_SILENT; | 848 current.volumeSetting = (UBYTE)AS_VOLUME_SILENT; |
849 TRACE_EVENT_P1("Volume set is %d",current.volumeSetting); | 849 TRACE_EVENT_P1("Volume set is %d",current.volumeSetting); |
850 mfw_ringer_set_volume(AS_RINGER_MODE_IC,(T_AS_VOLUME)getCurrentVoulmeSettings()); | 850 mfw_ringer_set_volume(AS_RINGER_MODE_IC,(T_AS_VOLUME)getCurrentVoulmeSettings()); |
851 #else | 851 #else |
852 stopPlayingMelody(); | 852 stopPlayingMelody(); |
853 oldVolumeSetting = current.volumeSetting; | 853 oldVolumeSetting = current.volumeSetting; |
854 current.volumeSetting = SILENT_VOLUME; | 854 current.volumeSetting = SILENT_VOLUME; |
855 audio_SetAmplf (AUDIO_BUZZER, current.volumeSetting); | 855 audio_SetAmplf (AUDIO_BUZZER, current.volumeSetting); |
856 #endif | 856 #endif |
857 } | 857 } |
858 | 858 |
859 /******************************************************************************* | 859 /******************************************************************************* |
860 | 860 |
861 $Function: setSilentModeVolumeOn | 861 $Function: setSilentModeVolumeOn |
870 void restoreSilentModeVolume(void) | 870 void restoreSilentModeVolume(void) |
871 { | 871 { |
872 | 872 |
873 TRACE_FUNCTION("restoreSilentModeVolume"); | 873 TRACE_FUNCTION("restoreSilentModeVolume"); |
874 // Aug 30, 2005 REF: SPR 34018 xdeepadh | 874 // Aug 30, 2005 REF: SPR 34018 xdeepadh |
875 #ifdef FF_MIDI_RINGER | 875 #ifdef FF_MIDI_RINGER |
876 //Set the volume back to the old one | 876 //Set the volume back to the old one |
877 TRACE_EVENT_P1("oldVolumeSetting set is %d",oldVolumeSetting); | 877 TRACE_EVENT_P1("oldVolumeSetting set is %d",oldVolumeSetting); |
878 mfw_ringer_set_volume(AS_RINGER_MODE_IC,(T_AS_VOLUME)oldVolumeSetting); | 878 mfw_ringer_set_volume(AS_RINGER_MODE_IC,(T_AS_VOLUME)oldVolumeSetting); |
879 #else | 879 #else |
880 stopPlayingMelody(); | 880 stopPlayingMelody(); |
881 current.volumeSetting =oldVolumeSetting; | 881 current.volumeSetting =oldVolumeSetting; |
882 audio_SetAmplf (AUDIO_BUZZER, current.volumeSetting); | 882 audio_SetAmplf (AUDIO_BUZZER, current.volumeSetting); |
883 #endif | 883 #endif |
884 } | 884 } |
885 | 885 |
886 /******************************************************************************* | 886 /******************************************************************************* |
894 $Arguments: none | 894 $Arguments: none |
895 | 895 |
896 *******************************************************************************/ | 896 *******************************************************************************/ |
897 void soundsVolSilent(void) | 897 void soundsVolSilent(void) |
898 { | 898 { |
899 //Apr 05, 2005 REF: ENH 29994 xdeepadh | 899 //Apr 05, 2005 REF: ENH 29994 xdeepadh |
900 #ifdef FF_MIDI_RINGER | 900 #ifdef FF_MIDI_RINGER |
901 //Display silent mode in the idle screen only for the incoming call volume. | 901 //Display silent mode in the idle screen only for the incoming call volume. |
902 if(soundReason == MelodySelect || soundReason == SettingVolume) | 902 if(soundReason == MelodySelect || soundReason == SettingVolume) |
903 { | 903 { |
904 FFS_flashData.settings_status |= SettingsSilentMode; | 904 FFS_flashData.settings_status |= SettingsSilentMode; |
905 flash_write(); | 905 flash_write(); |
908 FFS_flashData.settings_status |= SettingsSilentMode; | 908 FFS_flashData.settings_status |= SettingsSilentMode; |
909 flash_write(); | 909 flash_write(); |
910 #endif | 910 #endif |
911 | 911 |
912 TRACE_EVENT("soundsVolSilent"); | 912 TRACE_EVENT("soundsVolSilent"); |
913 //Apr 05, 2005 REF: ENH 29994 xdeepadh | 913 //Apr 05, 2005 REF: ENH 29994 xdeepadh |
914 #ifdef FF_MIDI_RINGER | 914 #ifdef FF_MIDI_RINGER |
915 current.volumeSetting =(UBYTE)AS_VOLUME_SILENT; | 915 current.volumeSetting =(UBYTE)AS_VOLUME_SILENT; |
916 stopVolumeTimer(); | 916 stopVolumeTimer(); |
917 startVolumeTimer(); | 917 startVolumeTimer(); |
918 #else | 918 #else |
919 /* RAVI - 20-1-2006 */ | 919 /* RAVI - 20-1-2006 */ |
927 { | 927 { |
928 current.volumeSetting =SILENT_VOLUME; | 928 current.volumeSetting =SILENT_VOLUME; |
929 audio_SetAmplf (AUDIO_BUZZER, current.volumeSetting); | 929 audio_SetAmplf (AUDIO_BUZZER, current.volumeSetting); |
930 | 930 |
931 #ifdef FF_MMI_RINGTONE /* MSL Ring tone play */ | 931 #ifdef FF_MMI_RINGTONE /* MSL Ring tone play */ |
932 audio_PlaySoundID(AUDIO_BUZZER, CALLTONE_SELECT, 0, AUDIO_PLAY_ONCE); | 932 audio_PlaySoundID(AUDIO_BUZZER, CALLTONE_SELECT, 0, AUDIO_PLAY_ONCE); |
933 #else | 933 #else |
934 | 934 |
935 /* RAVI - 20-1-2006 */ | 935 /* RAVI - 20-1-2006 */ |
936 #ifdef NEPTUNE_BOARD | 936 #ifdef NEPTUNE_BOARD |
937 /* Store the currently stored volume content */ | 937 /* Store the currently stored volume content */ |
938 audio_PlaySoundID(AUDIO_BUZZER, current.ringer, current.volumeSetting, AUDIO_PLAY_ONCE); | 938 audio_PlaySoundID(AUDIO_BUZZER, current.ringer, current.volumeSetting, AUDIO_PLAY_ONCE); |
939 #else | 939 #else |
940 /* API - 04/09/03 - SPR2447 - Remove the call to AUDIO_PLAY_INFINITE and replace with AUDIO_PLAY_ONCE*/ | 940 /* API - 04/09/03 - SPR2447 - Remove the call to AUDIO_PLAY_INFINITE and replace with AUDIO_PLAY_ONCE*/ |
941 audio_PlaySoundID(AUDIO_BUZZER, current.ringer, 0, AUDIO_PLAY_ONCE); | 941 audio_PlaySoundID(AUDIO_BUZZER, current.ringer, 0, AUDIO_PLAY_ONCE); |
942 /* API - 04/09/03 - SPR2447 - END*/ | 942 /* API - 04/09/03 - SPR2447 - END*/ |
943 #endif | 943 #endif |
944 /* END RAVI */ | 944 /* END RAVI */ |
945 #endif | 945 #endif |
946 | 946 |
947 } | 947 } |
948 else | 948 else |
949 { | 949 { |
950 //store setting into PCM | 950 //store setting into PCM |
951 volumeSetting2Pcm=FALSE; | 951 volumeSetting2Pcm=FALSE; |
952 } | 952 } |
953 #endif | 953 #endif |
954 | 954 |
955 | 955 |
956 } | 956 } |
957 /******************************************************************************* | 957 /******************************************************************************* |
958 | 958 |
959 $Function: soundsVolLow | 959 $Function: soundsVolLow |
960 | 960 |
969 { | 969 { |
970 | 970 |
971 FFS_flashData.settings_status &= ~SettingsSilentMode; | 971 FFS_flashData.settings_status &= ~SettingsSilentMode; |
972 flash_write(); | 972 flash_write(); |
973 TRACE_EVENT("soundsVolLow"); | 973 TRACE_EVENT("soundsVolLow"); |
974 //Apr 05, 2005 REF: ENH 29994 xdeepadh | 974 //Apr 05, 2005 REF: ENH 29994 xdeepadh |
975 #ifdef FF_MIDI_RINGER | 975 #ifdef FF_MIDI_RINGER |
976 current.volumeSetting =(UBYTE)AS_VOLUME_LOW; | 976 current.volumeSetting =(UBYTE)AS_VOLUME_LOW; |
977 stopVolumeTimer(); | 977 stopVolumeTimer(); |
978 startVolumeTimer(); | 978 startVolumeTimer(); |
979 #else | 979 #else |
980 /* RAVI - 20-1-2006 */ | 980 /* RAVI - 20-1-2006 */ |
987 { | 987 { |
988 current.volumeSetting = LOW_VOLUME; | 988 current.volumeSetting = LOW_VOLUME; |
989 audio_SetAmplf (AUDIO_BUZZER, current.volumeSetting); | 989 audio_SetAmplf (AUDIO_BUZZER, current.volumeSetting); |
990 | 990 |
991 #ifdef FF_MMI_RINGTONE /* MSL Ring tone play */ | 991 #ifdef FF_MMI_RINGTONE /* MSL Ring tone play */ |
992 audio_PlaySoundID(AUDIO_BUZZER, CALLTONE_SELECT, 0, AUDIO_PLAY_ONCE); | 992 audio_PlaySoundID(AUDIO_BUZZER, CALLTONE_SELECT, 0, AUDIO_PLAY_ONCE); |
993 #else | 993 #else |
994 | 994 |
995 /* RAVI - 20-1-2006 */ | 995 /* RAVI - 20-1-2006 */ |
996 #ifdef NEPTUNE_BOARD | 996 #ifdef NEPTUNE_BOARD |
997 audio_PlaySoundID(AUDIO_BUZZER, current.ringer, current.volumeSetting, AUDIO_PLAY_ONCE); | 997 audio_PlaySoundID(AUDIO_BUZZER, current.ringer, current.volumeSetting, AUDIO_PLAY_ONCE); |
998 #else | 998 #else |
999 /* API - 04/09/03 - SPR2447 - Remove the call to AUDIO_PLAY_INFINITE and replace with AUDIO_PLAY_ONCE*/ | 999 /* API - 04/09/03 - SPR2447 - Remove the call to AUDIO_PLAY_INFINITE and replace with AUDIO_PLAY_ONCE*/ |
1000 audio_PlaySoundID(AUDIO_BUZZER, current.ringer, 0, AUDIO_PLAY_ONCE); | 1000 audio_PlaySoundID(AUDIO_BUZZER, current.ringer, 0, AUDIO_PLAY_ONCE); |
1001 /* API - 04/09/03 - SPR2447 - END*/ | 1001 /* API - 04/09/03 - SPR2447 - END*/ |
1002 #endif | 1002 #endif |
1003 /* END RAVI */ | 1003 /* END RAVI */ |
1004 #endif | 1004 #endif |
1005 | 1005 |
1006 } | 1006 } |
1007 else | 1007 else |
1008 { | 1008 { |
1009 //store setting into PCM | 1009 //store setting into PCM |
1010 volumeSetting2Pcm=FALSE; | 1010 volumeSetting2Pcm=FALSE; |
1011 } | 1011 } |
1012 #endif | 1012 #endif |
1013 | 1013 |
1014 | 1014 |
1015 } | 1015 } |
1016 /******************************************************************************* | 1016 /******************************************************************************* |
1017 | 1017 |
1018 $Function: soundsVolMedium | 1018 $Function: soundsVolMedium |
1019 | 1019 |
1028 { | 1028 { |
1029 | 1029 |
1030 FFS_flashData.settings_status &= ~SettingsSilentMode; | 1030 FFS_flashData.settings_status &= ~SettingsSilentMode; |
1031 flash_write(); | 1031 flash_write(); |
1032 TRACE_EVENT("soundsVolMedium"); | 1032 TRACE_EVENT("soundsVolMedium"); |
1033 //Apr 05, 2005 REF: ENH 29994 xdeepadh | 1033 //Apr 05, 2005 REF: ENH 29994 xdeepadh |
1034 #ifdef FF_MIDI_RINGER | 1034 #ifdef FF_MIDI_RINGER |
1035 current.volumeSetting =(UBYTE)AS_VOLUME_MEDIUM; | 1035 current.volumeSetting =(UBYTE)AS_VOLUME_MEDIUM; |
1036 stopVolumeTimer(); | 1036 stopVolumeTimer(); |
1037 startVolumeTimer(); | 1037 startVolumeTimer(); |
1038 #else | 1038 #else |
1039 /* RAVI - 20-1-2006 */ | 1039 /* RAVI - 20-1-2006 */ |
1046 { | 1046 { |
1047 current.volumeSetting = MEDIUM_VOLUME; | 1047 current.volumeSetting = MEDIUM_VOLUME; |
1048 audio_SetAmplf (AUDIO_BUZZER, current.volumeSetting); | 1048 audio_SetAmplf (AUDIO_BUZZER, current.volumeSetting); |
1049 | 1049 |
1050 #ifdef FF_MMI_RINGTONE /* MSL Ring Tone Play */ | 1050 #ifdef FF_MMI_RINGTONE /* MSL Ring Tone Play */ |
1051 audio_PlaySoundID(AUDIO_BUZZER, CALLTONE_SELECT, 0, AUDIO_PLAY_ONCE); | 1051 audio_PlaySoundID(AUDIO_BUZZER, CALLTONE_SELECT, 0, AUDIO_PLAY_ONCE); |
1052 #else | 1052 #else |
1053 | 1053 |
1054 /* RAVI - 20-1-2006 */ | 1054 /* RAVI - 20-1-2006 */ |
1055 #ifdef NEPTUNE_BOARD | 1055 #ifdef NEPTUNE_BOARD |
1056 audio_PlaySoundID(AUDIO_BUZZER, current.ringer, current.volumeSetting, AUDIO_PLAY_ONCE); | 1056 audio_PlaySoundID(AUDIO_BUZZER, current.ringer, current.volumeSetting, AUDIO_PLAY_ONCE); |
1057 #else | 1057 #else |
1058 /* API - 04/09/03 - SPR2447 - Remove the call to AUDIO_PLAY_INFINITE and replace with AUDIO_PLAY_ONCE*/ | 1058 /* API - 04/09/03 - SPR2447 - Remove the call to AUDIO_PLAY_INFINITE and replace with AUDIO_PLAY_ONCE*/ |
1059 audio_PlaySoundID(AUDIO_BUZZER, current.ringer, 0, AUDIO_PLAY_ONCE); | 1059 audio_PlaySoundID(AUDIO_BUZZER, current.ringer, 0, AUDIO_PLAY_ONCE); |
1060 /* API - 04/09/03 - SPR2447 - END*/ | 1060 /* API - 04/09/03 - SPR2447 - END*/ |
1061 #endif | 1061 #endif |
1062 /* END RAVI */ | 1062 /* END RAVI */ |
1063 #endif | 1063 #endif |
1064 | 1064 |
1065 } | 1065 } |
1066 else | 1066 else |
1067 { | 1067 { |
1068 //store setting into PCM | 1068 //store setting into PCM |
1069 volumeSetting2Pcm=FALSE; | 1069 volumeSetting2Pcm=FALSE; |
1070 } | 1070 } |
1071 #endif | 1071 #endif |
1072 | 1072 |
1073 | 1073 |
1074 | 1074 |
1075 } | 1075 } |
1076 /******************************************************************************* | 1076 /******************************************************************************* |
1077 | 1077 |
1078 $Function: soundsVolHigh | 1078 $Function: soundsVolHigh |
1087 void soundsVolHigh(void) | 1087 void soundsVolHigh(void) |
1088 { | 1088 { |
1089 | 1089 |
1090 FFS_flashData.settings_status &= ~SettingsSilentMode; | 1090 FFS_flashData.settings_status &= ~SettingsSilentMode; |
1091 flash_write(); | 1091 flash_write(); |
1092 | 1092 |
1093 TRACE_EVENT("soundsVolHigh"); | 1093 TRACE_EVENT("soundsVolHigh"); |
1094 //Apr 05, 2005 REF: ENH 29994 xdeepadh | 1094 //Apr 05, 2005 REF: ENH 29994 xdeepadh |
1095 #ifdef FF_MIDI_RINGER | 1095 #ifdef FF_MIDI_RINGER |
1096 current.volumeSetting =(UBYTE)AS_VOLUME_HIGH; | 1096 current.volumeSetting =(UBYTE)AS_VOLUME_HIGH; |
1097 stopVolumeTimer(); | 1097 stopVolumeTimer(); |
1098 startVolumeTimer(); | 1098 startVolumeTimer(); |
1099 | 1099 |
1100 #else | 1100 #else |
1111 | 1111 |
1112 #ifdef FF_MMI_RINGTONE /* MSL Ring Tone Play */ | 1112 #ifdef FF_MMI_RINGTONE /* MSL Ring Tone Play */ |
1113 audio_PlaySoundID(AUDIO_BUZZER, CALLTONE_SELECT, 0, AUDIO_PLAY_ONCE); | 1113 audio_PlaySoundID(AUDIO_BUZZER, CALLTONE_SELECT, 0, AUDIO_PLAY_ONCE); |
1114 #else | 1114 #else |
1115 | 1115 |
1116 /* RAVI - 20-1-2006 */ | 1116 /* RAVI - 20-1-2006 */ |
1117 #ifdef NEPTUNE_BOARD | 1117 #ifdef NEPTUNE_BOARD |
1118 audio_PlaySoundID(AUDIO_BUZZER, current.ringer, current.volumeSetting, AUDIO_PLAY_ONCE); | 1118 audio_PlaySoundID(AUDIO_BUZZER, current.ringer, current.volumeSetting, AUDIO_PLAY_ONCE); |
1119 #else | 1119 #else |
1120 /* API - 04/09/03 - SPR2447 - Remove the call to AUDIO_PLAY_INFINITE and replace with AUDIO_PLAY_ONCE*/ | 1120 /* API - 04/09/03 - SPR2447 - Remove the call to AUDIO_PLAY_INFINITE and replace with AUDIO_PLAY_ONCE*/ |
1121 audio_PlaySoundID(AUDIO_BUZZER, current.ringer, 0, AUDIO_PLAY_ONCE); | 1121 audio_PlaySoundID(AUDIO_BUZZER, current.ringer, 0, AUDIO_PLAY_ONCE); |
1122 /* API - 04/09/03 - SPR2447 - END*/ | 1122 /* API - 04/09/03 - SPR2447 - END*/ |
1123 #endif | 1123 #endif |
1124 /* END RAVI */ | 1124 /* END RAVI */ |
1125 #endif | 1125 #endif |
1126 | 1126 |
1127 } | 1127 } |
1128 else | 1128 else |
1129 { | 1129 { |
1130 //store setting into PCM | 1130 //store setting into PCM |
1131 volumeSetting2Pcm=FALSE; | 1131 volumeSetting2Pcm=FALSE; |
1132 } | 1132 } |
1133 #endif | 1133 #endif |
1134 | 1134 |
1135 | 1135 |
1136 } | 1136 } |
1137 /******************************************************************************* | 1137 /******************************************************************************* |
1138 | 1138 |
1139 $Function: soundsVolInc | 1139 $Function: soundsVolInc |
1144 | 1144 |
1145 $Arguments: none | 1145 $Arguments: none |
1146 | 1146 |
1147 *******************************************************************************/ | 1147 *******************************************************************************/ |
1148 //Apr 05, 2005 REF: ENH 29994 xdeepadh | 1148 //Apr 05, 2005 REF: ENH 29994 xdeepadh |
1149 #ifndef FF_MIDI_RINGER | 1149 #ifndef FF_MIDI_RINGER |
1150 void soundsVolInc(void) | 1150 void soundsVolInc(void) |
1151 { | 1151 { |
1152 FFS_flashData.settings_status &= ~SettingsSilentMode; | 1152 FFS_flashData.settings_status &= ~SettingsSilentMode; |
1153 flash_write(); | 1153 flash_write(); |
1154 /* RAVI - 20-1-2006 */ | 1154 /* RAVI - 20-1-2006 */ |
1166 audio_PlaySoundID(AUDIO_BUZZER, CALLTONE_SELECT, 0, AUDIO_PLAY_ONCE); | 1166 audio_PlaySoundID(AUDIO_BUZZER, CALLTONE_SELECT, 0, AUDIO_PLAY_ONCE); |
1167 #else | 1167 #else |
1168 | 1168 |
1169 /* RAVI - 20-1-2006 */ | 1169 /* RAVI - 20-1-2006 */ |
1170 #ifdef NEPTUNE_BOARD | 1170 #ifdef NEPTUNE_BOARD |
1171 audio_PlaySoundID(AUDIO_BUZZER, current.ringer, current.volumeSetting, AUDIO_PLAY_ONCE); | 1171 audio_PlaySoundID(AUDIO_BUZZER, current.ringer, current.volumeSetting, AUDIO_PLAY_ONCE); |
1172 #else | 1172 #else |
1173 /* API - 04/09/03 - SPR2447 - Remove the call to AUDIO_PLAY_INFINITE and replace with AUDIO_PLAY_ONCE*/ | 1173 /* API - 04/09/03 - SPR2447 - Remove the call to AUDIO_PLAY_INFINITE and replace with AUDIO_PLAY_ONCE*/ |
1174 audio_PlaySoundID(AUDIO_BUZZER, current.ringer, 0, AUDIO_PLAY_ONCE); | 1174 audio_PlaySoundID(AUDIO_BUZZER, current.ringer, 0, AUDIO_PLAY_ONCE); |
1175 /* API - 04/09/03 - SPR2447 - END*/ | 1175 /* API - 04/09/03 - SPR2447 - END*/ |
1176 #endif | 1176 #endif |
1177 /* END RAVI */ | 1177 /* END RAVI */ |
1178 #endif | 1178 #endif |
1179 | 1179 |
1180 } | 1180 } |
1181 else | 1181 else |
1350 | 1350 |
1351 /* Are we playing a tune | 1351 /* Are we playing a tune |
1352 */ | 1352 */ |
1353 if ( LastTune ) | 1353 if ( LastTune ) |
1354 { | 1354 { |
1355 /* To stop playing the previous ring tone - RAVI - 23-12-2005 */ | 1355 /* To stop playing the previous ring tone - RAVI - 23-12-2005 */ |
1356 #ifdef NEPTUNE_BOARD | 1356 #ifdef NEPTUNE_BOARD |
1357 #ifdef FF_MMI_RINGTONE /*MSL Stop */ | 1357 #ifdef FF_MMI_RINGTONE /*MSL Stop */ |
1358 audio_StopSoundbyID( AUDIO_BUZZER, CALLTONE_SELECT); | 1358 audio_StopSoundbyID( AUDIO_BUZZER, CALLTONE_SELECT); |
1359 #else | 1359 #else |
1360 audio_StopSoundbyID( AUDIO_BUZZER, LastTune - 1 ); | 1360 audio_StopSoundbyID( AUDIO_BUZZER, LastTune - 1 ); |
1361 #endif | 1361 #endif |
1362 #else | 1362 #else |
1363 audio_StopSoundbyID( AUDIO_BUZZER, LastTune ); | 1363 audio_StopSoundbyID( AUDIO_BUZZER, LastTune ); |
1364 #endif | 1364 #endif |
1365 } | 1365 } |
1382 | 1382 |
1383 $Arguments: Melody_id | 1383 $Arguments: Melody_id |
1384 | 1384 |
1385 *******************************************************************************/ | 1385 *******************************************************************************/ |
1386 //Apr 05, 2005 REF: ENH 29994 xdeepadh | 1386 //Apr 05, 2005 REF: ENH 29994 xdeepadh |
1387 #ifndef FF_MIDI_RINGER | 1387 #ifndef FF_MIDI_RINGER |
1388 static void startPlayingMelody(UBYTE melody_id) | 1388 static void startPlayingMelody(UBYTE melody_id) |
1389 { | 1389 { |
1390 #ifdef NEPTUNE_BOARD | 1390 #ifdef NEPTUNE_BOARD |
1391 BYTE bVolumeSetting; | 1391 BYTE bVolumeSetting; |
1392 #endif | 1392 #endif |
1403 if (soundReason == SettingVolume) | 1403 if (soundReason == SettingVolume) |
1404 { | 1404 { |
1405 switch (scrollVolumeSetting) | 1405 switch (scrollVolumeSetting) |
1406 { | 1406 { |
1407 case 0: | 1407 case 0: |
1408 bVolumeSetting = SILENT_VOLUME; | 1408 bVolumeSetting = SILENT_VOLUME; |
1409 break; | 1409 break; |
1410 case 1: | 1410 case 1: |
1411 bVolumeSetting = LOW_VOLUME; | 1411 bVolumeSetting = LOW_VOLUME; |
1412 break; | 1412 break; |
1413 case 2: | 1413 case 2: |
1421 break; | 1421 break; |
1422 default: | 1422 default: |
1423 bVolumeSetting = LOW_VOLUME; | 1423 bVolumeSetting = LOW_VOLUME; |
1424 break; | 1424 break; |
1425 } | 1425 } |
1426 audio_PlaySoundID(AUDIO_BUZZER, melody_id, (BYTE)bVolumeSetting, | 1426 audio_PlaySoundID(AUDIO_BUZZER, melody_id, (BYTE)bVolumeSetting, |
1427 AUDIO_PLAY_ONCE); | 1427 AUDIO_PLAY_ONCE); |
1428 } | 1428 } |
1429 else | 1429 else |
1430 { | 1430 { |
1431 audio_PlaySoundID(AUDIO_BUZZER, melody_id, (BYTE)current.volumeSetting, | 1431 audio_PlaySoundID(AUDIO_BUZZER, melody_id, (BYTE)current.volumeSetting, |
1432 AUDIO_PLAY_ONCE); | 1432 AUDIO_PLAY_ONCE); |
1433 } | 1433 } |
1434 #else | 1434 #else |
1435 audio_PlaySoundID(AUDIO_BUZZER, melody_id, (BYTE)current.volumeSetting, | 1435 audio_PlaySoundID(AUDIO_BUZZER, melody_id, (BYTE)current.volumeSetting, |
1436 AUDIO_PLAY_ONCE); | 1436 AUDIO_PLAY_ONCE); |
1437 #endif | 1437 #endif |
1438 /* END - RAVI - 20-1-2006 */ | 1438 /* END - RAVI - 20-1-2006 */ |
1439 #endif | 1439 #endif |
1440 | 1440 |
1441 } | 1441 } |
1442 #endif | 1442 #endif |
1443 | 1443 |
1453 | 1453 |
1454 $Arguments: melody_id, selects the melody to be played | 1454 $Arguments: melody_id, selects the melody to be played |
1455 | 1455 |
1456 *******************************************************************************/ | 1456 *******************************************************************************/ |
1457 //Apr 05, 2005 REF: ENH 29994 xdeepadh | 1457 //Apr 05, 2005 REF: ENH 29994 xdeepadh |
1458 #ifndef FF_MIDI_RINGER | 1458 #ifndef FF_MIDI_RINGER |
1459 static void soundsPlayRinger( int melody_id ) | 1459 static void soundsPlayRinger( int melody_id ) |
1460 { | 1460 { |
1461 CurrentTune = melody_id; | 1461 CurrentTune = melody_id; |
1462 if (LastTune) | 1462 if (LastTune) |
1463 { | 1463 { |
1464 #ifdef FF_MMI_RINGTONE /*MSL Stop */ | 1464 #ifdef FF_MMI_RINGTONE /*MSL Stop */ |
1465 audio_StopSoundbyID( AUDIO_BUZZER, CALLTONE_SELECT); | 1465 audio_StopSoundbyID( AUDIO_BUZZER, CALLTONE_SELECT); |
1466 #else | 1466 #else |
1467 audio_StopSoundbyID (AUDIO_BUZZER,LastTune ); | 1467 audio_StopSoundbyID (AUDIO_BUZZER,LastTune ); |
1468 #endif | 1468 #endif |
1469 } | 1469 } |
1470 vsi_t_sleep(0, 5); | 1470 vsi_t_sleep(0, 5); |
1471 | 1471 |
1472 if (current.volumeSetting == increasing) | 1472 if (current.volumeSetting == increasing) |
1473 { | 1473 { |
1474 | 1474 |
1476 audio_PlaySoundID ( AUDIO_BUZZER, CALLTONE_SELECT, 0 , AUDIO_PLAY_CRESCENDO ); | 1476 audio_PlaySoundID ( AUDIO_BUZZER, CALLTONE_SELECT, 0 , AUDIO_PLAY_CRESCENDO ); |
1477 #else | 1477 #else |
1478 | 1478 |
1479 /* RAVI - 20-1-2006 */ | 1479 /* RAVI - 20-1-2006 */ |
1480 #ifdef NEPTUNE_BOARD | 1480 #ifdef NEPTUNE_BOARD |
1481 audio_PlaySoundID(AUDIO_BUZZER, CurrentTune, current.volumeSetting, AUDIO_PLAY_ONCE); | 1481 audio_PlaySoundID(AUDIO_BUZZER, CurrentTune, current.volumeSetting, AUDIO_PLAY_ONCE); |
1482 #else | 1482 #else |
1483 audio_PlaySoundID ( AUDIO_BUZZER,CurrentTune, 0 , AUDIO_PLAY_CRESCENDO ); | 1483 audio_PlaySoundID ( AUDIO_BUZZER,CurrentTune, 0 , AUDIO_PLAY_CRESCENDO ); |
1484 #endif | 1484 #endif |
1485 /* END RAVI */ | 1485 /* END RAVI */ |
1486 #endif | 1486 #endif |
1487 | 1487 |
1493 audio_PlaySoundID ( AUDIO_BUZZER, CALLTONE_SELECT, 0, AUDIO_PLAY_ONCE ); | 1493 audio_PlaySoundID ( AUDIO_BUZZER, CALLTONE_SELECT, 0, AUDIO_PLAY_ONCE ); |
1494 #else | 1494 #else |
1495 | 1495 |
1496 /* RAVI - 20-1-2006 */ | 1496 /* RAVI - 20-1-2006 */ |
1497 #ifdef NEPTUNE_BOARD | 1497 #ifdef NEPTUNE_BOARD |
1498 audio_PlaySoundID(AUDIO_BUZZER, CurrentTune, current.volumeSetting, AUDIO_PLAY_ONCE); | 1498 audio_PlaySoundID(AUDIO_BUZZER, CurrentTune, current.volumeSetting, AUDIO_PLAY_ONCE); |
1499 #else | 1499 #else |
1500 audio_PlaySoundID ( AUDIO_BUZZER,CurrentTune, 0, AUDIO_PLAY_ONCE ); | 1500 audio_PlaySoundID ( AUDIO_BUZZER,CurrentTune, 0, AUDIO_PLAY_ONCE ); |
1501 #endif | 1501 #endif |
1502 /* END RAVI */ | 1502 /* END RAVI */ |
1503 #endif | 1503 #endif |
1504 | 1504 |
1592 { | 1592 { |
1593 T_MFW_WIN * win_data = ((T_MFW_HDR *) win)->data; | 1593 T_MFW_WIN * win_data = ((T_MFW_HDR *) win)->data; |
1594 T_MELODY_INFO * data = (T_MELODY_INFO *)win_data->user; | 1594 T_MELODY_INFO * data = (T_MELODY_INFO *)win_data->user; |
1595 UBYTE i; | 1595 UBYTE i; |
1596 UBYTE numberOfMelodies=0; | 1596 UBYTE numberOfMelodies=0; |
1597 #ifdef FF_MIDI_RINGER | 1597 #ifdef FF_MIDI_RINGER |
1598 UBYTE file_count=0; | 1598 UBYTE file_count=0; |
1599 #endif | 1599 #endif |
1600 ListWinInfo * mnu_data = (ListWinInfo *)parameter; | 1600 ListWinInfo * mnu_data = (ListWinInfo *)parameter; |
1601 | 1601 |
1602 TRACE_FUNCTION (">>>>> melody_exec_cb()"); | 1602 TRACE_FUNCTION (">>>>> melody_exec_cb()"); |
1615 { | 1615 { |
1616 TRACE_EVENT("Failed memory alloc 1 "); | 1616 TRACE_EVENT("Failed memory alloc 1 "); |
1617 return; | 1617 return; |
1618 } | 1618 } |
1619 /*Apr 05, 2005 REF: ENH 29994 xdeepadh */ | 1619 /*Apr 05, 2005 REF: ENH 29994 xdeepadh */ |
1620 #ifdef FF_MIDI_RINGER | 1620 #ifdef FF_MIDI_RINGER |
1621 numberOfMelodies = sounds_midi_return_file_number(); | 1621 numberOfMelodies = sounds_midi_return_file_number(); |
1622 TRACE_EVENT_P1("numberOfMelodies is %d",numberOfMelodies); | 1622 TRACE_EVENT_P1("numberOfMelodies is %d",numberOfMelodies); |
1623 /*In case no files have been loaded display info message */ | 1623 /*In case no files have been loaded display info message */ |
1624 if(numberOfMelodies <= 0) | 1624 if(numberOfMelodies <= 0) |
1625 { | 1625 { |
1643 { | 1643 { |
1644 mnuInitDataItem(&data->menu_list_data->List[i]); | 1644 mnuInitDataItem(&data->menu_list_data->List[i]); |
1645 data->menu_list_data->List[i].flagFunc = item_flag_none; | 1645 data->menu_list_data->List[i].flagFunc = item_flag_none; |
1646 | 1646 |
1647 /* Display the midi file names in the list */ | 1647 /* Display the midi file names in the list */ |
1648 /*Apr 05, 2005 REF: ENH 29994 xdeepadh */ | 1648 /*Apr 05, 2005 REF: ENH 29994 xdeepadh */ |
1649 #ifdef FF_MIDI_RINGER | 1649 #ifdef FF_MIDI_RINGER |
1650 data->menu_list_data->List[i].str = (char *)sounds_midi_return_file_name(file_count++); | 1650 data->menu_list_data->List[i].str = (char *)sounds_midi_return_file_name(file_count++); |
1651 #else | 1651 #else |
1652 data->menu_list_data->List[i].str = (char *)MelodyTable[i]; | 1652 data->menu_list_data->List[i].str = (char *)MelodyTable[i]; |
1653 #endif | 1653 #endif |
1654 } | 1654 } |
1663 data->menu_list_data->KeyEvents = KEY_ALL; | 1663 data->menu_list_data->KeyEvents = KEY_ALL; |
1664 data->menu_list_data->Reason = 0; | 1664 data->menu_list_data->Reason = 0; |
1665 data->menu_list_data->Strings = TRUE; | 1665 data->menu_list_data->Strings = TRUE; |
1666 data->menu_list_data->Attr = (MfwMnuAttr*)&melody_menuAttrib; | 1666 data->menu_list_data->Attr = (MfwMnuAttr*)&melody_menuAttrib; |
1667 /* Apr 05, 2005 REF: ENH 29994 xdeepadh */ | 1667 /* Apr 05, 2005 REF: ENH 29994 xdeepadh */ |
1668 #ifdef FF_MIDI_RINGER | 1668 #ifdef FF_MIDI_RINGER |
1669 data->menu_list_data->Attr->hdrId = TxtMidiFileTitle; | 1669 data->menu_list_data->Attr->hdrId = TxtMidiFileTitle; |
1670 #endif | 1670 #endif |
1671 data->menu_list_data->autoDestroy = FALSE; | 1671 data->menu_list_data->autoDestroy = FALSE; |
1672 listDisplayListMenu(win, data->menu_list_data,(ListCbFunc)MelodyList_cb,0); | 1672 listDisplayListMenu(win, data->menu_list_data,(ListCbFunc)MelodyList_cb,0); |
1673 | 1673 |
1674 #ifdef FF_MIDI_RINGER | 1674 #ifdef FF_MIDI_RINGER |
1675 selected_tone=data->menu_list_data->ListPosition-1; | 1675 selected_tone=data->menu_list_data->ListPosition-1; |
1676 stopPlayerTimer(); | 1676 stopPlayerTimer(); |
1677 startPlayerTimer(); | 1677 startPlayerTimer(); |
1678 #endif | 1678 #endif |
1679 | 1679 |
1680 /* Start playing first ringtone on initial list display - RAVI - 23-12-2005 */ | 1680 /* Start playing first ringtone on initial list display - RAVI - 23-12-2005 */ |
1681 #ifdef NEPTUNE_BOARD | 1681 #ifdef NEPTUNE_BOARD |
1682 if(getMelodyListStatus()== TRUE) | 1682 if(getMelodyListStatus()== TRUE) |
1683 { | 1683 { |
1684 stopPlayingMelody (); | 1684 stopPlayingMelody (); |
1685 startPlayingMelody(0); /* Play the first menu item which is being selected */ | 1685 startPlayingMelody(0); /* Play the first menu item which is being selected */ |
1686 LastTune = FIRST_TONE_PLAYED; /* First Menu Item - Ringer is selected */ | 1686 LastTune = FIRST_TONE_PLAYED; /* First Menu Item - Ringer is selected */ |
1687 } | 1687 } |
1688 #endif | 1688 #endif |
1689 /* RAVI - 23-12-2005 */ | 1689 /* RAVI - 23-12-2005 */ |
1690 | 1690 |
1691 break; | 1691 break; |
1692 | 1692 |
1693 case E_START_MELODY: | 1693 case E_START_MELODY: |
1694 /* Apr 05, 2005 REF: ENH 29994 xdeepadh */ | 1694 /* Apr 05, 2005 REF: ENH 29994 xdeepadh */ |
1695 /* Play the midi file when the user has scrolled */ | 1695 /* Play the midi file when the user has scrolled */ |
1696 #ifdef FF_MIDI_RINGER | 1696 #ifdef FF_MIDI_RINGER |
1697 selected_tone=mnu_data->MenuData.ListPosition; | 1697 selected_tone=mnu_data->MenuData.ListPosition; |
1698 stopPlayerTimer(); | 1698 stopPlayerTimer(); |
1699 startPlayerTimer(); | 1699 startPlayerTimer(); |
1700 #else | 1700 #else |
1701 | 1701 |
1702 /* When cursor moved - Stop playing old and start playing new - RAVI - 23-12-2005 */ | 1702 /* When cursor moved - Stop playing old and start playing new - RAVI - 23-12-2005 */ |
1703 #ifndef NEPTUNE_BOARD | 1703 #ifndef NEPTUNE_BOARD |
1704 startPlayingMelody(mnu_data->MenuData.ListPosition); | 1704 startPlayingMelody(mnu_data->MenuData.ListPosition); |
1705 #else | 1705 #else |
1706 stopPlayingMelody(); | 1706 stopPlayingMelody(); |
1707 startPlayingMelody(mnu_data->MenuData.ListPosition); | 1707 startPlayingMelody(mnu_data->MenuData.ListPosition); |
1708 LastTune = mnu_data->MenuData.ListPosition+1; /* Store the late tune in global variable */ | 1708 LastTune = mnu_data->MenuData.ListPosition+1; /* Store the late tune in global variable */ |
1709 #endif /* END RAVI */ | 1709 #endif /* END RAVI */ |
1710 #endif | 1710 #endif |
1711 | 1711 |
1712 break; | 1712 break; |
1713 | 1713 |
1714 case E_RETURN: | 1714 case E_RETURN: |
1732 void MelodyList_cb(T_MFW_HND * Parent, ListMenuData * ListData) | 1732 void MelodyList_cb(T_MFW_HND * Parent, ListMenuData * ListData) |
1733 { | 1733 { |
1734 T_MFW_WIN * win_data = ((T_MFW_HDR *)Parent)->data; | 1734 T_MFW_WIN * win_data = ((T_MFW_HDR *)Parent)->data; |
1735 T_MELODY_INFO * data = (T_MELODY_INFO *)win_data->user; | 1735 T_MELODY_INFO * data = (T_MELODY_INFO *)win_data->user; |
1736 /*Apr 05, 2005 REF: ENH 29994 xdeepadh */ | 1736 /*Apr 05, 2005 REF: ENH 29994 xdeepadh */ |
1737 #ifdef FF_MIDI_RINGER | 1737 #ifdef FF_MIDI_RINGER |
1738 T_AS_PLAYER_TYPE player_type; | 1738 T_AS_PLAYER_TYPE player_type; |
1739 | 1739 |
1740 #ifdef FF_MIDI_LOAD_FROM_MEM | 1740 #ifdef FF_MIDI_LOAD_FROM_MEM |
1741 T_MELODY memory_pointer; | 1741 T_MELODY memory_pointer; |
1742 #else | 1742 #else |
1748 || (ListData->Reason EQ LISTS_REASON_HANGUP)) /* sbh - added hangup key */ | 1748 || (ListData->Reason EQ LISTS_REASON_HANGUP)) /* sbh - added hangup key */ |
1749 { | 1749 { |
1750 | 1750 |
1751 /*Stop playing ringtone on press of BACK/ CLEAR/ HANGUP - RAVI - 23-12-2005 - SR 13873 */ | 1751 /*Stop playing ringtone on press of BACK/ CLEAR/ HANGUP - RAVI - 23-12-2005 - SR 13873 */ |
1752 #ifdef NEPTUNE_BOARD | 1752 #ifdef NEPTUNE_BOARD |
1753 stopPlayingMelody(); | 1753 stopPlayingMelody(); |
1754 #endif | 1754 #endif |
1755 /* END RAVI - 23-12-2005 */ | 1755 /* END RAVI - 23-12-2005 */ |
1756 | 1756 |
1757 } | 1757 } |
1758 else if(ListData->Reason EQ LISTS_REASON_SELECT) | 1758 else if(ListData->Reason EQ LISTS_REASON_SELECT) |
1759 { | 1759 { |
1778 #endif | 1778 #endif |
1779 | 1779 |
1780 break; | 1780 break; |
1781 | 1781 |
1782 case SettingSMSTone: | 1782 case SettingSMSTone: |
1783 | 1783 |
1784 #ifdef FF_MIDI_RINGER //Use Midi Player | 1784 #ifdef FF_MIDI_RINGER //Use Midi Player |
1785 #ifdef FF_MIDI_LOAD_FROM_MEM //If ULC | 1785 #ifdef FF_MIDI_LOAD_FROM_MEM //If ULC |
1786 memory_pointer=sounds_midi_return_memory_location(ListData->ListPosition); | 1786 memory_pointer=sounds_midi_return_memory_location(ListData->ListPosition); |
1787 player_type=mfw_ringer_deduce_player_type(memory_pointer.melody_name); | 1787 player_type=mfw_ringer_deduce_player_type(memory_pointer.melody_name); |
1788 mfw_ringer_set_memory(player_type,AS_RINGER_MODE_SMS,(UINT32*)memory_pointer.melody,(UINT32)memory_pointer.melody_size); | 1788 mfw_ringer_set_memory(player_type,AS_RINGER_MODE_SMS,(UINT32*)memory_pointer.melody,(UINT32)memory_pointer.melody_size); |
1792 mfw_ringer_set_file(player_type,AS_RINGER_MODE_SMS,filename); | 1792 mfw_ringer_set_file(player_type,AS_RINGER_MODE_SMS,filename); |
1793 #endif | 1793 #endif |
1794 #else/*Use Buzzer*/ | 1794 #else/*Use Buzzer*/ |
1795 stopPlayingMelody(); | 1795 stopPlayingMelody(); |
1796 current.SMSTone = ListData->ListPosition; /* For SMS tones - starting from 40 */ | 1796 current.SMSTone = ListData->ListPosition; /* For SMS tones - starting from 40 */ |
1797 /* Store in FFS - RAVI - 23-12-2005 - SR 13873 */ | 1797 /* Store in FFS - RAVI - 23-12-2005 - SR 13873 */ |
1798 #ifdef NEPTUNE_BOARD | 1798 #ifdef NEPTUNE_BOARD |
1799 FFS_flashData.SMSTone= current.SMSTone; | 1799 FFS_flashData.SMSTone= current.SMSTone; |
1800 flash_write(); | 1800 flash_write(); |
1801 #endif | 1801 #endif |
1802 /* END RAVI - 23-12-2005 */ | 1802 /* END RAVI - 23-12-2005 */ |
1803 #endif | 1803 #endif |
1804 | 1804 |
1805 break; | 1805 break; |
1816 mfw_ringer_set_file(player_type,AS_RINGER_MODE_ALARM,filename); | 1816 mfw_ringer_set_file(player_type,AS_RINGER_MODE_ALARM,filename); |
1817 #endif | 1817 #endif |
1818 #else/*Use Buzzer*/ | 1818 #else/*Use Buzzer*/ |
1819 // need to check alarm status MZ. | 1819 // need to check alarm status MZ. |
1820 current.AlarmOn = ListData->ListPosition; | 1820 current.AlarmOn = ListData->ListPosition; |
1821 /* Store in FFS - RAVI - 23-12-2005 - SR 13873 */ | 1821 /* Store in FFS - RAVI - 23-12-2005 - SR 13873 */ |
1822 #ifdef NEPTUNE_BOARD | 1822 #ifdef NEPTUNE_BOARD |
1823 FFS_flashData.AlarmOn= current.AlarmOn; | 1823 FFS_flashData.AlarmOn= current.AlarmOn; |
1824 flash_write(); | 1824 flash_write(); |
1825 #endif | 1825 #endif |
1826 /* END RAVI - 23-12-2005 */ | 1826 /* END RAVI - 23-12-2005 */ |
1827 #endif | 1827 #endif |
1828 | 1828 |
1829 default: | 1829 default: |
1830 break; | 1830 break; |
1831 } | 1831 } |
1832 /* Apr 05, 2005 REF: ENH 29994 xdeepadh */ | 1832 /* Apr 05, 2005 REF: ENH 29994 xdeepadh */ |
1833 /* Store selected melody in PCM storage. */ | 1833 /* Store selected melody in PCM storage. */ |
1834 #ifdef FF_MIDI_RINGER | 1834 #ifdef FF_MIDI_RINGER |
1835 sounds_show_info(0, TxtSelected, TxtNull, NULL); | 1835 sounds_show_info(0, TxtSelected, TxtNull, NULL); |
1836 #endif | 1836 #endif |
1837 } | 1837 } |
1838 | 1838 |
1839 #ifdef FF_MIDI_RINGER | 1839 #ifdef FF_MIDI_RINGER |
1840 stopPlayerTimer(); | 1840 stopPlayerTimer(); |
1841 // DRT:OMAPS00163752 including changes from OMAPS00151417 (x0086292) | 1841 // DRT:OMAPS00163752 including changes from OMAPS00151417 (x0086292) |
1842 //mfw_player_stop(sounds_midi_player_stop_cb); | 1842 //mfw_player_stop(sounds_midi_player_stop_cb); |
1843 #else | 1843 #else |
1844 stopPlayingMelody(); | 1844 stopPlayingMelody(); |
1845 #endif | 1845 #endif |
1880 win_delete (data->sounds_win); | 1880 win_delete (data->sounds_win); |
1881 | 1881 |
1882 /* | 1882 /* |
1883 * Free Memory | 1883 * Free Memory |
1884 */ | 1884 */ |
1885 //Apr 05, 2005 REF: ENH 29994 xdeepadh | 1885 //Apr 05, 2005 REF: ENH 29994 xdeepadh |
1886 #ifdef FF_MIDI_RINGER | 1886 #ifdef FF_MIDI_RINGER |
1887 numberOfMelodies = sounds_midi_return_file_number(); | 1887 numberOfMelodies = sounds_midi_return_file_number(); |
1888 #else | 1888 #else |
1889 numberOfMelodies = resource_GetListCount(RES_MELODY); | 1889 numberOfMelodies = resource_GetListCount(RES_MELODY); |
1890 #endif | 1890 #endif |
1891 | 1891 |
1893 { | 1893 { |
1894 FREE_MEMORY ((void *)data->menu_list_data->List, numberOfMelodies * sizeof (T_MFW_MNU_ITEM)); | 1894 FREE_MEMORY ((void *)data->menu_list_data->List, numberOfMelodies * sizeof (T_MFW_MNU_ITEM)); |
1895 FREE_MEMORY ((void *)data->menu_list_data, sizeof (ListMenuData)); | 1895 FREE_MEMORY ((void *)data->menu_list_data, sizeof (ListMenuData)); |
1896 } | 1896 } |
1897 FREE_MEMORY ((void *)data, sizeof (T_MELODY_INFO)); | 1897 FREE_MEMORY ((void *)data, sizeof (T_MELODY_INFO)); |
1898 //Apr 05, 2005 REF: ENH 29994 xdeepadh | 1898 //Apr 05, 2005 REF: ENH 29994 xdeepadh |
1899 #ifdef FF_MIDI_RINGER | 1899 #ifdef FF_MIDI_RINGER |
1900 //Delete the timer used for scrolling | 1900 //Delete the timer used for scrolling |
1901 if(hPlayerStartTimer!=NULL) | 1901 if(hPlayerStartTimer!=NULL) |
1902 timDelete(hPlayerStartTimer); | 1902 timDelete(hPlayerStartTimer); |
1903 #endif | 1903 #endif |
1904 | 1904 |
2140 | 2140 |
2141 $Arguments: e, event, tc timer context | 2141 $Arguments: e, event, tc timer context |
2142 | 2142 |
2143 *******************************************************************************/ | 2143 *******************************************************************************/ |
2144 //Apr 05, 2005 REF: ENH 29994 xdeepadh | 2144 //Apr 05, 2005 REF: ENH 29994 xdeepadh |
2145 #ifndef FF_MIDI_RINGER | 2145 #ifndef FF_MIDI_RINGER |
2146 static int playCurrentSound( MfwEvt e, MfwTim *tc ) | 2146 static int playCurrentSound( MfwEvt e, MfwTim *tc ) |
2147 { | 2147 { |
2148 soundsPlayRinger(current.ringer); | 2148 soundsPlayRinger(current.ringer); |
2149 | 2149 |
2150 // stop running timer (One shot mode only) | 2150 // stop running timer (One shot mode only) |
2466 bookMenuDestroy(call_data.win_menu); | 2466 bookMenuDestroy(call_data.win_menu); |
2467 /* | 2467 /* |
2468 If volume settings dialog timed out while in the incoming call, allow the | 2468 If volume settings dialog timed out while in the incoming call, allow the |
2469 ringer to continue ringing. MZ 9/4/01 | 2469 ringer to continue ringing. MZ 9/4/01 |
2470 */ | 2470 */ |
2471 #ifdef FF_MIDI_RINGER | 2471 #ifdef FF_MIDI_RINGER |
2472 mfw_ringer_start(AS_RINGER_MODE_IC,true,sounds_midi_ringer_start_cb); | 2472 mfw_ringer_start(AS_RINGER_MODE_IC,true,sounds_midi_ringer_start_cb); |
2473 #else | 2473 #else |
2474 /* Volume Setting for Silent */ | 2474 /* Volume Setting for Silent */ |
2475 startPlayingMelody(getCurrentRingerSettings()); | 2475 startPlayingMelody(getCurrentRingerSettings()); |
2476 #endif | 2476 #endif |
2477 | 2477 |
2478 | 2478 |
2479 } | 2479 } |
2480 else if (idle_data->info_win != NULL ) | 2480 else if (idle_data->info_win != NULL ) |
2481 { | 2481 { |
2482 bookMenuDestroy(idle_data->info_win); | 2482 bookMenuDestroy(idle_data->info_win); |
2499 * | 2499 * |
2500 * @param None. | 2500 * @param None. |
2501 * | 2501 * |
2502 * @return None | 2502 * @return None |
2503 * | 2503 * |
2504 * @see | 2504 * @see |
2505 */ | 2505 */ |
2506 /* =========================================================== */ | 2506 /* =========================================================== */ |
2507 | 2507 |
2508 void restorePreviousVolumeSetting(void) | 2508 void restorePreviousVolumeSetting(void) |
2509 { | 2509 { |
2511 } | 2511 } |
2512 | 2512 |
2513 /* ===========================================================*/ | 2513 /* ===========================================================*/ |
2514 /** | 2514 /** |
2515 * volumeMenuScrollUp () when menu button is moved up then this function will get called which | 2515 * volumeMenuScrollUp () when menu button is moved up then this function will get called which |
2516 * decrements value for the global variable used to maintain the volume setting while scrolling | 2516 * decrements value for the global variable used to maintain the volume setting while scrolling |
2517 * through the menu. | 2517 * through the menu. |
2518 * | 2518 * |
2519 * @param None. | 2519 * @param None. |
2520 * | 2520 * |
2521 * @return None | 2521 * @return None |
2522 * | 2522 * |
2523 * @see | 2523 * @see |
2524 */ | 2524 */ |
2525 /* =========================================================== */ | 2525 /* =========================================================== */ |
2526 void volumeMenuScrollUp (void) | 2526 void volumeMenuScrollUp (void) |
2527 { | 2527 { |
2528 /* Decrement Volume setting when scroll up */ | 2528 /* Decrement Volume setting when scroll up */ |
2529 scrollVolumeSetting = scrollVolumeSetting - 1 ; | 2529 scrollVolumeSetting = scrollVolumeSetting - 1 ; |
2530 | 2530 |
2531 if (scrollVolumeSetting < SILENT_SETTING) | 2531 if (scrollVolumeSetting < SILENT_SETTING) |
2532 { | 2532 { |
2533 scrollVolumeSetting = MAX_VOLUME_SETTING; | 2533 scrollVolumeSetting = MAX_VOLUME_SETTING; |
2534 } | 2534 } |
2535 | 2535 |
2539 | 2539 |
2540 | 2540 |
2541 /* ===========================================================*/ | 2541 /* ===========================================================*/ |
2542 /** | 2542 /** |
2543 * volumeMenuScrollDown () when menu button is moved down then this function will get called which | 2543 * volumeMenuScrollDown () when menu button is moved down then this function will get called which |
2544 * increments value for the global variable used to maintain the volume setting while scrolling | 2544 * increments value for the global variable used to maintain the volume setting while scrolling |
2545 * through the menu. | 2545 * through the menu. |
2546 * | 2546 * |
2547 * @param None. | 2547 * @param None. |
2548 * | 2548 * |
2549 * @return None | 2549 * @return None |
2550 * | 2550 * |
2551 * @see | 2551 * @see |
2552 */ | 2552 */ |
2553 /* =========================================================== */ | 2553 /* =========================================================== */ |
2554 void volumeMenuScrollDown (void) | 2554 void volumeMenuScrollDown (void) |
2555 { | 2555 { |
2556 /* Increment Volume setting when scroll down */ | 2556 /* Increment Volume setting when scroll down */ |
2557 scrollVolumeSetting = scrollVolumeSetting + 1; | 2557 scrollVolumeSetting = scrollVolumeSetting + 1; |
2558 | 2558 |
2559 if (scrollVolumeSetting > MAX_VOLUME_SETTING) | 2559 if (scrollVolumeSetting > MAX_VOLUME_SETTING) |
2560 { | 2560 { |
2561 scrollVolumeSetting = SILENT_SETTING; | 2561 scrollVolumeSetting = SILENT_SETTING; |
2562 } | 2562 } |
2563 | 2563 |
2565 vsi_t_sleep(0,20); | 2565 vsi_t_sleep(0,20); |
2566 } | 2566 } |
2567 | 2567 |
2568 /* ===========================================================*/ | 2568 /* ===========================================================*/ |
2569 /** | 2569 /** |
2570 * volumeMenuStartPlaying () Will start playing the default melody with the specified volume | 2570 * volumeMenuStartPlaying () Will start playing the default melody with the specified volume |
2571 * control. | 2571 * control. |
2572 * | 2572 * |
2573 * @param None. | 2573 * @param None. |
2574 * | 2574 * |
2575 * @return None | 2575 * @return None |
2576 * | 2576 * |
2577 * @see | 2577 * @see |
2578 */ | 2578 */ |
2579 /* =========================================================== */ | 2579 /* =========================================================== */ |
2580 void volumeMenuStartPlaying(void) | 2580 void volumeMenuStartPlaying(void) |
2581 { | 2581 { |
2582 if(soundReason == SettingVolume) | 2582 if(soundReason == SettingVolume) |
2586 } | 2586 } |
2587 } | 2587 } |
2588 | 2588 |
2589 /* ===========================================================*/ | 2589 /* ===========================================================*/ |
2590 /** | 2590 /** |
2591 * volumeMenuStopPlaying () Will stop playing the default melody with the specified volume | 2591 * volumeMenuStopPlaying () Will stop playing the default melody with the specified volume |
2592 * control. | 2592 * control. |
2593 * | 2593 * |
2594 * @param None. | 2594 * @param None. |
2595 * | 2595 * |
2596 * @return None | 2596 * @return None |
2597 * | 2597 * |
2598 * @see | 2598 * @see |
2599 */ | 2599 */ |
2600 /* =========================================================== */ | 2600 /* =========================================================== */ |
2601 void volumeMenuStopPlaying() | 2601 void volumeMenuStopPlaying() |
2602 { | 2602 { |
2603 if(soundReason == SettingVolume) | 2603 if(soundReason == SettingVolume) |
2604 { | 2604 { |
2605 stopPlayingMelody (); | 2605 stopPlayingMelody (); |
2606 } | 2606 } |
2607 } | 2607 } |
2608 #endif | 2608 #endif |
2609 /* END RAVI */ | 2609 /* END RAVI */ |
2610 | 2610 |
2611 /******************************************************************************* | 2611 /******************************************************************************* |
2672 //Create 4 second ringer delay timer. | 2672 //Create 4 second ringer delay timer. |
2673 if(hRingerVolSettingTimeOut == NULL ) | 2673 if(hRingerVolSettingTimeOut == NULL ) |
2674 { | 2674 { |
2675 if(call_data.call_direction == MFW_CM_MTC) | 2675 if(call_data.call_direction == MFW_CM_MTC) |
2676 { | 2676 { |
2677 /* RAVI - 20-1-2006 */ | 2677 /* RAVI - 20-1-2006 */ |
2678 #ifdef NEPTUNE_BOARD | 2678 #ifdef NEPTUNE_BOARD |
2679 ; /* do nothing */ | 2679 ; /* do nothing */ |
2680 #else | 2680 #else |
2681 hRingerVolSettingTimeOut = timCreate(call_data.win, TIM4SECOND, (MfwCb)volumeSettingTimeOut); | 2681 hRingerVolSettingTimeOut = timCreate(call_data.win, TIM4SECOND, (MfwCb)volumeSettingTimeOut); |
2682 #endif | 2682 #endif |
2685 else | 2685 else |
2686 { | 2686 { |
2687 #ifdef NEPTUNE_BOARD | 2687 #ifdef NEPTUNE_BOARD |
2688 ; /* do nothing */ | 2688 ; /* do nothing */ |
2689 #else | 2689 #else |
2690 hRingerVolSettingTimeOut = timCreate(idle_data->win, TIM4SECOND, (MfwCb)volumeSettingTimeOut); | 2690 hRingerVolSettingTimeOut = timCreate(idle_data->win, TIM4SECOND, (MfwCb)volumeSettingTimeOut); |
2691 #endif | 2691 #endif |
2692 } | 2692 } |
2693 } | 2693 } |
2694 | 2694 |
2695 if ( hRingerVolSettingTimeOut != NULL ) | 2695 if ( hRingerVolSettingTimeOut != NULL ) |
2700 /* Initialize the scrolling variable - When volume menu is activated */ | 2700 /* Initialize the scrolling variable - When volume menu is activated */ |
2701 scrollVolumeSetting = 0; | 2701 scrollVolumeSetting = 0; |
2702 lastVolumeSetting = current.volumeSetting; | 2702 lastVolumeSetting = current.volumeSetting; |
2703 #endif | 2703 #endif |
2704 | 2704 |
2705 | 2705 |
2706 #ifndef NEPTUNE_BOARD | 2706 #ifndef NEPTUNE_BOARD |
2707 timStart(hRingerVolSettingTimeOut); | 2707 timStart(hRingerVolSettingTimeOut); |
2708 #endif | 2708 #endif |
2709 /* END RAVI */ | 2709 /* END RAVI */ |
2710 | 2710 |
2725 int soundsRinger( MfwMnu *m, MfwMnuItem *i ) | 2725 int soundsRinger( MfwMnu *m, MfwMnuItem *i ) |
2726 { | 2726 { |
2727 T_MFW_HND win; | 2727 T_MFW_HND win; |
2728 T_MFW_HND parent_win = mfw_parent(mfw_header()); | 2728 T_MFW_HND parent_win = mfw_parent(mfw_header()); |
2729 /*Apr 05, 2005 REF: ENH 29994 xdeepadh */ | 2729 /*Apr 05, 2005 REF: ENH 29994 xdeepadh */ |
2730 #ifdef FF_MIDI_RINGER | 2730 #ifdef FF_MIDI_RINGER |
2731 int numberOfMelodies=0; | 2731 int numberOfMelodies=0; |
2732 | 2732 |
2733 TRACE_EVENT("soundsRinger"); | 2733 TRACE_EVENT("soundsRinger"); |
2734 //Sep 11, 2006 DR: OMAPS00094182 xrashmic | 2734 //Sep 11, 2006 DR: OMAPS00094182 xrashmic |
2735 TRACE_EVENT("populating files"); | 2735 TRACE_EVENT("populating files"); |
2736 sounds_midi_init(); | 2736 sounds_midi_init(); |
2737 | 2737 |
2738 | 2738 |
2739 | 2739 |
2740 numberOfMelodies = sounds_midi_return_file_number(); | 2740 numberOfMelodies = sounds_midi_return_file_number(); |
2741 TRACE_EVENT_P1("numberOfMelodies is %d",numberOfMelodies); | 2741 TRACE_EVENT_P1("numberOfMelodies is %d",numberOfMelodies); |
2742 | 2742 |
2743 if(numberOfMelodies <= 0) | 2743 if(numberOfMelodies <= 0) |
2744 { | 2744 { |
2752 mfw_ringer_set_audiopath(); | 2752 mfw_ringer_set_audiopath(); |
2753 mfw_player_midi_set_params(FF_MIDI_VOICE_LIMIT,MIDI_CHANNEL_STEREO); | 2753 mfw_player_midi_set_params(FF_MIDI_VOICE_LIMIT,MIDI_CHANNEL_STEREO); |
2754 //Nov 02, 2005 REF:ER OMAPS00039044 xdeepadh | 2754 //Nov 02, 2005 REF:ER OMAPS00039044 xdeepadh |
2755 //Set the Mp3 Parameters .Size of the file where the melody must start is set 0(from beginning) | 2755 //Set the Mp3 Parameters .Size of the file where the melody must start is set 0(from beginning) |
2756 //and channel is set to stereo. | 2756 //and channel is set to stereo. |
2757 #ifdef FF_MP3_RINGER | 2757 #ifdef FF_MP3_RINGER |
2758 mfw_player_mp3_set_params(MP3_PLAY_FROM_START,MP3_CHANNEL_STEREO); | 2758 mfw_player_mp3_set_params(MP3_PLAY_FROM_START,MP3_CHANNEL_STEREO); |
2759 #endif //FF_MP3_RINGER | 2759 #endif //FF_MP3_RINGER |
2760 | 2760 |
2761 //Nov 21, 2005 REF:ER OMAPS00057430 nekkareb | 2761 //Nov 21, 2005 REF:ER OMAPS00057430 nekkareb |
2762 //Set the AAC Parameters .Size of the file where the melody must start is set 0(from beginning) | 2762 //Set the AAC Parameters .Size of the file where the melody must start is set 0(from beginning) |
2763 //and channel is set to stereo. | 2763 //and channel is set to stereo. |
2764 #ifdef FF_AAC_RINGER | 2764 #ifdef FF_AAC_RINGER |
2765 mfw_player_aac_set_params(AAC_PLAY_FROM_START,AAC_CHANNEL_STEREO); | 2765 mfw_player_aac_set_params(AAC_PLAY_FROM_START,AAC_CHANNEL_STEREO); |
2766 #endif //FF_AAC_RINGER | 2766 #endif //FF_AAC_RINGER |
2767 | 2767 |
2768 | 2768 |
2769 hPlayerStartTimer = timCreate( 0, TIMHALFSECOND, (MfwCb)playCurrentMelody); | 2769 hPlayerStartTimer = timCreate( 0, TIMHALFSECOND, (MfwCb)playCurrentMelody); |
2770 win = buildMelodyMenu(parent_win); | 2770 win = buildMelodyMenu(parent_win); |
2771 | 2771 |
2772 if (win NEQ NULL) | 2772 if (win NEQ NULL) |
2773 { | 2773 { |
2774 SEND_EVENT (win, E_INIT, 0, 0); | 2774 SEND_EVENT (win, E_INIT, 0, 0); |
2775 } | 2775 } |
2776 return MFW_EVENT_CONSUMED; | 2776 return MFW_EVENT_CONSUMED; |
3084 FFS_flashData.settings_status |= SettingsKeypadClick; | 3084 FFS_flashData.settings_status |= SettingsKeypadClick; |
3085 | 3085 |
3086 /* RAVI - 20-1-2006 */ | 3086 /* RAVI - 20-1-2006 */ |
3087 /* play KeypadClick */ | 3087 /* play KeypadClick */ |
3088 #ifdef NEPTUNE_BOARD | 3088 #ifdef NEPTUNE_BOARD |
3089 audio_PlaySoundID(0, TONES_KEYBEEP, current.volumeSetting, AUDIO_PLAY_ONCE); | 3089 audio_PlaySoundID(0, TONES_KEYBEEP, current.volumeSetting, AUDIO_PLAY_ONCE); |
3090 #else | 3090 #else |
3091 audio_PlaySoundID(0, TONES_KEYBEEP, 5, AUDIO_PLAY_ONCE ); /* GW#2355 /CQ11341 */ | 3091 audio_PlaySoundID(0, TONES_KEYBEEP, 5, AUDIO_PLAY_ONCE ); /* GW#2355 /CQ11341 */ |
3092 #endif | 3092 #endif |
3093 /* END RAVI */ | 3093 /* END RAVI */ |
3094 | 3094 |
3095 sounds_data.local_status = ACTIVATE_CONFIRM; | 3095 sounds_data.local_status = ACTIVATE_CONFIRM; |
3360 // Description: INCALL SCREEN ?ADJUSTING THE VOLUME | 3360 // Description: INCALL SCREEN ?ADJUSTING THE VOLUME |
3361 // Fix: Added these functions to set the speaker volume to various levels. | 3361 // Fix: Added these functions to set the speaker volume to various levels. |
3362 | 3362 |
3363 void SetVolumeLevel1(void) | 3363 void SetVolumeLevel1(void) |
3364 { | 3364 { |
3365 | 3365 |
3366 | 3366 |
3367 FFS_flashData.output_volume = OutVolumeLevel1; | 3367 FFS_flashData.output_volume = OutVolumeLevel1; |
3368 // Set the volume | 3368 // Set the volume |
3369 mmeSetVolume (1, FFS_flashData.output_volume); | 3369 mmeSetVolume (1, FFS_flashData.output_volume); |
3370 //write the value to the FFS | 3370 //write the value to the FFS |
3371 flash_write(); | 3371 flash_write(); |
3372 | 3372 |
3373 } | 3373 } |
3374 void SetVolumeLevel2(void) | 3374 void SetVolumeLevel2(void) |
3375 { | 3375 { |
3376 | 3376 |
3377 | 3377 |
3378 FFS_flashData.output_volume = OutVolumeLevel2; | 3378 FFS_flashData.output_volume = OutVolumeLevel2; |
3379 // Set the volume | 3379 // Set the volume |
3380 mmeSetVolume (1, FFS_flashData.output_volume); | 3380 mmeSetVolume (1, FFS_flashData.output_volume); |
3381 //write the value to the FFS | 3381 //write the value to the FFS |
3382 flash_write(); | 3382 flash_write(); |
3383 | 3383 |
3384 } | 3384 } |
3385 void SetVolumeLevel3(void) | 3385 void SetVolumeLevel3(void) |
3386 { | 3386 { |
3387 | 3387 |
3388 | 3388 |
3389 FFS_flashData.output_volume = OutVolumeLevel3; | 3389 FFS_flashData.output_volume = OutVolumeLevel3; |
3390 // Set the volume | 3390 // Set the volume |
3391 mmeSetVolume (1, FFS_flashData.output_volume); | 3391 mmeSetVolume (1, FFS_flashData.output_volume); |
3392 //write the value to the FFS | 3392 //write the value to the FFS |
3393 flash_write(); | 3393 flash_write(); |
3394 | 3394 |
3395 } | 3395 } |
3396 void SetVolumeLevel4(void) | 3396 void SetVolumeLevel4(void) |
3397 { | 3397 { |
3398 | 3398 |
3399 | 3399 |
3400 FFS_flashData.output_volume = OutVolumeLevel4; | 3400 FFS_flashData.output_volume = OutVolumeLevel4; |
3401 // Set the volume | 3401 // Set the volume |
3402 mmeSetVolume (1, FFS_flashData.output_volume); | 3402 mmeSetVolume (1, FFS_flashData.output_volume); |
3403 //write the value to the FFS | 3403 //write the value to the FFS |
3404 flash_write(); | 3404 flash_write(); |
3405 | 3405 |
3406 } | 3406 } |
3407 void SetVolumeLevel5(void) | 3407 void SetVolumeLevel5(void) |
3408 { | 3408 { |
3409 | 3409 |
3410 | 3410 |
3411 FFS_flashData.output_volume = OutVolumeLevel5; | 3411 FFS_flashData.output_volume = OutVolumeLevel5; |
3412 // Set the volume | 3412 // Set the volume |
3413 mmeSetVolume (1, FFS_flashData.output_volume); | 3413 mmeSetVolume (1, FFS_flashData.output_volume); |
3414 //write the value to the FFS | 3414 //write the value to the FFS |
3415 flash_write(); | 3415 flash_write(); |
3416 | 3416 |
3417 } | 3417 } |
3418 //Apr 05, 2005 REF: ENH 29994 xdeepadh | 3418 //Apr 05, 2005 REF: ENH 29994 xdeepadh |
3419 #ifdef FF_MIDI_RINGER | 3419 #ifdef FF_MIDI_RINGER |
3420 /******************************************************************************* | 3420 /******************************************************************************* |
3421 | 3421 |
3422 $Function: sounds_midi_init | 3422 $Function: sounds_midi_init |
3423 | 3423 |
3424 $Description:Function to initialise the Midi files. | 3424 $Description:Function to initialise the Midi files. |
3429 | 3429 |
3430 *******************************************************************************/ | 3430 *******************************************************************************/ |
3431 void sounds_midi_init(void) | 3431 void sounds_midi_init(void) |
3432 { | 3432 { |
3433 TRACE_FUNCTION("sounds_init"); | 3433 TRACE_FUNCTION("sounds_init"); |
3434 #ifdef FF_MIDI_RINGER | 3434 #ifdef FF_MIDI_RINGER |
3435 #ifdef FF_MIDI_LOAD_FROM_MEM | 3435 #ifdef FF_MIDI_LOAD_FROM_MEM |
3436 midi_files_count=MIDI_MAX_FILES; | 3436 midi_files_count=MIDI_MAX_FILES; |
3437 #else | 3437 #else |
3438 //Nov 04, 2005 REF:DRT OMAPS00053737 xdeepadh | 3438 //Nov 04, 2005 REF:DRT OMAPS00053737 xdeepadh |
3439 #ifdef FF_MIDI_LOAD_FROM_LFS | 3439 #ifdef FF_MIDI_LOAD_FROM_LFS |
3501 //read the file names | 3501 //read the file names |
3502 //Nov 02, 2005 REF:ER OMAPS00039044 xdeepadh | 3502 //Nov 02, 2005 REF:ER OMAPS00039044 xdeepadh |
3503 //file_count will be used to populate the array index | 3503 //file_count will be used to populate the array index |
3504 for (i = 0; ffs_readdir (&dir, dest_name_p, 100) > 0x0; i++) | 3504 for (i = 0; ffs_readdir (&dir, dest_name_p, 100) > 0x0; i++) |
3505 { | 3505 { |
3506 | 3506 |
3507 (file_names[files_count]) = (char*)mfwAlloc(strlen(dest_name_p) + 1); | 3507 (file_names[files_count]) = (char*)mfwAlloc(strlen(dest_name_p) + 1); |
3508 if(file_names[files_count] != NULL) | 3508 if(file_names[files_count] != NULL) |
3509 { | 3509 { |
3510 //Jul 20, 2005 REF: SPR 30772 xdeepadh | 3510 //Jul 20, 2005 REF: SPR 30772 xdeepadh |
3511 //Retrieve file extension.Store only the supported file formats in array | 3511 //Retrieve file extension.Store only the supported file formats in array |
3533 #endif //FF_AAC_RINGER | 3533 #endif //FF_AAC_RINGER |
3534 | 3534 |
3535 #ifdef FF_MMI_MIDI_FORMAT | 3535 #ifdef FF_MMI_MIDI_FORMAT |
3536 | 3536 |
3537 //If XMF is supported | 3537 //If XMF is supported |
3538 #ifdef PAL_ENABLE_XMF | 3538 #ifdef PAL_ENABLE_XMF |
3539 if ( (strcmp(fileExt, "xmf") == 0)) | 3539 if ( (strcmp(fileExt, "xmf") == 0)) |
3540 { | 3540 { |
3541 strcpy (file_names[files_count], dest_name_p); | 3541 strcpy (file_names[files_count], dest_name_p); |
3542 files_count++; | 3542 files_count++; |
3543 } | 3543 } |
3544 else | 3544 else |
3545 #endif //PAL_ENABLE_XMF | 3545 #endif //PAL_ENABLE_XMF |
3546 | 3546 |
3547 //If IMELODY is supported | 3547 //If IMELODY is supported |
3548 #ifdef PAL_ENABLE_IMELODY | 3548 #ifdef PAL_ENABLE_IMELODY |
3549 if ( (strcmp(fileExt, "imy") == 0)) | 3549 if ( (strcmp(fileExt, "imy") == 0)) |
3550 { | 3550 { |
3551 strcpy (file_names[files_count], dest_name_p); | 3551 strcpy (file_names[files_count], dest_name_p); |
3552 files_count++; | 3552 files_count++; |
3553 } | 3553 } |
3554 else | 3554 else |
3555 #endif //PAL_ENABLE_IMELODY | 3555 #endif //PAL_ENABLE_IMELODY |
3556 | 3556 |
3557 //If SMAF is supported | 3557 //If SMAF is supported |
3558 #ifdef PAL_ENABLE_SMAF_MA3 | 3558 #ifdef PAL_ENABLE_SMAF_MA3 |
3559 if ( (strcmp(fileExt, "mmf") == 0)) | 3559 if ( (strcmp(fileExt, "mmf") == 0)) |
3560 { | 3560 { |
3561 strcpy (file_names[files_count], dest_name_p); | 3561 strcpy (file_names[files_count], dest_name_p); |
3562 files_count++; | 3562 files_count++; |
3563 } | 3563 } |
3564 else | 3564 else |
3565 #endif ////PAL_ENABLE_SMAF_MA3 | 3565 #endif ////PAL_ENABLE_SMAF_MA3 |
3566 | 3566 |
3567 //If MIDI is supported | 3567 //If MIDI is supported |
3568 #ifdef PAL_ENABLE_MIDI_NORMALIZER | 3568 #ifdef PAL_ENABLE_MIDI_NORMALIZER |
3569 if ( (strcmp(fileExt, "mid") == 0)) | 3569 if ( (strcmp(fileExt, "mid") == 0)) |
3570 { | 3570 { |
3571 strcpy (file_names[files_count], dest_name_p); | 3571 strcpy (file_names[files_count], dest_name_p); |
3572 files_count++; | 3572 files_count++; |
3573 } | 3573 } |
3574 else | 3574 else |
3575 #endif ////PAL_ENABLE_MIDI_NORMALIZER | 3575 #endif ////PAL_ENABLE_MIDI_NORMALIZER |
3576 //Sep 12, 2005 REF: SPR 33977 xdeepadh | 3576 //Sep 12, 2005 REF: SPR 33977 xdeepadh |
3577 //mxmf file format has been supported | 3577 //mxmf file format has been supported |
3578 #ifdef PAL_ENABLE_XMF | 3578 #ifdef PAL_ENABLE_XMF |
3579 if ( (strcmp(fileExt, "mxmf") == 0)) | 3579 if ( (strcmp(fileExt, "mxmf") == 0)) |
3580 { | 3580 { |
3581 strcpy (file_names[files_count], dest_name_p); | 3581 strcpy (file_names[files_count], dest_name_p); |
3582 files_count++; | 3582 files_count++; |
3583 } | 3583 } |
3584 else | 3584 else |
3585 #endif //PAL_ENABLE_XMF | 3585 #endif //PAL_ENABLE_XMF |
3586 /* Nov 23, 2006 ERT: OMAPS00101348 x0039928 | 3586 /* Nov 23, 2006 ERT: OMAPS00101348 x0039928 |
3587 Fix: .sms files are populated */ | 3587 Fix: .sms files are populated */ |
3588 #ifdef PAL_ENABLE_SMS | 3588 #ifdef PAL_ENABLE_SMS |
3589 if ( (strcmp(fileExt, "sms") == 0)) | 3589 if ( (strcmp(fileExt, "sms") == 0)) |
3590 { | 3590 { |
3600 { | 3600 { |
3601 strcpy (file_names[files_count], dest_name_p); | 3601 strcpy (file_names[files_count], dest_name_p); |
3602 files_count++; | 3602 files_count++; |
3603 } | 3603 } |
3604 else | 3604 else |
3605 #endif //PAL_ENABLE_DIGITAL_AUDIO | 3605 #endif //PAL_ENABLE_DIGITAL_AUDIO |
3606 | 3606 |
3607 #endif | 3607 #endif |
3608 ; | 3608 ; |
3609 if(files_count >= max_files_count) | 3609 if(files_count >= max_files_count) |
3610 break; | 3610 break; |
3613 { | 3613 { |
3614 //files_count = 0; | 3614 //files_count = 0; |
3615 } | 3615 } |
3616 | 3616 |
3617 } | 3617 } |
3618 | 3618 |
3619 //x0pleela 07 Nov, 2006 DVT: OMAPS00102732 | 3619 //x0pleela 07 Nov, 2006 DVT: OMAPS00102732 |
3620 //Adding the MMI compilation flag FF_MMI_RELIANCE_FFS | 3620 //Adding the MMI compilation flag FF_MMI_RELIANCE_FFS |
3621 //x0pleela 31 Oct, 2006 | 3621 //x0pleela 31 Oct, 2006 |
3622 //Closing the directory aa per the new FFS logic | 3622 //Closing the directory aa per the new FFS logic |
3623 #ifdef FF_MMI_RELIANCE_FFS | 3623 #ifdef FF_MMI_RELIANCE_FFS |
3624 ffs_closedir(dir); | 3624 ffs_closedir(dir); |
3625 #endif | 3625 #endif |
3626 TRACE_EVENT_P1("read files_count is %d",files_count); | 3626 TRACE_EVENT_P1("read files_count is %d",files_count); |
3627 return files_count; | 3627 return files_count; |
3628 } | 3628 } |
3649 { | 3649 { |
3650 mfwFree((U8 *)file_names[i],(U16)strlen(file_names[i]) + 1); | 3650 mfwFree((U8 *)file_names[i],(U16)strlen(file_names[i]) + 1); |
3651 } | 3651 } |
3652 file_names[i]=NULL; | 3652 file_names[i]=NULL; |
3653 } | 3653 } |
3654 | 3654 |
3655 } | 3655 } |
3656 | 3656 |
3657 /******************************************************************************* | 3657 /******************************************************************************* |
3658 | 3658 |
3659 $Function: sounds_midi_return_file_number | 3659 $Function: sounds_midi_return_file_number |
3660 | 3660 |
3661 $Description: returns the file count | 3661 $Description: returns the file count |
3662 | 3662 |
3663 $Returns: Count of the Midi files | 3663 $Returns: Count of the Midi files |
3664 | 3664 |
3665 $Arguments: None | 3665 $Arguments: None |
3666 | 3666 |
3667 *******************************************************************************/ | 3667 *******************************************************************************/ |
3668 int sounds_midi_return_file_number(void) | 3668 int sounds_midi_return_file_number(void) |
3669 { | 3669 { |
3670 TRACE_FUNCTION("sounds_midi_return_file_number"); | 3670 TRACE_FUNCTION("sounds_midi_return_file_number"); |
3671 | 3671 |
3672 if(midi_files_count<=0) | 3672 if(midi_files_count<=0) |
3673 return 0; | 3673 return 0; |
3674 else | 3674 else |
3675 return midi_files_count; | 3675 return midi_files_count; |
3676 | 3676 |
3677 } | 3677 } |
3678 /******************************************************************************* | 3678 /******************************************************************************* |
3679 | 3679 |
3680 $Function: sounds_midi_return_file_name | 3680 $Function: sounds_midi_return_file_name |
3681 | 3681 |
3682 $Description: Returns the file name | 3682 $Description: Returns the file name |
3683 | 3683 |
3684 $Returns: Name of the file | 3684 $Returns: Name of the file |
3685 | 3685 |
3686 $Arguments: index:The index of the file, whose name has to be retrieved | 3686 $Arguments: index:The index of the file, whose name has to be retrieved |
3687 | 3687 |
3688 *******************************************************************************/ | 3688 *******************************************************************************/ |
3689 | 3689 |
3697 #else | 3697 #else |
3698 TRACE_EVENT_P2("midi_file_names[%d] is %s",index,(char *)midi_file_names[index]); | 3698 TRACE_EVENT_P2("midi_file_names[%d] is %s",index,(char *)midi_file_names[index]); |
3699 return (char *) midi_file_names[index]; | 3699 return (char *) midi_file_names[index]; |
3700 #endif | 3700 #endif |
3701 | 3701 |
3702 | 3702 |
3703 } | 3703 } |
3704 | 3704 |
3705 /******************************************************************************* | 3705 /******************************************************************************* |
3706 | 3706 |
3707 $Function: sounds_midi_ringer_start_cb | 3707 $Function: sounds_midi_ringer_start_cb |
3721 /* OMAPS00151698, x0056422 */ | 3721 /* OMAPS00151698, x0056422 */ |
3722 #ifdef FF_MMI_A2DP_AVRCP | 3722 #ifdef FF_MMI_A2DP_AVRCP |
3723 if (((T_AS_START_IND *)parameter)->header.msg_id == AS_START_IND ) | 3723 if (((T_AS_START_IND *)parameter)->header.msg_id == AS_START_IND ) |
3724 { | 3724 { |
3725 tGlobalBmiBtStruct.tAudioState = FM_AUD_PLAY; | 3725 tGlobalBmiBtStruct.tAudioState = FM_AUD_PLAY; |
3726 if(tGlobalBmiBtStruct.bConnected != BMI_BT_NOTCONNECTED) | 3726 if(tGlobalBmiBtStruct.bConnected != BMI_BT_NOTCONNECTED) |
3727 { | 3727 { |
3728 if( NULL != tGlobalBmiBtStruct.BmiEventCallback) | 3728 if( NULL != tGlobalBmiBtStruct.BmiEventCallback) |
3729 tGlobalBmiBtStruct.BmiEventCallback(BMI_EVENT_USER_PLAY); | 3729 tGlobalBmiBtStruct.BmiEventCallback(BMI_EVENT_USER_PLAY); |
3730 tGlobalBmiBtStruct.tCmdSrc == BMI_BT_COMMAND_NONE; | 3730 tGlobalBmiBtStruct.tCmdSrc == BMI_BT_COMMAND_NONE; |
3731 } | 3731 } |
3732 } | 3732 } |
3733 #endif//FF_MMI_A2DP_AVRCP | 3733 #endif//FF_MMI_A2DP_AVRCP |
3734 /* OMAPS00151698, x0056422 */ | 3734 /* OMAPS00151698, x0056422 */ |
3735 | 3735 |
3736 if (((T_AS_STOP_IND *)parameter)->header.msg_id == AS_STOP_IND ) | 3736 if (((T_AS_STOP_IND *)parameter)->header.msg_id == AS_STOP_IND ) |
3737 { | 3737 { |
3738 | 3738 |
3739 /* OMAPS00151698, x0056422 */ | 3739 /* OMAPS00151698, x0056422 */ |
3740 #ifdef FF_MMI_A2DP_AVRCP | 3740 #ifdef FF_MMI_A2DP_AVRCP |
3741 tGlobalBmiBtStruct.tAudioState = FM_AUD_NONE; | 3741 tGlobalBmiBtStruct.tAudioState = FM_AUD_NONE; |
3742 if(tGlobalBmiBtStruct.bConnected != BMI_BT_NOTCONNECTED) | 3742 if(tGlobalBmiBtStruct.bConnected != BMI_BT_NOTCONNECTED) |
3743 { | 3743 { |
3744 if( NULL != tGlobalBmiBtStruct.BmiEventCallback) | 3744 if( NULL != tGlobalBmiBtStruct.BmiEventCallback) |
3745 tGlobalBmiBtStruct.BmiEventCallback(BMI_EVENT_USER_STOP); | 3745 tGlobalBmiBtStruct.BmiEventCallback(BMI_EVENT_USER_STOP); |
3746 tGlobalBmiBtStruct.tCmdSrc == BMI_BT_COMMAND_NONE; | 3746 tGlobalBmiBtStruct.tCmdSrc == BMI_BT_COMMAND_NONE; |
3747 } | 3747 } |
3748 #endif//FF_MMI_A2DP_AVRCP | 3748 #endif//FF_MMI_A2DP_AVRCP |
3749 /* OMAPS00151698, x0056422 */ | 3749 /* OMAPS00151698, x0056422 */ |
3750 // Aug 05, 2005 xdeepadh | 3750 // Aug 05, 2005 xdeepadh |
3751 #ifdef FF_MMI_AUDIO_PROFILE | 3751 #ifdef FF_MMI_AUDIO_PROFILE |
3752 //configure the audio to voice path. | 3752 //configure the audio to voice path. |
3753 mfwAudPlay = FALSE; | 3753 mfwAudPlay = FALSE; |
3754 mfw_unset_stereo_path(mfw_get_current_audioDevice()); | 3754 mfw_unset_stereo_path(mfw_get_current_audioDevice()); |
3755 #endif | 3755 #endif |
3756 } | 3756 } |
3757 | 3757 |
3758 } | 3758 } |
3759 | 3759 |
3760 /******************************************************************************* | 3760 /******************************************************************************* |
3769 | 3769 |
3770 *******************************************************************************/ | 3770 *******************************************************************************/ |
3771 | 3771 |
3772 void sounds_midi_ringer_stop_cb(void *parameter) | 3772 void sounds_midi_ringer_stop_cb(void *parameter) |
3773 { | 3773 { |
3774 | 3774 |
3775 /*August 01, 2007 DR: OMAPS00137399 x0080701 (Bharat) -- Start */ | 3775 /*August 01, 2007 DR: OMAPS00137399 x0080701 (Bharat) -- Start */ |
3776 | 3776 |
3777 E_IN_CALL_RINGER_STATUS eStatus = 0; | 3777 E_IN_CALL_RINGER_STATUS eStatus = 0; |
3778 | 3778 |
3779 TRACE_EVENT("sounds_midi_ringer_stop_cb"); | 3779 TRACE_EVENT("sounds_midi_ringer_stop_cb"); |
3780 | 3780 |
3781 /* Retrieve the Incoming Call -- Ringer Status */ | 3781 /* Retrieve the Incoming Call -- Ringer Status */ |
3785 /* Vocoder for the Voice to be heard */ | 3785 /* Vocoder for the Voice to be heard */ |
3786 if ( eStatus == BMI_INCOMING_CALL_RINGERSTOPPED ) | 3786 if ( eStatus == BMI_INCOMING_CALL_RINGERSTOPPED ) |
3787 { | 3787 { |
3788 /* Vocoder Enable */ | 3788 /* Vocoder Enable */ |
3789 mfw_aud_l1_enable_vocoder(); | 3789 mfw_aud_l1_enable_vocoder(); |
3790 | 3790 |
3791 bmi_incomingcall_set_ringer_status(BMI_INCOMING_CALL_NONE); | 3791 bmi_incomingcall_set_ringer_status(BMI_INCOMING_CALL_NONE); |
3792 } | 3792 } |
3793 | 3793 |
3794 /*August 01, 2007 DR: OMAPS00137399 x0080701 (Bharat) -- End */ | 3794 /*August 01, 2007 DR: OMAPS00137399 x0080701 (Bharat) -- End */ |
3795 | 3795 |
3796 // Aug 05, 2005 xdeepadh | 3796 // Aug 05, 2005 xdeepadh |
3797 #ifdef FF_MMI_AUDIO_PROFILE | 3797 #ifdef FF_MMI_AUDIO_PROFILE |
3798 //configure the audio to voice path | 3798 //configure the audio to voice path |
3838 if(mfw_player_currently_playing_idx<(midi_files_count-1)) | 3838 if(mfw_player_currently_playing_idx<(midi_files_count-1)) |
3839 { | 3839 { |
3840 mfw_player_currently_playing_idx++; | 3840 mfw_player_currently_playing_idx++; |
3841 TRACE_EVENT_P1("mfw_player_currently_playing_idx is %d",mfw_player_currently_playing_idx); | 3841 TRACE_EVENT_P1("mfw_player_currently_playing_idx is %d",mfw_player_currently_playing_idx); |
3842 mfw_player_save_selected_file_idx(mfw_player_currently_playing_idx); | 3842 mfw_player_save_selected_file_idx(mfw_player_currently_playing_idx); |
3843 #ifdef FF_MIDI_RINGER | 3843 #ifdef FF_MIDI_RINGER |
3844 #ifdef FF_MIDI_LOAD_FROM_MEM | 3844 #ifdef FF_MIDI_LOAD_FROM_MEM |
3845 melody_data=sounds_midi_return_memory_location(mfw_player_currently_playing_idx); | 3845 melody_data=sounds_midi_return_memory_location(mfw_player_currently_playing_idx); |
3846 player_type=mfw_ringer_deduce_player_type(melody_data.melody_name); | 3846 player_type=mfw_ringer_deduce_player_type(melody_data.melody_name); |
3847 mfw_player_start_memory(player_type,(UINT32*)melody_data.melody,melody_data.melody_size,(UBYTE)AS_VOLUME_HIGH,FALSE,sounds_midi_player_start_cb); | 3847 mfw_player_start_memory(player_type,(UINT32*)melody_data.melody,melody_data.melody_size,(UBYTE)AS_VOLUME_HIGH,FALSE,sounds_midi_player_start_cb); |
3848 #else | 3848 #else |
3854 convert_u8_to_unicode(temp, midi_file_uc); | 3854 convert_u8_to_unicode(temp, midi_file_uc); |
3855 mfw_player_start_file(player_type,midi_file_uc,(UBYTE)AS_VOLUME_HIGH,FALSE,sounds_midi_player_start_cb); | 3855 mfw_player_start_file(player_type,midi_file_uc,(UBYTE)AS_VOLUME_HIGH,FALSE,sounds_midi_player_start_cb); |
3856 #else | 3856 #else |
3857 mfw_player_start_file(player_type,midi_file,(UBYTE)AS_VOLUME_HIGH,FALSE,sounds_midi_player_start_cb); | 3857 mfw_player_start_file(player_type,midi_file,(UBYTE)AS_VOLUME_HIGH,FALSE,sounds_midi_player_start_cb); |
3858 #endif | 3858 #endif |
3859 #endif | 3859 #endif |
3860 #endif | 3860 #endif |
3861 } | 3861 } |
3862 else | 3862 else |
3863 { | 3863 { |
3864 //x0pleela 26 Sep, 2006 DR: OMAPS00096365 | 3864 //x0pleela 26 Sep, 2006 DR: OMAPS00096365 |
3865 //Reset the index to -1 to avoid playing only the last file. | 3865 //Reset the index to -1 to avoid playing only the last file. |
3866 mfw_player_currently_playing_idx = -1; | 3866 mfw_player_currently_playing_idx = -1; |
3867 //flag set to 1 means we only play the currently selected file | 3867 //flag set to 1 means we only play the currently selected file |
3868 mfw_player_exit_flag = PLAYER_EXIT_FLAG_TRUE; | 3868 mfw_player_exit_flag = PLAYER_EXIT_FLAG_TRUE; |
3869 // Aug 05, 2005 xdeepadh | 3869 // Aug 05, 2005 xdeepadh |
3870 #ifdef FF_MMI_AUDIO_PROFILE | 3870 #ifdef FF_MMI_AUDIO_PROFILE |
3871 //configure the audio to voice path | 3871 //configure the audio to voice path |
3872 mfwAudPlay = FALSE; | 3872 mfwAudPlay = FALSE; |
3873 mfw_unset_stereo_path(mfw_get_current_audioDevice()); | 3873 mfw_unset_stereo_path(mfw_get_current_audioDevice()); |
3882 //configure the audio to voice path | 3882 //configure the audio to voice path |
3883 mfwAudPlay = FALSE; | 3883 mfwAudPlay = FALSE; |
3884 mfw_unset_stereo_path(mfw_get_current_audioDevice()); | 3884 mfw_unset_stereo_path(mfw_get_current_audioDevice()); |
3885 #endif | 3885 #endif |
3886 } | 3886 } |
3887 | 3887 |
3888 } | 3888 } |
3889 #endif//#ifdef FF_MMI_TEST_MIDI | 3889 #endif//#ifdef FF_MMI_TEST_MIDI |
3890 } | 3890 } |
3891 | 3891 |
3892 /******************************************************************************* | 3892 /******************************************************************************* |
3893 | 3893 |
3894 $Function: sounds_midi_player_stop_cb | 3894 $Function: sounds_midi_player_stop_cb |
3914 | 3914 |
3915 | 3915 |
3916 /******************************************************************************* | 3916 /******************************************************************************* |
3917 | 3917 |
3918 $Function: sounds_show_info | 3918 $Function: sounds_show_info |
3919 | 3919 |
3920 $Description:Displays a dialog | 3920 $Description:Displays a dialog |
3921 | 3921 |
3922 $Returns: | 3922 $Returns: |
3923 | 3923 |
3924 $Arguments: | 3924 $Arguments: |
3925 *******************************************************************************/ | 3925 *******************************************************************************/ |
3926 static MfwHnd sounds_show_info(T_MFW_HND parent, int str1, int str2, T_VOID_FUNC callback) | 3926 static MfwHnd sounds_show_info(T_MFW_HND parent, int str1, int str2, T_VOID_FUNC callback) |
3951 int get_ringer_mode(void) | 3951 int get_ringer_mode(void) |
3952 { | 3952 { |
3953 T_AS_RINGER_MODE current_mode = NULL; /* x0039928 - Lint warning fix */ | 3953 T_AS_RINGER_MODE current_mode = NULL; /* x0039928 - Lint warning fix */ |
3954 | 3954 |
3955 TRACE_FUNCTION("get_ringer_mode"); | 3955 TRACE_FUNCTION("get_ringer_mode"); |
3956 | 3956 |
3957 switch(getSoundsReason()) | 3957 switch(getSoundsReason()) |
3958 { | 3958 { |
3959 case MelodySelect: | 3959 case MelodySelect: |
3960 current_mode=AS_RINGER_MODE_IC; | 3960 current_mode=AS_RINGER_MODE_IC; |
3961 break; | 3961 break; |
3993 { | 3993 { |
3994 | 3994 |
3995 TRACE_EVENT_P1("playCurrentMelody. The selected tone is %d",selected_tone); | 3995 TRACE_EVENT_P1("playCurrentMelody. The selected tone is %d",selected_tone); |
3996 /* DRT OMAPS00163752 including changes from OMAPS00151417 . Apr 09, 2008. x0086292 - Start */ | 3996 /* DRT OMAPS00163752 including changes from OMAPS00151417 . Apr 09, 2008. x0086292 - Start */ |
3997 | 3997 |
3998 // stop running timer | 3998 // stop running timer |
3999 if (hPlayerStartTimer != NULL ) | 3999 if (hPlayerStartTimer != NULL ) |
4000 { | 4000 { |
4001 timStop(hPlayerStartTimer); | 4001 timStop(hPlayerStartTimer); |
4002 } | 4002 } |
4003 | 4003 |
4004 // wait for AS to stop playing file before starting to play new one | 4004 // wait for AS to stop playing file before starting to play new one |
4005 if (mfwAudPlay == TRUE) | 4005 if (mfwAudPlay == TRUE) |
4006 { | 4006 { |
4007 startPlayerTimer(); | 4007 startPlayerTimer(); |
4008 } | 4008 } |
4009 else | 4009 else |
4010 { | 4010 { |
4011 soundsPlayMidiPlayer(selected_tone); | 4011 soundsPlayMidiPlayer(selected_tone); |
4012 } | 4012 } |
4013 /* DRT OMAPS00163752 including changes from OMAPS00151417 . Apr 09, 2008. x0086292 - End */ | 4013 /* DRT OMAPS00163752 including changes from OMAPS00151417 . Apr 09, 2008. x0086292 - End */ |
4014 | 4014 |
4019 /******************************************************************************* | 4019 /******************************************************************************* |
4020 | 4020 |
4021 $Function: soundsPlayMidiPlayer | 4021 $Function: soundsPlayMidiPlayer |
4022 | 4022 |
4023 $Description: Play the tune selected by melody_id, stopping any currently | 4023 $Description: Play the tune selected by melody_id, stopping any currently |
4024 playing tunes if necessary. | 4024 playing tunes if necessary. |
4025 $Returns: None | 4025 $Returns: None |
4026 | 4026 |
4027 $Arguments: melody_id, selects the melody to be played | 4027 $Arguments: melody_id, selects the melody to be played |
4028 | 4028 |
4029 *******************************************************************************/ | 4029 *******************************************************************************/ |
4039 #else | 4039 #else |
4040 char* midi_file; | 4040 char* midi_file; |
4041 #ifdef FF_MMI_FILEMANAGER | 4041 #ifdef FF_MMI_FILEMANAGER |
4042 char temp[FILENAME_MAX_LEN]; | 4042 char temp[FILENAME_MAX_LEN]; |
4043 UINT16 midi_file_uc[FILENAME_MAX_LEN]; | 4043 UINT16 midi_file_uc[FILENAME_MAX_LEN]; |
4044 #endif | 4044 #endif |
4045 #endif | 4045 #endif |
4046 #endif | 4046 #endif |
4047 | 4047 |
4048 TRACE_EVENT_P1("soundsPlayMidiPlayer.The melody_id is %d",melody_id); | 4048 TRACE_EVENT_P1("soundsPlayMidiPlayer.The melody_id is %d",melody_id); |
4049 CurrentTune = melody_id; | 4049 CurrentTune = melody_id; |
4064 convert_u8_to_unicode(temp, midi_file_uc); | 4064 convert_u8_to_unicode(temp, midi_file_uc); |
4065 mfw_player_start_file(player_type,midi_file_uc,ringer_info->volume,FALSE,sounds_midi_player_start_cb); | 4065 mfw_player_start_file(player_type,midi_file_uc,ringer_info->volume,FALSE,sounds_midi_player_start_cb); |
4066 #else | 4066 #else |
4067 mfw_player_start_file(player_type,midi_file,ringer_info->volume,FALSE,sounds_midi_player_start_cb); | 4067 mfw_player_start_file(player_type,midi_file,ringer_info->volume,FALSE,sounds_midi_player_start_cb); |
4068 #endif | 4068 #endif |
4069 #endif | 4069 #endif |
4070 | 4070 |
4071 | 4071 |
4072 } | 4072 } |
4073 | 4073 |
4074 /******************************************************************************* | 4074 /******************************************************************************* |
4109 it start again when the timer expires*/ | 4109 it start again when the timer expires*/ |
4110 | 4110 |
4111 if ( hPlayerStartTimer != NULL ) | 4111 if ( hPlayerStartTimer != NULL ) |
4112 timStop( hPlayerStartTimer ); | 4112 timStop( hPlayerStartTimer ); |
4113 // Stop the tone | 4113 // Stop the tone |
4114 | 4114 |
4115 /* DRT OMAPS00163752 including changes from OMAPS00151417. Apr 09, 2008. x0086292 */ | 4115 /* DRT OMAPS00163752 including changes from OMAPS00151417. Apr 09, 2008. x0086292 */ |
4116 if (mfwAudPlay == TRUE) | 4116 if (mfwAudPlay == TRUE) |
4117 mfw_player_stop(sounds_midi_player_stop_cb); | 4117 mfw_player_stop(sounds_midi_player_stop_cb); |
4118 } | 4118 } |
4119 | 4119 |
4120 | 4120 |
4121 /******************************************************************************* | 4121 /******************************************************************************* |
4134 static int playCurrentVolumeTone( MfwEvt e, MfwTim *tc ) | 4134 static int playCurrentVolumeTone( MfwEvt e, MfwTim *tc ) |
4135 { | 4135 { |
4136 | 4136 |
4137 TRACE_EVENT("playCurrentVolumeTone"); | 4137 TRACE_EVENT("playCurrentVolumeTone"); |
4138 soundsPlayVolumeMelody(); | 4138 soundsPlayVolumeMelody(); |
4139 // stop running timer | 4139 // stop running timer |
4140 if (hPlayerStartTimer != NULL ) | 4140 if (hPlayerStartTimer != NULL ) |
4141 { | 4141 { |
4142 timStop(hPlayerStartTimer); | 4142 timStop(hPlayerStartTimer); |
4143 } | 4143 } |
4144 return MFW_EVENT_CONSUMED; | 4144 return MFW_EVENT_CONSUMED; |
4179 TRACE_EVENT("stopVolumeTimer"); | 4179 TRACE_EVENT("stopVolumeTimer"); |
4180 if ( hPlayerStartTimer != NULL ) | 4180 if ( hPlayerStartTimer != NULL ) |
4181 timStop( hPlayerStartTimer ); | 4181 timStop( hPlayerStartTimer ); |
4182 // Are we playing a tune | 4182 // Are we playing a tune |
4183 /* DRT OMAPS00163752 including changes from OMAPS00151417 . Apr 09, 2008. x0086292 */ | 4183 /* DRT OMAPS00163752 including changes from OMAPS00151417 . Apr 09, 2008. x0086292 */ |
4184 if (mfwAudPlay == TRUE) | 4184 if (mfwAudPlay == TRUE) |
4185 mfw_player_stop(sounds_midi_player_stop_cb); | 4185 mfw_player_stop(sounds_midi_player_stop_cb); |
4186 } | 4186 } |
4187 | 4187 |
4188 /******************************************************************************* | 4188 /******************************************************************************* |
4189 | 4189 |
4190 $Function: soundsPlayVolumeMelody | 4190 $Function: soundsPlayVolumeMelody |
4191 | 4191 |
4192 $Description: Play the ringer tune with the selected volume, stopping any currently | 4192 $Description: Play the ringer tune with the selected volume, stopping any currently |
4193 playing tunes if necessary. | 4193 playing tunes if necessary. |
4194 $Returns: None | 4194 $Returns: None |
4195 | 4195 |
4196 $Arguments: melody_id, selects the melody to be played | 4196 $Arguments: melody_id, selects the melody to be played |
4197 | 4197 |
4198 *******************************************************************************/ | 4198 *******************************************************************************/ |
4212 ringer_info=mfw_ringer_get_info(get_ringer_mode(),&temp_ringer_info); | 4212 ringer_info=mfw_ringer_get_info(get_ringer_mode(),&temp_ringer_info); |
4213 #ifdef FF_MIDI_LOAD_FROM_MEM | 4213 #ifdef FF_MIDI_LOAD_FROM_MEM |
4214 mfw_player_start_memory(ringer_info->player_type,ringer_info->data.memory.address,ringer_info->data.memory.size,current.volumeSetting,FALSE,sounds_midi_player_start_cb); | 4214 mfw_player_start_memory(ringer_info->player_type,ringer_info->data.memory.address,ringer_info->data.memory.size,current.volumeSetting,FALSE,sounds_midi_player_start_cb); |
4215 #else | 4215 #else |
4216 mfw_player_start_file(ringer_info->player_type,ringer_info->data.filename,(T_AS_VOLUME)current.volumeSetting,FALSE,sounds_midi_player_start_cb); | 4216 mfw_player_start_file(ringer_info->player_type,ringer_info->data.filename,(T_AS_VOLUME)current.volumeSetting,FALSE,sounds_midi_player_start_cb); |
4217 #endif | 4217 #endif |
4218 #endif | 4218 #endif |
4219 | 4219 |
4220 } | 4220 } |
4221 | 4221 |
4222 /******************************************************************************* | 4222 /******************************************************************************* |