0
|
1 |
// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
2 |
// All rights reserved.
|
|
3 |
// This component and the accompanying materials are made available
|
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
|
5 |
// which accompanies this distribution, and is available
|
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
7 |
//
|
|
8 |
// Initial Contributors:
|
|
9 |
// Nokia Corporation - initial contribution.
|
|
10 |
//
|
|
11 |
// Contributors:
|
|
12 |
//
|
|
13 |
// Description:
|
|
14 |
// This file contains an example Test step implementation
|
|
15 |
// This demonstrates the various functions provided
|
|
16 |
// by the CTestStep base class which are available within
|
|
17 |
// a test step
|
|
18 |
//
|
|
19 |
//
|
|
20 |
|
|
21 |
// EPOC includes
|
|
22 |
#include <e32base.h>
|
|
23 |
#include <e32test.h>
|
|
24 |
#include <e32keys.h>
|
|
25 |
#include <c32comm.h>
|
|
26 |
#include <f32file.h>
|
|
27 |
#include <etel.h>
|
|
28 |
#include <etelmm.h>
|
|
29 |
#include <testframework.h>
|
|
30 |
|
|
31 |
#include <mdaaudiosampleplayer.h>
|
|
32 |
//#include <MdaAudioSampleEditor.h>
|
|
33 |
//#include <MdaAudioTonePlayer.h>
|
|
34 |
|
|
35 |
// Test system includes
|
|
36 |
#include <testframework.h>
|
|
37 |
|
|
38 |
// Specific includes for this test suite
|
|
39 |
#include "TestStepUnitMMFAudClient.h"
|
|
40 |
#include "TestSuiteUnitMMFAudClient.h"
|
|
41 |
|
|
42 |
// Specific includes for these test steps
|
|
43 |
#include "TestStepPlayerNew.h"
|
|
44 |
|
|
45 |
#include "mmfclientaudioplayer.h"
|
|
46 |
|
|
47 |
// Path where the test files reside
|
|
48 |
_LIT(KFilePath, "C:\\mm\\mmf\\testfiles\\aclnt\\");
|
|
49 |
|
|
50 |
// --------------------------------------------
|
|
51 |
|
|
52 |
/**
|
|
53 |
*
|
|
54 |
* Static constructor for CTestStepPlayerPlay.
|
|
55 |
*
|
|
56 |
*
|
|
57 |
* @return "CTestStepPlayerPlay*"
|
|
58 |
* The constructed CTestStepPlayerPlay
|
|
59 |
*
|
|
60 |
* @xxxx
|
|
61 |
*
|
|
62 |
*/
|
|
63 |
CTestStepPlayerPlay* CTestStepPlayerPlay::NewL()
|
|
64 |
{
|
|
65 |
CTestStepPlayerPlay* self = new(ELeave) CTestStepPlayerPlay;
|
|
66 |
return self;
|
|
67 |
}
|
|
68 |
|
|
69 |
/**
|
|
70 |
*
|
|
71 |
* Test step constructor.
|
|
72 |
* Each test step initialises its own name.
|
|
73 |
*
|
|
74 |
* @xxxx
|
|
75 |
*
|
|
76 |
*/
|
|
77 |
CTestStepPlayerPlay::CTestStepPlayerPlay() : iHasPlayed(EFalse)
|
|
78 |
{
|
|
79 |
iTestStepResult = EPass;
|
|
80 |
// store the name of this test case
|
|
81 |
// this is the name that is used by the script file
|
|
82 |
iTestStepName = _L("MM-MMF-ACLNT-U-0010-CP");
|
|
83 |
}
|
|
84 |
|
|
85 |
/**
|
|
86 |
*
|
|
87 |
* Test step destructor.
|
|
88 |
*
|
|
89 |
* @xxxx
|
|
90 |
*
|
|
91 |
*/
|
|
92 |
CTestStepPlayerPlay::~CTestStepPlayerPlay()
|
|
93 |
{
|
|
94 |
}
|
|
95 |
/**
|
|
96 |
* Implementation of the MMdaAudioPlayerCallback interface functions
|
|
97 |
**/
|
|
98 |
void CTestStepPlayerPlay::MapcInitComplete(TInt aError,
|
|
99 |
const TTimeIntervalMicroSeconds &/*aDuration*/)
|
|
100 |
{
|
|
101 |
iError = aError;
|
|
102 |
CActiveScheduler::Stop();
|
|
103 |
}
|
|
104 |
|
|
105 |
void CTestStepPlayerPlay::MapcPlayComplete(TInt aError)
|
|
106 |
{
|
|
107 |
iError = aError;
|
|
108 |
if (iError == KErrNone)
|
|
109 |
iHasPlayed = ETrue;
|
|
110 |
CActiveScheduler::Stop();
|
|
111 |
}
|
|
112 |
|
|
113 |
/**
|
|
114 |
*
|
|
115 |
* Test step Preamble.
|
|
116 |
*
|
|
117 |
* @xxxx
|
|
118 |
*
|
|
119 |
*/
|
|
120 |
enum TVerdict CTestStepPlayerPlay::DoTestStepPreambleL(void)
|
|
121 |
{
|
|
122 |
enum TVerdict verdict;
|
|
123 |
// this installs the scheduler
|
|
124 |
verdict = CTestStepUnitMMFAudClient::DoTestStepPreambleL();
|
|
125 |
|
|
126 |
// Printing to the console and log file
|
|
127 |
INFO_PRINTF1(_L("MM-MMF-ACLNT-U-0010-CP"));
|
|
128 |
INFO_PRINTF1(_L("this test is playing a sound file after openning it. Play()"));
|
|
129 |
|
|
130 |
iError = KErrNone;
|
|
131 |
|
|
132 |
if(!GetStringFromConfig(_L("SectionOne"), _L("AudioPlayFName1"), iFileName))
|
|
133 |
{
|
|
134 |
INFO_PRINTF2(_L("file name %S not found..."), &iFileName);
|
|
135 |
return EInconclusive;
|
|
136 |
}
|
|
137 |
|
|
138 |
// 23_01_06 This test case has been modified in order to provide regression testing for improved CAF file sharing.
|
|
139 |
// See defect DEF076592. This test case ensures that a file can be played that has already been opened for reading/writing.
|
|
140 |
RFs fs;
|
|
141 |
User::LeaveIfError(fs.Connect());
|
|
142 |
CleanupClosePushL(fs);
|
|
143 |
|
|
144 |
RFile temp;
|
|
145 |
temp.Open(fs, iFileName, EFileRead|EFileWrite|EFileShareReadersOnly);
|
|
146 |
CleanupClosePushL(temp);
|
|
147 |
|
|
148 |
iPlayer = CMMFMdaAudioPlayerUtility::NewFilePlayerL(iFileName, *this);
|
|
149 |
CActiveScheduler::Start();
|
|
150 |
User::After(1000000);
|
|
151 |
|
|
152 |
CleanupStack::PopAndDestroy(2, &fs);
|
|
153 |
|
|
154 |
if (iPlayer == NULL ||
|
|
155 |
iError != KErrNone )
|
|
156 |
return EInconclusive;
|
|
157 |
|
|
158 |
return verdict;
|
|
159 |
}
|
|
160 |
|
|
161 |
/**
|
|
162 |
*
|
|
163 |
* Test step Postamble.
|
|
164 |
*
|
|
165 |
* @xxxx
|
|
166 |
*
|
|
167 |
*/
|
|
168 |
enum TVerdict CTestStepPlayerPlay::DoTestStepPostambleL(void)
|
|
169 |
{
|
|
170 |
delete iPlayer;
|
|
171 |
iPlayer = NULL;
|
|
172 |
//[ Destroy the scheduler ]
|
|
173 |
return CTestStepUnitMMFAudClient::DoTestStepPostambleL();
|
|
174 |
}
|
|
175 |
|
|
176 |
/**
|
|
177 |
*
|
|
178 |
* Do the test step.
|
|
179 |
* Each test step must supply an implementation for DoTestStepL.
|
|
180 |
*
|
|
181 |
* @return "TVerdict"
|
|
182 |
* The result of the test step
|
|
183 |
*
|
|
184 |
* @xxxx
|
|
185 |
*
|
|
186 |
*/
|
|
187 |
TVerdict CTestStepPlayerPlay::DoTestStepL()
|
|
188 |
{
|
|
189 |
//__MM_HEAP_MARK;
|
|
190 |
|
|
191 |
// check if player openned the file successfully
|
|
192 |
TInt err1 = KErrNone;
|
|
193 |
TInt state = 0;
|
|
194 |
err1 = GetAudPlayerState(iPlayer, state);
|
|
195 |
if ( state != CMMFMdaAudioPlayerUtility::EStopped )
|
|
196 |
return EInconclusive;
|
|
197 |
|
|
198 |
TInt err2 = iPlayer->SetThreadPriority(EPriorityAbsoluteHigh);
|
|
199 |
if (err2 != KErrNone)
|
|
200 |
{
|
|
201 |
INFO_PRINTF1(_L("Failed to set the player's thread priority"));
|
|
202 |
return EFail;
|
|
203 |
}
|
|
204 |
|
|
205 |
iPlayer->Play();
|
|
206 |
CActiveScheduler::Start();
|
|
207 |
|
|
208 |
User::After(500000);
|
|
209 |
|
|
210 |
iPlayer->Pause(); //JPW
|
|
211 |
|
|
212 |
|
|
213 |
User::After(2000000);
|
|
214 |
|
|
215 |
err2 = KErrNone;
|
|
216 |
TMMFMessageDestination* srcHandle = NULL;
|
|
217 |
err1 = GetAudPlayerState(iPlayer, state);
|
|
218 |
err2 = GetAudPlayerSourceHandle(iPlayer, srcHandle);
|
|
219 |
if ( err1 != KErrNone ||
|
|
220 |
err2 != KErrNone ||
|
|
221 |
&srcHandle == NULL ||
|
|
222 |
state != CMMFMdaAudioPlayerUtility::EStopped ||
|
|
223 |
!iHasPlayed ||
|
|
224 |
iError != KErrNone)
|
|
225 |
iTestStepResult = EFail;
|
|
226 |
|
|
227 |
|
|
228 |
//__MM_HEAP_MARKEND;
|
|
229 |
|
|
230 |
INFO_PRINTF1(_L("finished with this test step"));
|
|
231 |
// test steps return a result
|
|
232 |
return iTestStepResult;
|
|
233 |
}
|
|
234 |
|
|
235 |
|
|
236 |
/**
|
|
237 |
*
|
|
238 |
* Static constructor for CTestStepPlayerPlay.
|
|
239 |
*
|
|
240 |
*
|
|
241 |
* @return "CTestStepPlayerPlay*"
|
|
242 |
* The constructed CTestStepPlayerPlay
|
|
243 |
*
|
|
244 |
* @xxxx
|
|
245 |
*
|
|
246 |
*/
|
|
247 |
CTestStepPlayerPlayTwice* CTestStepPlayerPlayTwice::NewL()
|
|
248 |
{
|
|
249 |
CTestStepPlayerPlayTwice* self = new(ELeave) CTestStepPlayerPlayTwice;
|
|
250 |
return self;
|
|
251 |
}
|
|
252 |
|
|
253 |
/**
|
|
254 |
*
|
|
255 |
* Test step constructor.
|
|
256 |
* Each test step initialises its own name.
|
|
257 |
*
|
|
258 |
* @xxxx
|
|
259 |
*
|
|
260 |
*/
|
|
261 |
CTestStepPlayerPlayTwice::CTestStepPlayerPlayTwice()
|
|
262 |
: iHasPlayed(EFalse)
|
|
263 |
{
|
|
264 |
iTestStepResult = EPass;
|
|
265 |
// store the name of this test case
|
|
266 |
// this is the name that is used by the script file
|
|
267 |
iTestStepName = _L("MM-MMF-ACLNT-U-0012-CP");
|
|
268 |
}
|
|
269 |
|
|
270 |
/**
|
|
271 |
* Implementation of the MMdaAudioPlayerCallback interface functions
|
|
272 |
**/
|
|
273 |
void CTestStepPlayerPlayTwice::MapcInitComplete(TInt aError,
|
|
274 |
const TTimeIntervalMicroSeconds &/*aDuration*/)
|
|
275 |
{
|
|
276 |
iError = aError;
|
|
277 |
CActiveScheduler::Stop();
|
|
278 |
}
|
|
279 |
|
|
280 |
void CTestStepPlayerPlayTwice::MapcPlayComplete(TInt aError)
|
|
281 |
{
|
|
282 |
iError = aError;
|
|
283 |
if (iError == KErrNone)
|
|
284 |
iHasPlayed = ETrue;
|
|
285 |
CActiveScheduler::Stop();
|
|
286 |
}
|
|
287 |
|
|
288 |
/**
|
|
289 |
*
|
|
290 |
* Test step Preamble.
|
|
291 |
*
|
|
292 |
* @xxxx
|
|
293 |
*
|
|
294 |
*/
|
|
295 |
enum TVerdict CTestStepPlayerPlayTwice::DoTestStepPreambleL(void)
|
|
296 |
{
|
|
297 |
enum TVerdict verdict;
|
|
298 |
// this installs the scheduler
|
|
299 |
verdict = CTestStepUnitMMFAudClient::DoTestStepPreambleL();
|
|
300 |
|
|
301 |
// Printing to the console and log file
|
|
302 |
INFO_PRINTF1(_L("MM-MMF-ACLNT-U-0012-CP"));
|
|
303 |
INFO_PRINTF1(_L("This test is calling Play() twice"));
|
|
304 |
|
|
305 |
iError = KErrNone;
|
|
306 |
|
|
307 |
if(!GetStringFromConfig(_L("SectionOne"), _L("AudioPlayFName1"), iFileName))
|
|
308 |
{
|
|
309 |
//INFO_PRINTF2(_L("file name %s not found..."), fileptr);
|
|
310 |
return EInconclusive;
|
|
311 |
}
|
|
312 |
|
|
313 |
// This test case has been modified in order to provide regression testing for improved CAF file sharing
|
|
314 |
// See defect DEF076592. This test case now checks that a file can be played from z:\resource
|
|
315 |
_LIT(KResFile, "z:\\resource\\small.wav");
|
|
316 |
TBuf<100> temp;
|
|
317 |
temp.Copy(KResFile);
|
|
318 |
iPlayer = CMMFMdaAudioPlayerUtility::NewFilePlayerL(temp, *this);
|
|
319 |
CActiveScheduler::Start();
|
|
320 |
User::After(1000000);
|
|
321 |
|
|
322 |
if (iPlayer == NULL ||
|
|
323 |
iError != KErrNone )
|
|
324 |
return EInconclusive;
|
|
325 |
|
|
326 |
return verdict;
|
|
327 |
}
|
|
328 |
|
|
329 |
/**
|
|
330 |
*
|
|
331 |
* Test step Postamble.
|
|
332 |
*
|
|
333 |
* @xxxx
|
|
334 |
*
|
|
335 |
*/
|
|
336 |
TVerdict CTestStepPlayerPlayTwice::DoTestStepPostambleL(void)
|
|
337 |
{
|
|
338 |
delete iPlayer;
|
|
339 |
iPlayer = NULL;
|
|
340 |
//[ Destroy the scheduler ]
|
|
341 |
return CTestStepUnitMMFAudClient::DoTestStepPostambleL();
|
|
342 |
}
|
|
343 |
|
|
344 |
/**
|
|
345 |
*
|
|
346 |
* Do the test step.
|
|
347 |
* Each test step must supply an implementation for DoTestStepL.
|
|
348 |
*
|
|
349 |
* @return "TVerdict"
|
|
350 |
* The result of the test step
|
|
351 |
*
|
|
352 |
* @xxxx
|
|
353 |
*
|
|
354 |
*/
|
|
355 |
TVerdict CTestStepPlayerPlayTwice::DoTestStepL()
|
|
356 |
{
|
|
357 |
//__MM_HEAP_MARK;
|
|
358 |
|
|
359 |
// check if player openned the file successfully
|
|
360 |
TInt err1 = KErrNone;
|
|
361 |
TInt state = 0;
|
|
362 |
err1 = GetAudPlayerState(iPlayer, state);
|
|
363 |
if ( state != CMMFMdaAudioPlayerUtility::EStopped )
|
|
364 |
return EInconclusive;
|
|
365 |
|
|
366 |
// used to measure the time it takes to play
|
|
367 |
TTime timeStart;
|
|
368 |
TTime timeEnd;
|
|
369 |
|
|
370 |
// start the timer
|
|
371 |
timeStart.UniversalTime();
|
|
372 |
|
|
373 |
// Play
|
|
374 |
iPlayer->Play();
|
|
375 |
CActiveScheduler::Start();
|
|
376 |
|
|
377 |
// stop the timer
|
|
378 |
timeEnd.UniversalTime();
|
|
379 |
TTimeIntervalMicroSeconds playDuration1 =
|
|
380 |
timeEnd.MicroSecondsFrom(timeStart);
|
|
381 |
|
|
382 |
User::After(2000000);
|
|
383 |
|
|
384 |
TInt err2 = KErrNone;
|
|
385 |
TMMFMessageDestination* srcHandle = NULL;
|
|
386 |
err1 = GetAudPlayerState(iPlayer, state);
|
|
387 |
err2 = GetAudPlayerSourceHandle(iPlayer, srcHandle);
|
|
388 |
if ( err1 != KErrNone ||
|
|
389 |
err2 != KErrNone ||
|
|
390 |
&srcHandle == NULL ||
|
|
391 |
state != CMMFMdaAudioPlayerUtility::EStopped ||
|
|
392 |
!iHasPlayed ||
|
|
393 |
iError != KErrNone)
|
|
394 |
{
|
|
395 |
iTestStepResult = EFail;
|
|
396 |
}
|
|
397 |
|
|
398 |
// start the timer
|
|
399 |
timeStart.UniversalTime();
|
|
400 |
|
|
401 |
// Play again
|
|
402 |
iPlayer->Play();
|
|
403 |
CActiveScheduler::Start();
|
|
404 |
|
|
405 |
// stop the timer
|
|
406 |
timeEnd.UniversalTime();
|
|
407 |
TTimeIntervalMicroSeconds playDuration2 =
|
|
408 |
timeEnd.MicroSecondsFrom(timeStart);
|
|
409 |
|
|
410 |
// calculate the difference (hopefully pretty small)
|
|
411 |
TInt64 playDurationDiff =
|
|
412 |
playDuration2.Int64() - playDuration1.Int64();
|
|
413 |
// make sure it's a positive number
|
|
414 |
if (playDurationDiff < 0)
|
|
415 |
playDurationDiff = -playDurationDiff;
|
|
416 |
|
|
417 |
INFO_PRINTF2(_L("Duration #1 = %d microseconds"), (long)(playDuration1.Int64()));
|
|
418 |
INFO_PRINTF2(_L("Duration #2 = %d microseconds"), (long)(playDuration2.Int64()));
|
|
419 |
INFO_PRINTF2(_L("Difference = %d microseconds"), (long)playDurationDiff);
|
|
420 |
if (playDurationDiff > 250000)
|
|
421 |
{
|
|
422 |
INFO_PRINTF1(_L("Error: Difference is too high"));
|
|
423 |
#ifdef __WINS__
|
|
424 |
// under WINS these values can't be trusted due to both
|
|
425 |
// background processing and timer resolution
|
|
426 |
// report the difference as an error but still allow
|
|
427 |
// the test to pass.
|
|
428 |
INFO_PRINTF1(_L("This is Emulator so allowing test to still pass..."));
|
|
429 |
#else
|
|
430 |
iTestStepResult = EFail;
|
|
431 |
#endif
|
|
432 |
}
|
|
433 |
|
|
434 |
User::After(2000000);
|
|
435 |
|
|
436 |
err2 = KErrNone;
|
|
437 |
srcHandle = NULL;
|
|
438 |
err1 = GetAudPlayerState(iPlayer, state);
|
|
439 |
err2 = GetAudPlayerSourceHandle(iPlayer, srcHandle);
|
|
440 |
if ( err1 != KErrNone ||
|
|
441 |
err2 != KErrNone ||
|
|
442 |
&srcHandle == NULL ||
|
|
443 |
state != CMMFMdaAudioPlayerUtility::EStopped ||
|
|
444 |
!iHasPlayed ||
|
|
445 |
iError != KErrNone)
|
|
446 |
{
|
|
447 |
INFO_PRINTF1(_L("Invalid player state"));
|
|
448 |
iTestStepResult = EFail;
|
|
449 |
}
|
|
450 |
|
|
451 |
//__MM_HEAP_MARKEND;
|
|
452 |
|
|
453 |
INFO_PRINTF1(_L("finished with this test step"));
|
|
454 |
// test steps return a result
|
|
455 |
return iTestStepResult;
|
|
456 |
}
|
|
457 |
|
|
458 |
/**
|
|
459 |
*
|
|
460 |
* Static constructor for CTestStepPlayerPlayThreeTimes.
|
|
461 |
*
|
|
462 |
*
|
|
463 |
* @return "CTestStepPlayerPlayThreeTimes*"
|
|
464 |
* The constructed CTestStepPlayerPlayThreeTimes
|
|
465 |
*
|
|
466 |
* @xxxx
|
|
467 |
*
|
|
468 |
*/
|
|
469 |
CTestStepPlayerPlayThreeTimes* CTestStepPlayerPlayThreeTimes::NewL()
|
|
470 |
{
|
|
471 |
CTestStepPlayerPlayThreeTimes* self = new(ELeave) CTestStepPlayerPlayThreeTimes;
|
|
472 |
return self;
|
|
473 |
}
|
|
474 |
|
|
475 |
CTestStepPlayerPlayThreeTimes::CTestStepPlayerPlayThreeTimes()
|
|
476 |
: iHasPlayed(EFalse)
|
|
477 |
{
|
|
478 |
// store the name of this test case
|
|
479 |
// this is the name that is used by the script file
|
|
480 |
iTestStepName = _L("MM-MMF-ACLNT-U-0013-CP");
|
|
481 |
}
|
|
482 |
|
|
483 |
/**
|
|
484 |
* Implementation of the MMdaAudioPlayerCallback interface functions
|
|
485 |
**/
|
|
486 |
void CTestStepPlayerPlayThreeTimes::MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& /*aDuration*/)
|
|
487 |
{
|
|
488 |
iError = aError;
|
|
489 |
CActiveScheduler::Stop();
|
|
490 |
}
|
|
491 |
|
|
492 |
void CTestStepPlayerPlayThreeTimes::MapcPlayComplete(TInt aError)
|
|
493 |
{
|
|
494 |
iError = aError;
|
|
495 |
if (iError == KErrNone)
|
|
496 |
iHasPlayed = ETrue;
|
|
497 |
CActiveScheduler::Stop();
|
|
498 |
}
|
|
499 |
|
|
500 |
TVerdict CTestStepPlayerPlayThreeTimes::DoTestStepPreambleL(void)
|
|
501 |
{
|
|
502 |
TVerdict verdict;
|
|
503 |
// this installs the scheduler
|
|
504 |
verdict = CTestStepUnitMMFAudClient::DoTestStepPreambleL();
|
|
505 |
|
|
506 |
// Printing to the console and log file
|
|
507 |
INFO_PRINTF1(_L("MM-MMF-ACLNT-U-0013-CP"));
|
|
508 |
INFO_PRINTF1(_L("This test is calling Play() three times"));
|
|
509 |
|
|
510 |
iError = KErrNone;
|
|
511 |
|
|
512 |
if (!GetStringFromConfig(_L("SectionOne"), _L("AudioPlayFName2"), iFileName))
|
|
513 |
{
|
|
514 |
return EInconclusive;
|
|
515 |
}
|
|
516 |
|
|
517 |
iPlayer = CMMFMdaAudioPlayerUtility::NewFilePlayerL(iFileName, *this);
|
|
518 |
CActiveScheduler::Start();
|
|
519 |
User::After(1000000);
|
|
520 |
|
|
521 |
if (iPlayer == NULL || iError != KErrNone )
|
|
522 |
return EInconclusive;
|
|
523 |
|
|
524 |
return verdict;
|
|
525 |
}
|
|
526 |
|
|
527 |
TVerdict CTestStepPlayerPlayThreeTimes::DoTestStepPostambleL(void)
|
|
528 |
{
|
|
529 |
delete iPlayer;
|
|
530 |
iPlayer = NULL;
|
|
531 |
//[ Destroy the scheduler ]
|
|
532 |
return CTestStepUnitMMFAudClient::DoTestStepPostambleL();
|
|
533 |
}
|
|
534 |
|
|
535 |
TVerdict CTestStepPlayerPlayThreeTimes::DoTestStepL()
|
|
536 |
{
|
|
537 |
// check if player openned the file successfully
|
|
538 |
// TInt err1 = KErrNone; // EABI warning removal
|
|
539 |
TInt state = 0;
|
|
540 |
// err1 = GetAudPlayerState(iPlayer, state);
|
|
541 |
GetAudPlayerState(iPlayer, state); // EABI warning removal
|
|
542 |
if ( state != CMMFMdaAudioPlayerUtility::EStopped )
|
|
543 |
return EInconclusive;
|
|
544 |
|
|
545 |
TCallBack cb(PlayThreeTimesCallBack, this);
|
|
546 |
iTimer = CPeriodic::NewL(CActive::EPriorityLow);
|
|
547 |
|
|
548 |
// Play
|
|
549 |
INFO_PRINTF1(_L("Playing for first time"));
|
|
550 |
iPlayer->Play();
|
|
551 |
iTimer->Start(1500000, 3000000, cb);
|
|
552 |
CActiveScheduler::Start();
|
|
553 |
if (iError != KErrNone || iHasPlayed)
|
|
554 |
{
|
|
555 |
INFO_PRINTF3(_L("Error playing first time iError = %d, iHasPlayed = %d"), iError, iHasPlayed);
|
|
556 |
return EFail;
|
|
557 |
}
|
|
558 |
|
|
559 |
User::After(500000);
|
|
560 |
|
|
561 |
// Play again
|
|
562 |
INFO_PRINTF1(_L("Playing for second time"));
|
|
563 |
iPlayer->Play();
|
|
564 |
CActiveScheduler::Start();
|
|
565 |
if (iError != KErrNone || !iHasPlayed)
|
|
566 |
{
|
|
567 |
INFO_PRINTF3(_L("Error playing second time iError = %d, iHasPlayed = %d"), iError, iHasPlayed);
|
|
568 |
return EFail;
|
|
569 |
}
|
|
570 |
|
|
571 |
User::After(2000000);
|
|
572 |
|
|
573 |
// Play third time
|
|
574 |
INFO_PRINTF1(_L("Playing for third time"));
|
|
575 |
iPlayer->Play();
|
|
576 |
CActiveScheduler::Start();
|
|
577 |
if (iError != KErrNone || !iHasPlayed)
|
|
578 |
{
|
|
579 |
INFO_PRINTF3(_L("Error playing third time iError = %d, iHasPlayed = %d"), iError, iHasPlayed);
|
|
580 |
return EFail;
|
|
581 |
}
|
|
582 |
|
|
583 |
INFO_PRINTF1(_L("finished with this test step"));
|
|
584 |
|
|
585 |
return iTestStepResult;
|
|
586 |
}
|
|
587 |
|
|
588 |
TInt CTestStepPlayerPlayThreeTimes::PlayThreeTimesCallBack(TAny* aPtr)
|
|
589 |
{
|
|
590 |
CTestStepPlayerPlayThreeTimes* self = static_cast<CTestStepPlayerPlayThreeTimes*>(aPtr);
|
|
591 |
self->DoPlayThreeTimesCallBack();
|
|
592 |
return EFalse;
|
|
593 |
}
|
|
594 |
|
|
595 |
void CTestStepPlayerPlayThreeTimes::DoPlayThreeTimesCallBack()
|
|
596 |
{
|
|
597 |
iPlayer->Stop();
|
|
598 |
iTimer->Cancel();
|
|
599 |
CActiveScheduler::Stop();
|
|
600 |
}
|
|
601 |
|
|
602 |
/**
|
|
603 |
*
|
|
604 |
* Static constructor for CTestStepPlayerClosePlay.
|
|
605 |
*
|
|
606 |
*
|
|
607 |
* @return "CTestStepPlayerPlay*"
|
|
608 |
* The constructed CTestStepPlayerPlay
|
|
609 |
*
|
|
610 |
* @xxxx
|
|
611 |
*
|
|
612 |
*/
|
|
613 |
CTestStepPlayerClosePlay* CTestStepPlayerClosePlay::NewL()
|
|
614 |
{
|
|
615 |
CTestStepPlayerClosePlay* self = new(ELeave) CTestStepPlayerClosePlay;
|
|
616 |
return self;
|
|
617 |
}
|
|
618 |
|
|
619 |
/**
|
|
620 |
*
|
|
621 |
* Test step constructor.
|
|
622 |
* Each test step initialises its own name.
|
|
623 |
*
|
|
624 |
* @xxxx
|
|
625 |
*
|
|
626 |
*/
|
|
627 |
CTestStepPlayerClosePlay::CTestStepPlayerClosePlay()
|
|
628 |
{
|
|
629 |
// store the name of this test case
|
|
630 |
// this is the name that is used by the script file
|
|
631 |
iTestStepName = _L("MM-MMF-ACLNT-U-0015-CP");
|
|
632 |
}
|
|
633 |
|
|
634 |
/**
|
|
635 |
*
|
|
636 |
* Test step destructor.
|
|
637 |
*
|
|
638 |
* @xxxx
|
|
639 |
*
|
|
640 |
*/
|
|
641 |
CTestStepPlayerClosePlay::~CTestStepPlayerClosePlay()
|
|
642 |
{
|
|
643 |
}
|
|
644 |
/**
|
|
645 |
* Implementation of the MMdaAudioPlayerCallback interface functions
|
|
646 |
**/
|
|
647 |
void CTestStepPlayerClosePlay::MapcInitComplete(TInt aError,
|
|
648 |
const TTimeIntervalMicroSeconds &/*aDuration*/)
|
|
649 |
{
|
|
650 |
iError = aError;
|
|
651 |
CActiveScheduler::Stop();
|
|
652 |
}
|
|
653 |
|
|
654 |
void CTestStepPlayerClosePlay::MapcPlayComplete(TInt aError)
|
|
655 |
{
|
|
656 |
iError = aError;
|
|
657 |
CActiveScheduler::Stop();
|
|
658 |
}
|
|
659 |
|
|
660 |
/**
|
|
661 |
*
|
|
662 |
* Test step Preamble.
|
|
663 |
*
|
|
664 |
* @xxxx
|
|
665 |
*
|
|
666 |
*/
|
|
667 |
TVerdict CTestStepPlayerClosePlay::DoTestStepPreambleL(void)
|
|
668 |
{
|
|
669 |
// this installs the scheduler
|
|
670 |
TVerdict verdict = CTestStepUnitMMFAudClient::DoTestStepPreambleL();
|
|
671 |
|
|
672 |
// Printing to the console and log file
|
|
673 |
INFO_PRINTF1(_L("MM-MMF-ACLNT-U-0015-CP"));
|
|
674 |
INFO_PRINTF1(_L("This test will call Play()->Close()->Play() and checks if the audioplayerutility is in stopped state after calling Close()"));
|
|
675 |
|
|
676 |
iError = KErrNone;
|
|
677 |
|
|
678 |
if(!GetStringFromConfig(_L("SectionOne"), _L("AudioPlayFName1"), iFileName))
|
|
679 |
{
|
|
680 |
return EInconclusive;
|
|
681 |
}
|
|
682 |
return verdict;
|
|
683 |
}
|
|
684 |
|
|
685 |
/**
|
|
686 |
*
|
|
687 |
* Test step Postamble.
|
|
688 |
*
|
|
689 |
* @xxxx
|
|
690 |
*
|
|
691 |
*/
|
|
692 |
TVerdict CTestStepPlayerClosePlay::DoTestStepPostambleL(void)
|
|
693 |
{
|
|
694 |
//[ Destroy the scheduler ]
|
|
695 |
return CTestStepUnitMMFAudClient::DoTestStepPostambleL();
|
|
696 |
}
|
|
697 |
|
|
698 |
/**
|
|
699 |
*
|
|
700 |
* Do the test step.
|
|
701 |
* Each test step must supply an implementation for DoTestStepL.
|
|
702 |
*
|
|
703 |
* @return "TVerdict"
|
|
704 |
* The result of the test step
|
|
705 |
*
|
|
706 |
* @xxxx
|
|
707 |
*
|
|
708 |
*/
|
|
709 |
TVerdict CTestStepPlayerClosePlay::DoTestStepL()
|
|
710 |
{
|
|
711 |
TInt err = KErrNone;
|
|
712 |
TInt state = 0;
|
|
713 |
|
|
714 |
CMMFMdaAudioPlayerUtility* player = CMMFMdaAudioPlayerUtility::NewL(*this);
|
|
715 |
|
|
716 |
if (player == NULL ||
|
|
717 |
iError != KErrNone)
|
|
718 |
{
|
|
719 |
return EInconclusive;
|
|
720 |
}
|
|
721 |
|
|
722 |
err = GetAudPlayerState(player, state);
|
|
723 |
if ( err != KErrNone ||
|
|
724 |
state != CMMFMdaAudioPlayerUtility::EStopped )
|
|
725 |
{
|
|
726 |
return EInconclusive;
|
|
727 |
}
|
|
728 |
|
|
729 |
CleanupStack::PushL(player);
|
|
730 |
|
|
731 |
TRAP(err,player->OpenFileL(iFileName));
|
|
732 |
if (err != KErrNone)
|
|
733 |
{
|
|
734 |
CleanupStack::PopAndDestroy(player);
|
|
735 |
return EFail;
|
|
736 |
}
|
|
737 |
CActiveScheduler::Start();
|
|
738 |
|
|
739 |
INFO_PRINTF1(_L("Calling Play()"));
|
|
740 |
player->Play();
|
|
741 |
|
|
742 |
INFO_PRINTF1(_L("Calling Close()"));
|
|
743 |
player->Close();
|
|
744 |
|
|
745 |
// AudioPlayerUtility should be in EStopped state after calling Close().
|
|
746 |
err = GetAudPlayerState(player, state);
|
|
747 |
if ( err != KErrNone ||
|
|
748 |
state != CMMFMdaAudioPlayerUtility::EStopped )
|
|
749 |
{
|
|
750 |
CleanupStack::PopAndDestroy(player);
|
|
751 |
return EFail;
|
|
752 |
}
|
|
753 |
|
|
754 |
TRAP(err,player->OpenFileL(iFileName));
|
|
755 |
if (err != KErrNone)
|
|
756 |
{
|
|
757 |
CleanupStack::PopAndDestroy(player);
|
|
758 |
return EFail;
|
|
759 |
}
|
|
760 |
CActiveScheduler::Start();
|
|
761 |
|
|
762 |
INFO_PRINTF1(_L("Calling Play()"));
|
|
763 |
player->Play();
|
|
764 |
|
|
765 |
// AudioPlayerUtility should now be in EPlaying state.
|
|
766 |
err = GetAudPlayerState(player, state);
|
|
767 |
CleanupStack::PopAndDestroy(player);
|
|
768 |
if ( err != KErrNone ||
|
|
769 |
state != CMMFMdaAudioPlayerUtility::EPlaying )
|
|
770 |
{
|
|
771 |
return EFail;
|
|
772 |
}
|
|
773 |
|
|
774 |
INFO_PRINTF1(_L("finished with this test step"));
|
|
775 |
|
|
776 |
// test steps return a result
|
|
777 |
return EPass;
|
|
778 |
}
|
|
779 |
|
|
780 |
|
|
781 |
|
|
782 |
//----- Test for WAV IMAADCPM Formats -----
|
|
783 |
|
|
784 |
/**
|
|
785 |
*
|
|
786 |
* Static constructor for CTestStepPlayerPlayWav.
|
|
787 |
*
|
|
788 |
*
|
|
789 |
* @return "CTestStepPlayerPlayWav*"
|
|
790 |
* The constructed CTestStepPlayerPlayWav
|
|
791 |
*
|
|
792 |
* @xxxx
|
|
793 |
*
|
|
794 |
*/
|
|
795 |
CTestStepPlayerPlayWav* CTestStepPlayerPlayWav::NewL()
|
|
796 |
{
|
|
797 |
CTestStepPlayerPlayWav* self = new(ELeave) CTestStepPlayerPlayWav;
|
|
798 |
return self;
|
|
799 |
}
|
|
800 |
|
|
801 |
/**
|
|
802 |
*
|
|
803 |
* Test step constructor.
|
|
804 |
* Each test step initialises its own name.
|
|
805 |
*
|
|
806 |
* @xxxx
|
|
807 |
*
|
|
808 |
*/
|
|
809 |
CTestStepPlayerPlayWav::CTestStepPlayerPlayWav() : iHasPlayed(EFalse)
|
|
810 |
{
|
|
811 |
// store the name of this test case
|
|
812 |
// this is the name that is used by the script file
|
|
813 |
iTestStepName = _L("MM-MMF-ACLNT-U-0854-HP");
|
|
814 |
}
|
|
815 |
|
|
816 |
/**
|
|
817 |
*
|
|
818 |
* Test step destructor.
|
|
819 |
*
|
|
820 |
* @xxxx
|
|
821 |
*
|
|
822 |
*/
|
|
823 |
CTestStepPlayerPlayWav::~CTestStepPlayerPlayWav()
|
|
824 |
{
|
|
825 |
}
|
|
826 |
/**
|
|
827 |
* Implementation of the MMdaAudioPlayerCallback interface functions
|
|
828 |
**/
|
|
829 |
void CTestStepPlayerPlayWav::MapcInitComplete(TInt aError,
|
|
830 |
const TTimeIntervalMicroSeconds &/*aDuration*/)
|
|
831 |
{
|
|
832 |
iError = aError;
|
|
833 |
CActiveScheduler::Stop();
|
|
834 |
}
|
|
835 |
|
|
836 |
void CTestStepPlayerPlayWav::MapcPlayComplete(TInt aError)
|
|
837 |
{
|
|
838 |
iError = aError;
|
|
839 |
if (iError == KErrNone)
|
|
840 |
{
|
|
841 |
iHasPlayed = ETrue;
|
|
842 |
}
|
|
843 |
CActiveScheduler::Stop();
|
|
844 |
}
|
|
845 |
|
|
846 |
/**
|
|
847 |
*
|
|
848 |
* Do the test step.
|
|
849 |
* Each test step must supply an implementation for DoTestStepL.
|
|
850 |
*
|
|
851 |
* @return "TVerdict"
|
|
852 |
* The result of the test step
|
|
853 |
*
|
|
854 |
* @xxxx
|
|
855 |
*
|
|
856 |
*/
|
|
857 |
TVerdict CTestStepPlayerPlayWav::DoTestStepL()
|
|
858 |
{
|
|
859 |
// Printing to the console and log file
|
|
860 |
INFO_PRINTF1(_L("MM-MMF-ACLNT-U-0854-HP"));
|
|
861 |
INFO_PRINTF1(_L("This test will play the Wav IMAADPCM formats."));
|
|
862 |
|
|
863 |
TInt err = KErrNone;
|
|
864 |
TInt state = 0;
|
|
865 |
TVerdict result = EPass;
|
|
866 |
|
|
867 |
RArray<TPtrC> array;
|
|
868 |
array.Append(_L("IMAADPCM4Bit8KHzMono.wav"));
|
|
869 |
array.Append(_L("IMAADPCM 4-Bit,8KHz,Mono"));
|
|
870 |
array.Append(_L("IMAADPCM4Bit11KHzMono.wav"));
|
|
871 |
array.Append(_L("IMAADPCM 4-Bit,11KHz,Mono"));
|
|
872 |
array.Append(_L("IMAADPCM4Bit22KHzMono.wav"));
|
|
873 |
array.Append(_L("IMAADPCM 4-Bit,22KHz,Mono"));
|
|
874 |
array.Append(_L("IMAADPCM4Bit8KHzMono512Block.wav"));
|
|
875 |
array.Append(_L("IMAADPCM 4-Bit,8KHz,Mono"));
|
|
876 |
|
|
877 |
CMMFMdaAudioPlayerUtility* player = CMMFMdaAudioPlayerUtility::NewL(*this);
|
|
878 |
|
|
879 |
if (player == NULL ||
|
|
880 |
iError != KErrNone)
|
|
881 |
{
|
|
882 |
return EInconclusive;
|
|
883 |
}
|
|
884 |
CleanupStack::PushL(player);
|
|
885 |
TInt count = array.Count();
|
|
886 |
for (TInt iter=0; iter<count; iter+=2)
|
|
887 |
{
|
|
888 |
TBuf<256> fileBuf;
|
|
889 |
fileBuf.Append(KFilePath);
|
|
890 |
// Append the file name
|
|
891 |
fileBuf.Append(array[iter]);
|
|
892 |
|
|
893 |
INFO_PRINTF2(_L("Opening file = %S"), &fileBuf);
|
|
894 |
INFO_PRINTF2(_L("File info = %S"), &array[iter+1]);
|
|
895 |
|
|
896 |
TRAP(err,player->OpenFileL(fileBuf));
|
|
897 |
// If the opening fails, save the test result as fail and continue looping
|
|
898 |
if (err != KErrNone)
|
|
899 |
{
|
|
900 |
INFO_PRINTF3(_L("Opening file %S failed,error = %d"),&fileBuf,err);
|
|
901 |
result = EFail;
|
|
902 |
continue;
|
|
903 |
}
|
|
904 |
CActiveScheduler::Start();
|
|
905 |
|
|
906 |
player->Play();
|
|
907 |
|
|
908 |
CActiveScheduler::Start();
|
|
909 |
|
|
910 |
// Close the file before opening the second file
|
|
911 |
player->Close();
|
|
912 |
|
|
913 |
err = GetAudPlayerState(player, state);
|
|
914 |
if (err != KErrNone ||
|
|
915 |
state != CMMFMdaAudioPlayerUtility::EStopped ||
|
|
916 |
!iHasPlayed ||
|
|
917 |
iError != KErrNone)
|
|
918 |
{
|
|
919 |
INFO_PRINTF4(_L("Playing file %S failed,error = %d iHasPlayed = %d"),&fileBuf,err,iHasPlayed);
|
|
920 |
result = EFail;
|
|
921 |
}
|
|
922 |
}
|
|
923 |
CleanupStack::PopAndDestroy(player);
|
|
924 |
|
|
925 |
INFO_PRINTF1(_L("Finished with this test step"));
|
|
926 |
// test steps return a result
|
|
927 |
return result;
|
|
928 |
}
|
|
929 |
|
|
930 |
RAudioPlayCompleteTest* RAudioPlayCompleteTest::NewL(const TDesC& aStepName, const TDesC& aFileName)
|
|
931 |
{
|
|
932 |
RAudioPlayCompleteTest* self = new(ELeave)RAudioPlayCompleteTest(aStepName, aFileName);
|
|
933 |
return self;
|
|
934 |
}
|
|
935 |
|
|
936 |
RAudioPlayCompleteTest::RAudioPlayCompleteTest(const TDesC& aStepName, const TDesC& aFileName):
|
|
937 |
iFileName (aFileName), iUtility(NULL), iPlayStartTime(0)
|
|
938 |
{
|
|
939 |
iTestStepName = aStepName;
|
|
940 |
}
|
|
941 |
|
|
942 |
void RAudioPlayCompleteTest::KickoffTestL()
|
|
943 |
{
|
|
944 |
INFO_PRINTF1(_L("INC103000:V&V_PATOS_3_W950i_error when audio file is finished"));
|
|
945 |
iUtility = CMdaAudioPlayerUtility::NewL(*this);
|
|
946 |
iUtility->OpenFileL(iFileName);
|
|
947 |
}
|
|
948 |
|
|
949 |
void RAudioPlayCompleteTest::CloseTest()
|
|
950 |
{
|
|
951 |
delete iUtility;
|
|
952 |
iUtility = NULL;
|
|
953 |
}
|
|
954 |
|
|
955 |
void RAudioPlayCompleteTest::MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& aDuration)
|
|
956 |
{
|
|
957 |
if(aError != KErrNone)
|
|
958 |
{
|
|
959 |
StopTest(aError);
|
|
960 |
}
|
|
961 |
else
|
|
962 |
{
|
|
963 |
iDuration = aDuration;
|
|
964 |
iPlayStartTime.UniversalTime();
|
|
965 |
iUtility->Play();
|
|
966 |
}
|
|
967 |
}
|
|
968 |
|
|
969 |
void RAudioPlayCompleteTest::MapcPlayComplete(TInt aError)
|
|
970 |
{
|
|
971 |
if(aError != KErrNone)
|
|
972 |
{
|
|
973 |
INFO_PRINTF1(_L("Got play error"));
|
|
974 |
StopTest(aError);
|
|
975 |
}
|
|
976 |
else
|
|
977 |
{
|
|
978 |
TTime curTime;
|
|
979 |
curTime.UniversalTime();
|
|
980 |
//add margin of 1 sec
|
|
981 |
curTime += TTimeIntervalMicroSeconds(1000000);
|
|
982 |
TTimeIntervalMicroSeconds playDuration(curTime.MicroSecondsFrom(iPlayStartTime));
|
|
983 |
if(playDuration < iDuration)
|
|
984 |
{
|
|
985 |
INFO_PRINTF3(_L("Clip is not played till the end - playDuration %d iDuration %d"),
|
|
986 |
TInt(playDuration.Int64()), TInt(iDuration.Int64()));
|
|
987 |
StopTest(EFail);
|
|
988 |
}
|
|
989 |
else
|
|
990 |
{
|
|
991 |
StopTest(EPass);
|
|
992 |
}
|
|
993 |
}
|
|
994 |
}
|
|
995 |
|
|
996 |
|
|
997 |
// -------------------- Open a corrupt wav file, which has sampling rate 0xFFFFFFFF --------------------
|
|
998 |
|
|
999 |
RAudioOpenCorrupt* RAudioOpenCorrupt::NewL(const TDesC& aStepName, const TDesC& aFileName)
|
|
1000 |
{
|
|
1001 |
RAudioOpenCorrupt* self = new(ELeave)RAudioOpenCorrupt(aStepName, aFileName);
|
|
1002 |
return self;
|
|
1003 |
}
|
|
1004 |
|
|
1005 |
RAudioOpenCorrupt::RAudioOpenCorrupt(const TDesC& aStepName, const TDesC& aFileName):
|
|
1006 |
iFileName (aFileName), iUtility(NULL)
|
|
1007 |
{
|
|
1008 |
iTestStepName = aStepName;
|
|
1009 |
}
|
|
1010 |
|
|
1011 |
void RAudioOpenCorrupt::KickoffTestL()
|
|
1012 |
{
|
|
1013 |
INFO_PRINTF1(_L("PDEF131534 SPPR_PERF: Music player crashes when opening corrupted wav file"));
|
|
1014 |
iUtility = CMdaAudioPlayerUtility::NewL(*this);
|
|
1015 |
iUtility->OpenFileL(iFileName);
|
|
1016 |
}
|
|
1017 |
|
|
1018 |
void RAudioOpenCorrupt::CloseTest()
|
|
1019 |
{
|
|
1020 |
delete iUtility;
|
|
1021 |
iUtility = NULL;
|
|
1022 |
}
|
|
1023 |
|
|
1024 |
void RAudioOpenCorrupt::MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& /*aDuration*/)
|
|
1025 |
{
|
|
1026 |
if(aError != KErrNotSupported)
|
|
1027 |
{
|
|
1028 |
if(aError==KErrNone)
|
|
1029 |
{
|
|
1030 |
INFO_PRINTF1(_L("Received KErrNone while expecting KErrNotSupported"));
|
|
1031 |
StopTest(EFail);
|
|
1032 |
}
|
|
1033 |
else
|
|
1034 |
{
|
|
1035 |
StopTest(aError);
|
|
1036 |
}
|
|
1037 |
}
|
|
1038 |
else
|
|
1039 |
{
|
|
1040 |
INFO_PRINTF2(_L("Recevied %d as expected"),aError);
|
|
1041 |
StopTest(EPass);
|
|
1042 |
}
|
|
1043 |
}
|
|
1044 |
|
|
1045 |
void RAudioOpenCorrupt::MapcPlayComplete(TInt /*aError*/)
|
|
1046 |
{
|
|
1047 |
ASSERT(0);
|
|
1048 |
}
|
|
1049 |
|
|
1050 |
|
|
1051 |
RAudioPlayPanicTest* RAudioPlayPanicTest::NewL(const TDesC& aStepName, const TDesC& aFileName)
|
|
1052 |
{
|
|
1053 |
RAudioPlayPanicTest* self = new(ELeave)RAudioPlayPanicTest(aStepName, aFileName);
|
|
1054 |
return self;
|
|
1055 |
}
|
|
1056 |
|
|
1057 |
RAudioPlayPanicTest::RAudioPlayPanicTest(const TDesC& aStepName, const TDesC& aFileName):
|
|
1058 |
RAudioPlayCompleteTest(aStepName, aFileName)
|
|
1059 |
{
|
|
1060 |
|
|
1061 |
}
|
|
1062 |
|
|
1063 |
void RAudioPlayPanicTest::KickoffTestL()
|
|
1064 |
{
|
|
1065 |
INFO_PRINTF1(_L("DEF127630:Fix for INC108007 appears to close "));
|
|
1066 |
iUtility = CMdaAudioPlayerUtility::NewL(*this);
|
|
1067 |
iUtility->OpenFileL(iFileName);
|
|
1068 |
}
|
|
1069 |
|
|
1070 |
void RAudioPlayPanicTest::MapcPlayComplete(TInt aError)
|
|
1071 |
{
|
|
1072 |
if(aError != KErrServerTerminated)
|
|
1073 |
{
|
|
1074 |
INFO_PRINTF2(_L("Not received KErrDied as expected[%d]"), aError);
|
|
1075 |
StopTest(aError);
|
|
1076 |
}
|
|
1077 |
else
|
|
1078 |
{
|
|
1079 |
StopTest(EPass);
|
|
1080 |
}
|
|
1081 |
}
|
|
1082 |
|