mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/src/AudioResourceNotification.cpp
equal
deleted
inserted
replaced
26 |
26 |
27 CAudioResourceNotification::CAudioResourceNotification(CTestModuleIf *aConsole, CStifLogger *aLogger) |
27 CAudioResourceNotification::CAudioResourceNotification(CTestModuleIf *aConsole, CStifLogger *aLogger) |
28 { |
28 { |
29 console = aConsole; |
29 console = aConsole; |
30 logger = aLogger; |
30 logger = aLogger; |
|
31 iCallBackErr = KErrNone; |
31 |
32 |
32 } |
33 } |
33 |
34 |
34 CAudioResourceNotification::~CAudioResourceNotification() |
35 CAudioResourceNotification::~CAudioResourceNotification() |
35 { |
36 { |
105 |
106 |
106 |
107 |
107 CleanupStack::PushL(selfObj); |
108 CleanupStack::PushL(selfObj); |
108 |
109 |
109 CActiveScheduler::Start(); |
110 CActiveScheduler::Start(); |
110 |
111 if(selfObj->iCallBackErr != KErrNone) |
|
112 { |
|
113 error = selfObj->iCallBackErr; |
|
114 } |
111 |
115 |
112 CleanupStack::PopAndDestroy(2); // schedule, selfObj |
116 CleanupStack::PopAndDestroy(2); // schedule, selfObj |
113 |
117 |
114 return error; |
118 return error; |
115 } |
119 } |
139 #endif |
143 #endif |
140 TInt err = KErrNone; |
144 TInt err = KErrNone; |
141 |
145 |
142 logger->Log(_L("MoscoStateChangeEvent called, error: %d prev: %d curr : %d"),aErrorCode,aPreviousState,aCurrentState); |
146 logger->Log(_L("MoscoStateChangeEvent called, error: %d prev: %d curr : %d"),aErrorCode,aPreviousState,aCurrentState); |
143 |
147 |
144 |
148 iCallBackErr = aErrorCode; |
145 |
149 |
146 if (recorder && aErrorCode == KErrNone && aCurrentState == CMdaAudioClipUtility::EOpen && aPreviousState == 0) |
150 if (recorder && aErrorCode == KErrNone && aCurrentState == CMdaAudioClipUtility::EOpen && aPreviousState == 0) |
147 { |
151 { |
148 TBuf8<25> dataFrom; |
152 TBuf8<25> dataFrom; |
149 |
153 |
203 if (recorder && aErrorCode == KErrNone && aCurrentState == CMdaAudioClipUtility::EOpen && aPreviousState == CMdaAudioClipUtility::EPlaying) |
207 if (recorder && aErrorCode == KErrNone && aCurrentState == CMdaAudioClipUtility::EOpen && aPreviousState == CMdaAudioClipUtility::EPlaying) |
204 { |
208 { |
205 |
209 |
206 recorder->WillResumePlay(); |
210 recorder->WillResumePlay(); |
207 CActiveScheduler::Stop(); |
211 CActiveScheduler::Stop(); |
208 } |
212 return; |
209 |
213 } |
210 return; |
214 if (aErrorCode != KErrNone) |
|
215 { |
|
216 |
|
217 CActiveScheduler::Stop(); |
|
218 return; |
|
219 } |
|
220 |
211 |
221 |
212 } |
222 } |
213 |
223 |
214 void CAudioResourceNotification::MaloLoadingStarted() |
224 void CAudioResourceNotification::MaloLoadingStarted() |
215 { |
225 { |
220 { |
230 { |
221 logger->Log(_L("MaloLoadingComplete ")); |
231 logger->Log(_L("MaloLoadingComplete ")); |
222 } |
232 } |
223 |
233 |
224 |
234 |
225 void CAudioResourceNotification::MarncResourceAvailable(TUid aNotificationEventId, const TDesC8 &aNotificationData) |
235 void CAudioResourceNotification::MarncResourceAvailable(TUid /*aNotificationEventId*/, const TDesC8 &/*aNotificationData*/) |
226 { |
236 { |
227 logger->Log(_L("MarncResourceAvailable ")); |
237 logger->Log(_L("MarncResourceAvailable ")); |
228 } |
238 } |
229 |
239 |
230 void CAudioResourceNotification::GetFileName(TPtrC path, TFileName* fileName) |
240 void CAudioResourceNotification::GetFileName(TPtrC path, TFileName* fileName) |