mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/src/RecordFormats.cpp
equal
deleted
inserted
replaced
27 |
27 |
28 CRecordFormats::CRecordFormats(CTestModuleIf *aConsole, CStifLogger *aLogger) |
28 CRecordFormats::CRecordFormats(CTestModuleIf *aConsole, CStifLogger *aLogger) |
29 { |
29 { |
30 console = aConsole; |
30 console = aConsole; |
31 logger = aLogger; |
31 logger = aLogger; |
|
32 iCallBackErr = KErrNone; |
32 } |
33 } |
33 |
34 |
34 CRecordFormats::~CRecordFormats() |
35 CRecordFormats::~CRecordFormats() |
35 { |
36 { |
36 if (recorder) delete recorder; |
37 if (recorder) delete recorder; |
79 #ifdef _DEBUG |
80 #ifdef _DEBUG |
80 RDebug::Print (_L ("CRecordFormats::MoscoStateChangeEvent")); |
81 RDebug::Print (_L ("CRecordFormats::MoscoStateChangeEvent")); |
81 #endif |
82 #endif |
82 |
83 |
83 logger->Log(_L("MoscoStateChangeEvent called, error: %d prev: %d curr : %d"),aErrorCode,aPreviousState,aCurrentState); |
84 logger->Log(_L("MoscoStateChangeEvent called, error: %d prev: %d curr : %d"),aErrorCode,aPreviousState,aCurrentState); |
84 |
85 iCallBackErr = aErrorCode; |
|
86 |
85 if (recorder && aErrorCode == KErrNone && aCurrentState == CMdaAudioClipUtility::EOpen) |
87 if (recorder && aErrorCode == KErrNone && aCurrentState == CMdaAudioClipUtility::EOpen) |
86 { |
88 { |
87 TRAPD(err3, recorder->AudioRecorderControllerImplementationInformationL()); |
89 TRAPD(err3, recorder->AudioRecorderControllerImplementationInformationL()); |
88 if (err3 != KErrNone) |
90 if (err3 != KErrNone) |
89 { |
91 { |
104 |
106 |
105 |
107 |
106 |
108 |
107 TInt CRecordFormats::RunTestL(CTestModuleIf* aConsole, CStifLogger *aLogger, CStifSectionParser* aParser, TInt* /*clipCounter*/) |
109 TInt CRecordFormats::RunTestL(CTestModuleIf* aConsole, CStifLogger *aLogger, CStifSectionParser* aParser, TInt* /*clipCounter*/) |
108 { |
110 { |
|
111 TInt error = KErrNone; |
109 aLogger->Log(_L("Creating scheduler")); |
112 aLogger->Log(_L("Creating scheduler")); |
110 |
113 |
111 CActiveScheduler* scheduler = new (ELeave) CActiveScheduler; |
114 CActiveScheduler* scheduler = new (ELeave) CActiveScheduler; |
112 CleanupStack::PushL(scheduler); // push to clean-up stack |
115 CleanupStack::PushL(scheduler); // push to clean-up stack |
113 CActiveScheduler::Install(scheduler); // install as active scheduler |
116 CActiveScheduler::Install(scheduler); // install as active scheduler |
134 CleanupStack::PushL(selfObj); |
137 CleanupStack::PushL(selfObj); |
135 |
138 |
136 CActiveScheduler::Start(); |
139 CActiveScheduler::Start(); |
137 |
140 |
138 CleanupStack::PopAndDestroy(2); |
141 CleanupStack::PopAndDestroy(2); |
139 |
142 |
140 return KErrNone; |
143 if(selfObj->iCallBackErr != KErrNone) |
|
144 error = selfObj->iCallBackErr; |
|
145 |
|
146 return error; |
141 } |
147 } |
142 |
148 |
143 |
149 |
144 void CRecordFormats::GetFileName(TPtrC path, TFileName* fileName) |
150 void CRecordFormats::GetFileName(TPtrC path, TFileName* fileName) |
145 { |
151 { |