FreeCalypso > hg > fc-tourmaline
comparison src/ui/mfw/mfw_aud.h @ 3:67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Fri, 16 Oct 2020 06:33:10 +0000 |
parents | |
children | 92abb46dc1ba |
comparison
equal
deleted
inserted
replaced
2:3a14ee9a9843 | 3:67bfe9f274f6 |
---|---|
1 /* | |
2 +--------------------------------------------------------------------+ | |
3 | PROJECT: MMI-Framework (8417) $Workfile:: mfw_aud.h $| | |
4 | $Author:: NDH $Revision:: 1 $| | |
5 | CREATED: 04.02.03 $Modtime:: 10.04.00 14:58 $| | |
6 | STATE : code | | |
7 +--------------------------------------------------------------------+ | |
8 | |
9 MODULE : MFW_AUD | |
10 | |
11 PURPOSE : This module contains the definitions for the Audio Riveria Interface. | |
12 | |
13 HISTORY: | |
14 Mar 31, 2006 ER: OMAPS00067709 x0pleela | |
15 Description: Voice Buffering implementation on C+ for PTT via PCM API | |
16 Solution: Added new field play_stopped to voice buffering data to keep a check before | |
17 calling play stop during end call | |
18 | |
19 Mar 15, 2006 ER: OMAPS00067709 x0pleela | |
20 Description: Voice Buffering implementation on C+ for PTT via PCM API | |
21 Solution: Defined new macro for PTT number length | |
22 Defined new Enumeration "T_VOICEMEMO" (which defines different types of voice memo) | |
23 and "T_VOICE_BUFFERING_STATUS" (Voice buffering status) | |
24 Defined new structure "T_voice_buffering" to handle diferent scenarios during voice buffering | |
25 Added prototypes of functions set_voice_memo_type, get_voice_memo_type, | |
26 set_voice_buffering_rec_stop_reason. | |
27 | |
28 */ | |
29 #ifdef FF_PCM_VM_VB | |
30 #include "mfw_mfw.h" | |
31 | |
32 //x0pleela 09 Mar, 2006 ER: OMAPS00067709 | |
33 //PTT number length | |
34 #define PTT_NUM_LEN 45 | |
35 | |
36 //x0pleela 20 Mar, 2006 ER OMAPS00067709 | |
37 //Maximum recording and playing duration for PCM voice memo and voice buffering | |
38 #define PCM_VOICE_MEMO_MAX_DURATION 20 // 20 Secs | |
39 | |
40 //x0pleela 28 Feb, 2006 ER: OMAPS00067709 | |
41 //Enums to define different types of voice memo | |
42 typedef enum | |
43 { | |
44 NONE = 0, | |
45 AMR_VOICE_MEMO, | |
46 PCM_VOICE_MEMO, | |
47 VOICE_BUFFERING | |
48 }T_VOICEMEMO; | |
49 | |
50 //x0pleela 09 Mar, 2006 ER: OMAPS00067709 | |
51 //Voice buffering status | |
52 typedef enum | |
53 { | |
54 VB_NONE, /* Reset value */ | |
55 USER_SEL_STOP, /* User has selected "STOP" option from menu */ | |
56 CALLING_PARTY_END_CALL, /* User has ended the PTT call */ | |
57 CALLED_PARTY_END_CALL, /* Called party has ended the call */ | |
58 RECORDING_TIMEOUT, /* Timeout of recording */ | |
59 PLAY_ERROR, /* Error while playing */ | |
60 CALLED_PARTY_NOT_AVAILABLE, /* Called party not reachable */ | |
61 CALL_END_BEF_SETUP /* Called party ended call before call setup */ | |
62 }T_VOICE_BUFFERING_STATUS; | |
63 | |
64 //Voice buffering structure | |
65 typedef struct | |
66 { | |
67 T_MFW_HND win_hnd; /* window handler to display dialogs */ | |
68 T_MFW_HND voice_buffering_tim; /* voice buffering timer handle */ | |
69 UBYTE vb_PTTnum[PTT_NUM_LEN]; /* PTT number to be dialed */ | |
70 T_VOICE_BUFFERING_STATUS rec_stop_reason; /* Reason for calling record_stop function */ | |
71 UBYTE call_active; /* States whether call is active or not */ | |
72 UBYTE recording_possible; /* States whether recording is possible or not */ | |
73 UBYTE buffering_phase; /* States whether in buffering phase or not */ | |
74 UBYTE incoming_call_discon; /* States the call disconnect of incoming call */ | |
75 UBYTE play_stopped; /* States whether play has stopped or not */ | |
76 }T_voice_buffering; | |
77 | |
78 //x0pleela 06 Mar, 2006 ER:OMAPS00067709 | |
79 //To set the type of voice memo | |
80 void set_voice_memo_type( T_VOICEMEMO voice_memo_type); | |
81 //To get the type of voice memo | |
82 EXTERN T_VOICEMEMO get_voice_memo_type( void); | |
83 //x0pleela 09 Mar, 2006 ER:OMAPS00067709 | |
84 //To set reason for calling record_stop | |
85 EXTERN void set_voice_buffering_rec_stop_reason( T_VOICE_BUFFERING_STATUS reason); | |
86 | |
87 #endif | |
88 | |
89 /* | |
90 ** Voice Memo Functions Prototypes | |
91 */ | |
92 #ifndef FF_NO_VOICE_MEMO | |
93 SHORT mfw_aud_vm_delete_file(void); | |
94 SHORT mfw_aud_vm_start_playback(void (*callback_fn)(void *)); | |
95 SHORT mfw_aud_vm_stop_playback(void (*callback_fn)(void *)); | |
96 SHORT mfw_aud_vm_start_record(UBYTE max_duration, void (*callback_fn)(void *)); | |
97 SHORT mfw_aud_vm_stop_record(void (*callback_fn)(void *)); | |
98 UBYTE mfw_aud_vm_get_duration(void); | |
99 void mfw_aud_vm_set_duration(UBYTE duration); | |
100 #endif | |
101 | |
102 /* | |
103 ** Layer1 Audio interface functions | |
104 */ | |
105 void mfw_aud_l1_enable_vocoder ( void ); | |
106 void mfw_aud_l1_disable_vocoder ( void ); | |
107 | |
108 | |
109 | |
110 /* | |
111 ** Voice Memo Return Values | |
112 */ | |
113 #ifndef FF_NO_VOICE_MEMO | |
114 #define MFW_AUD_VM_OK (0) | |
115 #define MFW_AUD_VM_RIVIERA_FAILED (-1) | |
116 #define MFW_AUD_VM_MEM_FULL (-2) | |
117 #define MFW_AUD_VM_MEM_EMPTY (-3) | |
118 #endif | |
119 |