mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/src/ThreadPriority.cpp
equal
deleted
inserted
replaced
104 |
104 |
105 |
105 |
106 CleanupStack::PushL(selfObj); |
106 CleanupStack::PushL(selfObj); |
107 |
107 |
108 CActiveScheduler::Start(); |
108 CActiveScheduler::Start(); |
109 |
109 |
110 if(selfObj->iCallbackErr != KErrNone) |
110 |
111 error = selfObj->iCallbackErr; |
|
112 |
|
113 CleanupStack::PopAndDestroy(2); // schedule, selfObj |
111 CleanupStack::PopAndDestroy(2); // schedule, selfObj |
114 |
112 |
115 return error; |
113 return error; |
116 } |
114 } |
117 |
115 |
136 void CThreadPriority::MoscoStateChangeEvent(CBase* /*aObject*/, TInt aPreviousState, TInt aCurrentState, TInt aErrorCode) |
134 void CThreadPriority::MoscoStateChangeEvent(CBase* /*aObject*/, TInt aPreviousState, TInt aCurrentState, TInt aErrorCode) |
137 { |
135 { |
138 #ifdef _DEBUG |
136 #ifdef _DEBUG |
139 RDebug::Print (_L ("CThreadPriority::MoscoStateChangeEvent")); |
137 RDebug::Print (_L ("CThreadPriority::MoscoStateChangeEvent")); |
140 #endif |
138 #endif |
141 |
139 TInt err = KErrNone; |
142 |
140 |
143 logger->Log(_L("MoscoStateChangeEvent called, error: %d prev: %d curr : %d"),aErrorCode,aPreviousState,aCurrentState); |
141 logger->Log(_L("MoscoStateChangeEvent called, error: %d prev: %d curr : %d"),aErrorCode,aPreviousState,aCurrentState); |
144 logger->Log(_L("Before Checking Duaration.")); |
142 logger->Log(_L("Before Checking Duaration.")); |
145 iCallbackErr = aErrorCode; |
|
146 |
|
147 TTimeIntervalMicroSeconds aDuration, aRecordTime; |
143 TTimeIntervalMicroSeconds aDuration, aRecordTime; |
148 TMMFDurationInfo clipDuration = recorder->Duration(aDuration); |
144 TMMFDurationInfo clipDuration = recorder->Duration(aDuration); |
149 logger->Log(_L("Duaration is %d"), aDuration.Int64()); |
145 logger->Log(_L("Duaration is %d"), aDuration.Int64()); |
150 |
146 |
151 |
147 |
193 //aRecordTime= recorder->RecordTimeAvailable(); |
189 //aRecordTime= recorder->RecordTimeAvailable(); |
194 //logger->Log(_L("RecordTimeAvailable %d"), aRecordTime); |
190 //logger->Log(_L("RecordTimeAvailable %d"), aRecordTime); |
195 |
191 |
196 |
192 |
197 CActiveScheduler::Stop(); |
193 CActiveScheduler::Stop(); |
198 return; |
194 } |
199 } |
195 |
200 if (aErrorCode != KErrNone) |
196 |
201 { |
197 return; |
202 |
|
203 CActiveScheduler::Stop(); |
|
204 return ; |
|
205 } |
|
206 |
|
207 |
|
208 |
|
209 |
198 |
210 } |
199 } |
211 |
200 |
212 |
201 |
213 |
202 |