equal
deleted
inserted
replaced
105 { |
105 { |
106 DP_CONTEXT(CDevCommonControl::Resume, CtxDevSound, DPLOCAL); |
106 DP_CONTEXT(CDevCommonControl::Resume, CtxDevSound, DPLOCAL); |
107 DP_IN(); |
107 DP_IN(); |
108 |
108 |
109 TInt err = KErrNone; |
109 TInt err = KErrNone; |
110 if(iDevAudio->iActiveState != EDevSoundAdaptorPaused_Primed) |
|
111 { |
|
112 err = KErrNotReady; |
|
113 } |
|
114 |
110 |
115 //If following condition is true, then we are here because of a |
111 //If following condition is true, then we are here because of a |
116 //pre-emption clash in last Commit cycle started from |
112 //pre-emption clash in last Commit cycle started from |
117 //CDevCommonControl::ContextEventUpdateWithStateEventAndError. |
113 //CDevCommonControl::ContextEventUpdateWithStateEventAndError. |
118 if(iDevAudio->iActiveState == EDevSoundAdaptorInitialised_Idle && |
114 if(iDevAudio->iActiveState == EDevSoundAdaptorInitialised_Idle && |
119 iDevAudio->iPreviousState == EDevSoundAdaptorUnloading) |
115 iDevAudio->iPreviousState == EDevSoundAdaptorUnloading) |
120 { |
116 { |
121 err = Unload(); |
117 err = Unload(); |
122 DP0_RET(err,"%d"); |
118 DP0_RET(err,"%d"); |
123 } |
119 } |
|
120 else if(iDevAudio->iActiveState != EDevSoundAdaptorPaused_Primed) |
|
121 { |
|
122 DP0_RET(KErrNotReady, "%d"); |
|
123 } |
124 |
124 |
125 if(err == KErrNone) |
125 if(err == KErrNone) |
126 { |
126 { |
127 // Populate gain and balance values set in the Paused state and being cached |
127 // Populate gain and balance values set in the Paused state and being cached |
128 err = iDevAudio->RequestGainAndBalance(this); |
128 err = iDevAudio->RequestGainAndBalance(this); |