equal
deleted
inserted
replaced
41 class CA3FDevSoundAdaptationInfo; |
41 class CA3FDevSoundAdaptationInfo; |
42 class MAudioContext; |
42 class MAudioContext; |
43 class MAudioStream; |
43 class MAudioStream; |
44 class MGlobalProperties; |
44 class MGlobalProperties; |
45 |
45 |
|
46 /** |
|
47 Panic category and codes that CDevAudio raises on the client |
|
48 */ |
|
49 _LIT(KMMFDevAudioPanicCategory, "CDevAudio"); |
|
50 |
|
51 enum TMMFDevAudioPanicCodes |
|
52 { |
|
53 EValidStateBeforeCommit =1 |
|
54 }; |
46 |
55 |
47 enum TDevSoundAdaptorState |
56 enum TDevSoundAdaptorState |
48 { |
57 { |
49 EDevSoundAdaptorCreated_Uninitialised, |
58 EDevSoundAdaptorCreated_Uninitialised, |
50 EDevSoundAdaptorRemovingProcessingUnits, |
59 EDevSoundAdaptorRemovingProcessingUnits, |
146 * @return the current A3F state. See TAudioState |
155 * @return the current A3F state. See TAudioState |
147 */ |
156 */ |
148 TDevSoundAdaptorState ActiveState() const; |
157 TDevSoundAdaptorState ActiveState() const; |
149 |
158 |
150 /** |
159 /** |
|
160 * Retrieve the previous DevSound adaptor state |
|
161 * @return void |
|
162 */ |
|
163 TDevSoundAdaptorState PreviousState() const; |
|
164 |
|
165 /** |
|
166 * Set the current DevSound adaptor state |
|
167 * @return void |
|
168 */ |
|
169 void SetActiveState(TDevSoundAdaptorState aAdaptorState); |
|
170 |
|
171 /** |
|
172 * Set the previous DevSound adaptor state |
|
173 * @return void |
|
174 */ |
|
175 void SetPreviousState(TDevSoundAdaptorState aAdaptorState); |
|
176 |
|
177 /** |
151 * SetVolume for DevSound |
178 * SetVolume for DevSound |
152 */ |
179 */ |
153 TInt SetDevSoundVolume(TInt aVolume, TBool& aAsyncCompletion); |
180 TInt SetDevSoundVolume(TInt aVolume, TBool& aAsyncCompletion); |
154 |
181 |
155 /** |
182 /** |
245 */ |
272 */ |
246 void GetPrioritySettings(TAudioTypeSettings& astorage); |
273 void GetPrioritySettings(TAudioTypeSettings& astorage); |
247 |
274 |
248 TBool IsPrioritySet(); |
275 TBool IsPrioritySet(); |
249 |
276 |
|
277 //Panic function |
|
278 void Panic(TMMFDevAudioPanicCodes aCode); |
|
279 |
250 protected: |
280 protected: |
251 |
281 |
252 CDevAudio(MDevSoundAdaptationObserver& aAdaptationObserver); |
282 CDevAudio(MDevSoundAdaptationObserver& aAdaptationObserver); |
253 |
283 |
254 // If active, apply devsound volume and balance changes |
284 // If active, apply devsound volume and balance changes |
255 TInt SetGainAndBalance(TBool aCallBack, TBool& aAsyncCompletion); |
285 TInt SetGainAndBalance(TBool aCallBack, TBool& aAsyncCompletion); |
256 |
286 |
257 // Helper methods |
287 // Helper methods |
258 TInt CreateAudioProcessingUnits(TUid aSource, TUid aSink, TUid aCodec); |
288 TInt CreateAudioProcessingUnits(TUid aSource, TUid aSink, TUid aCodec); |
259 void DeleteAudioProcessingUnits(); |
289 void DeleteAudioProcessingUnits(); |
|
290 |
|
291 TInt CommitAudioContext(); |
|
292 TBool IsMidState(TDevSoundAdaptorState aAdaptorState); |
260 |
293 |
261 /* |
294 /* |
262 * most of member data is protected for DevAudioControl access |
295 * most of member data is protected for DevAudioControl access |
263 */ |
296 */ |
264 protected: // data |
297 protected: // data |
319 |
352 |
320 /** |
353 /** |
321 * Active DevSound Adaptor state |
354 * Active DevSound Adaptor state |
322 */ |
355 */ |
323 TDevSoundAdaptorState iActiveState; |
356 TDevSoundAdaptorState iActiveState; |
|
357 |
|
358 /** |
|
359 * Previous DevSound Adaptor state |
|
360 */ |
|
361 TDevSoundAdaptorState iPreviousState; |
324 |
362 |
325 TAudioState iActiveStreamState; |
363 TAudioState iActiveStreamState; |
326 |
364 |
327 TBool iReinitializing; |
365 TBool iReinitializing; |
328 TBool iClosing; |
366 TBool iClosing; |