diff -r efebd1779a59 -r c1e808730d6c devsound/a3fdevsound/src/devsoundadaptor/cdevaudio.h --- a/devsound/a3fdevsound/src/devsoundadaptor/cdevaudio.h Fri Apr 16 16:34:49 2010 +0300 +++ b/devsound/a3fdevsound/src/devsoundadaptor/cdevaudio.h Mon May 03 13:56:28 2010 +0300 @@ -43,6 +43,15 @@ class MAudioStream; class MGlobalProperties; +/** +Panic category and codes that CDevAudio raises on the client +*/ +_LIT(KMMFDevAudioPanicCategory, "CDevAudio"); + +enum TMMFDevAudioPanicCodes + { + EValidStateBeforeCommit =1 + }; enum TDevSoundAdaptorState { @@ -148,6 +157,24 @@ TDevSoundAdaptorState ActiveState() const; /** + * Retrieve the previous DevSound adaptor state + * @return void + */ + TDevSoundAdaptorState PreviousState() const; + + /** + * Set the current DevSound adaptor state + * @return void + */ + void SetActiveState(TDevSoundAdaptorState aAdaptorState); + + /** + * Set the previous DevSound adaptor state + * @return void + */ + void SetPreviousState(TDevSoundAdaptorState aAdaptorState); + + /** * SetVolume for DevSound */ TInt SetDevSoundVolume(TInt aVolume, TBool& aAsyncCompletion); @@ -247,6 +274,9 @@ TBool IsPrioritySet(); + //Panic function + void Panic(TMMFDevAudioPanicCodes aCode); + protected: CDevAudio(MDevSoundAdaptationObserver& aAdaptationObserver); @@ -258,6 +288,9 @@ TInt CreateAudioProcessingUnits(TUid aSource, TUid aSink, TUid aCodec); void DeleteAudioProcessingUnits(); + TInt CommitAudioContext(); + TBool IsMidState(TDevSoundAdaptorState aAdaptorState); + /* * most of member data is protected for DevAudioControl access */ @@ -322,6 +355,11 @@ */ TDevSoundAdaptorState iActiveState; + /** + * Previous DevSound Adaptor state + */ + TDevSoundAdaptorState iPreviousState; + TAudioState iActiveStreamState; TBool iReinitializing;