sl@0
|
1 |
// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
2 |
// All rights reserved.
|
sl@0
|
3 |
// This component and the accompanying materials are made available
|
sl@0
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
sl@0
|
5 |
// which accompanies this distribution, and is available
|
sl@0
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
7 |
//
|
sl@0
|
8 |
// Initial Contributors:
|
sl@0
|
9 |
// Nokia Corporation - initial contribution.
|
sl@0
|
10 |
//
|
sl@0
|
11 |
// Contributors:
|
sl@0
|
12 |
//
|
sl@0
|
13 |
// Description:
|
sl@0
|
14 |
// This file contains the test suite class implementation for A3F DevSound Integration tests.
|
sl@0
|
15 |
//
|
sl@0
|
16 |
//
|
sl@0
|
17 |
|
sl@0
|
18 |
#include "tsi_a3f_devsound_testsuite.h"
|
sl@0
|
19 |
#include "tsi_a3f_devsound_record.h"
|
sl@0
|
20 |
#include "tsi_a3f_devsound_play.h"
|
sl@0
|
21 |
#include "tsi_a3f_devsound_tone.h"
|
sl@0
|
22 |
|
sl@0
|
23 |
/*
|
sl@0
|
24 |
*
|
sl@0
|
25 |
* NewTestSuiteL is exported at ordinal 1
|
sl@0
|
26 |
* - this provides the interface to allow schedule test to create instances of this test suite
|
sl@0
|
27 |
*
|
sl@0
|
28 |
*/
|
sl@0
|
29 |
// Entry function - create a test suite object
|
sl@0
|
30 |
EXPORT_C CTestSuiteA3FDevSound* CTestSuiteA3FDevSound::NewTestSuiteL()
|
sl@0
|
31 |
{
|
sl@0
|
32 |
return CTestSuiteA3FDevSound::NewL();
|
sl@0
|
33 |
|
sl@0
|
34 |
}
|
sl@0
|
35 |
|
sl@0
|
36 |
/*
|
sl@0
|
37 |
*
|
sl@0
|
38 |
* NewL
|
sl@0
|
39 |
*
|
sl@0
|
40 |
*/
|
sl@0
|
41 |
CTestSuiteA3FDevSound* CTestSuiteA3FDevSound::NewL()
|
sl@0
|
42 |
{
|
sl@0
|
43 |
CTestSuiteA3FDevSound* result = new (ELeave) CTestSuiteA3FDevSound();
|
sl@0
|
44 |
CleanupStack::PushL(result);
|
sl@0
|
45 |
result->ConstructL();
|
sl@0
|
46 |
CleanupStack::Pop(result);
|
sl@0
|
47 |
return result;
|
sl@0
|
48 |
|
sl@0
|
49 |
}
|
sl@0
|
50 |
|
sl@0
|
51 |
/*
|
sl@0
|
52 |
*
|
sl@0
|
53 |
* CTestSuiteA3FDevSound - Constructor
|
sl@0
|
54 |
*
|
sl@0
|
55 |
*/
|
sl@0
|
56 |
CTestSuiteA3FDevSound::CTestSuiteA3FDevSound()
|
sl@0
|
57 |
{
|
sl@0
|
58 |
iSuiteName = _L("TSI_A3F_DEVSOUND");
|
sl@0
|
59 |
|
sl@0
|
60 |
}
|
sl@0
|
61 |
|
sl@0
|
62 |
/*
|
sl@0
|
63 |
*
|
sl@0
|
64 |
* ~CTestSuiteA3FDevSound - Destructor
|
sl@0
|
65 |
*
|
sl@0
|
66 |
*/
|
sl@0
|
67 |
CTestSuiteA3FDevSound::~CTestSuiteA3FDevSound()
|
sl@0
|
68 |
{
|
sl@0
|
69 |
}
|
sl@0
|
70 |
|
sl@0
|
71 |
/*
|
sl@0
|
72 |
* GetVersion
|
sl@0
|
73 |
* - Get test suite version
|
sl@0
|
74 |
*
|
sl@0
|
75 |
*/
|
sl@0
|
76 |
TPtrC CTestSuiteA3FDevSound::GetVersion() const
|
sl@0
|
77 |
{
|
sl@0
|
78 |
_LIT(KTxtVersion, "1.0");
|
sl@0
|
79 |
return KTxtVersion();
|
sl@0
|
80 |
|
sl@0
|
81 |
}
|
sl@0
|
82 |
|
sl@0
|
83 |
/*
|
sl@0
|
84 |
*
|
sl@0
|
85 |
* InitialiseL - Constructor for test suite
|
sl@0
|
86 |
* - creates all the test steps and stores them inside CTestSuiteA3FDevSound
|
sl@0
|
87 |
*
|
sl@0
|
88 |
*/
|
sl@0
|
89 |
void CTestSuiteA3FDevSound::InitialiseL()
|
sl@0
|
90 |
{
|
sl@0
|
91 |
const TUint32 KMMFFourCCCodeInvalid = 0x414d5121;
|
sl@0
|
92 |
TFourCC fourCCCodePCM8(KMMFFourCCCodePCM8);
|
sl@0
|
93 |
TFourCC fourCCCodePCMU8(KMMFFourCCCodePCMU8);
|
sl@0
|
94 |
TFourCC fourCCCodePCM16(KMMFFourCCCodePCM16);
|
sl@0
|
95 |
TFourCC fourCCCodeMuLAW(KMMFFourCCCodeMuLAW);
|
sl@0
|
96 |
TFourCC fourCCCodeInvalid(KMMFFourCCCodeInvalid);
|
sl@0
|
97 |
|
sl@0
|
98 |
// to play AAC audio without OpenMAX IL HwDevice, use this FourCC code
|
sl@0
|
99 |
TFourCC fourCCCodeAAC(KMMFFourCCCodeAAC);
|
sl@0
|
100 |
|
sl@0
|
101 |
// to play AAC audio with OpenMAX IL HwDevice, use this FourCC code
|
sl@0
|
102 |
// note: IL HwDevice has been classified as AAC2 which is a test FourCC code and not a real one
|
sl@0
|
103 |
const TUint32 KMMFFourCCCodeAAC2 = 0x32434141; //('A','A','C','2')
|
sl@0
|
104 |
TFourCC fourCCCodeAAC2(KMMFFourCCCodeAAC2);
|
sl@0
|
105 |
|
sl@0
|
106 |
// DevSound PCM - Play test cases
|
sl@0
|
107 |
|
sl@0
|
108 |
AddTestStepL(RStepA3FDevSoundPlaySimple::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0001"), _L("SectionPCM-0001"), fourCCCodePCM16));
|
sl@0
|
109 |
AddTestStepL(RStepA3FDevSoundPlaySimple::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0002"), _L("SectionPCM-0002"), fourCCCodePCM16));
|
sl@0
|
110 |
AddTestStepL(RStepA3FDevSoundPlaySimple::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0003"), _L("SectionPCM-0003"), fourCCCodePCM16));
|
sl@0
|
111 |
AddTestStepL(RStepA3FDevSoundPlaySimple::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0004"), _L("SectionPCM-0004"), fourCCCodePCM16));
|
sl@0
|
112 |
AddTestStepL(RStepA3FDevSoundPlaySimple::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0005"), _L("SectionPCM-0005"), fourCCCodePCM16));
|
sl@0
|
113 |
AddTestStepL(RStepA3FDevSoundPlaySimple::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0006"), _L("SectionPCM-0006"), fourCCCodePCM16));
|
sl@0
|
114 |
AddTestStepL(RStepA3FDevSoundPlaySimple::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0007"), _L("SectionPCM-0007"), fourCCCodePCM16));
|
sl@0
|
115 |
AddTestStepL(RStepA3FDevSoundPlaySimple::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0008"), _L("SectionPCM-0008"), fourCCCodePCM16));
|
sl@0
|
116 |
AddTestStepL(RStepA3FDevSoundPlaySimple::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0009"), _L("SectionPCM-0009"), fourCCCodePCM16));
|
sl@0
|
117 |
AddTestStepL(RStepA3FDevSoundPlaySimple::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0010"), _L("SectionPCM-0010"), fourCCCodePCM16));
|
sl@0
|
118 |
AddTestStepL(RStepA3FDevSoundPlaySimple::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0011"), _L("SectionPCM-0011"), fourCCCodePCM16));
|
sl@0
|
119 |
AddTestStepL(RStepA3FDevSoundPlaySimple::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0012"), _L("SectionPCM-0012"), fourCCCodePCM16));
|
sl@0
|
120 |
AddTestStepL(RStepA3FDevSoundPlaySimple::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0013"), _L("SectionPCM-0013"), fourCCCodePCM16));
|
sl@0
|
121 |
AddTestStepL(RStepA3FDevSoundPlaySimple::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0014"), _L("SectionPCM-0014"), fourCCCodePCM16));
|
sl@0
|
122 |
AddTestStepL(RStepA3FDevSoundPlayEmpty::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0015"), _L("SectionPCM-0015"), fourCCCodePCM16));
|
sl@0
|
123 |
AddTestStepL(RStepA3FDevSoundPlaySimple::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0016"), _L("SectionPCM-0016"), fourCCCodePCM16));
|
sl@0
|
124 |
AddTestStepL(RStepA3FDevSoundPlaySimple::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0017"), _L("SectionPCM-0017"), fourCCCodeMuLAW));
|
sl@0
|
125 |
AddTestStepL(RStepA3FDevSoundPlayInvalidConfig::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0018"), _L("SectionPCM-0018"), fourCCCodePCM16));
|
sl@0
|
126 |
AddTestStepL(RStepA3FDevSoundPlayInvalidConfig::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0019"), _L("SectionPCM-0019"), fourCCCodePCM16));
|
sl@0
|
127 |
AddTestStepL(RStepA3FDevSoundPlayInvalidFourCC::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0020"), fourCCCodeInvalid));
|
sl@0
|
128 |
AddTestStepL(RStepA3FDevSoundPlaySimple::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0021"), _L("SectionPCM-0021"), fourCCCodePCM16));
|
sl@0
|
129 |
AddTestStepL(RStepA3FDevSoundPlayEOFPlayMultipleTimes::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0022"), _L("SectionPCM-0022")));
|
sl@0
|
130 |
AddTestStepL(RStepA3FDevSoundPlaySimple::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0023"), _L("SectionPCM-0023")));
|
sl@0
|
131 |
AddTestStepL(RStepA3FDevSoundPlayStopMultipleTimes::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0024"), _L("SectionPCM-0024"), fourCCCodePCM16));
|
sl@0
|
132 |
AddTestStepL(RStepA3FDevSoundReadConfigDuringPlay::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0025"), _L("SectionPCM-0025"), fourCCCodePCM16));
|
sl@0
|
133 |
AddTestStepL(RStepA3FDevSoundSetVolPlayStopGetVol::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0026"), _L("SectionPCM-0026"), fourCCCodePCM16));
|
sl@0
|
134 |
AddTestStepL(RStepA3FDevSoundFlushBuffersPaused::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0027"), _L("SectionPCM-0027"), fourCCCodePCM16));
|
sl@0
|
135 |
AddTestStepL(RStepA3FDevSoundInvalidStatePlay::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0028"), _L("SectionPCM-0028"), fourCCCodePCM16));
|
sl@0
|
136 |
AddTestStepL(RStepA3FDevSoundFlushBuffersPlaying::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0029"), _L("SectionPCM-0029"), fourCCCodePCM16));
|
sl@0
|
137 |
AddTestStepL(RStepA3FDevSoundInitializeWhilePlaying::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0030"), _L("SectionPCM-0030"), fourCCCodePCM16));
|
sl@0
|
138 |
AddTestStepL(RStepA3FDevSoundInitializeWithHwDeviceUID::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0031")));
|
sl@0
|
139 |
AddTestStepL(RStepA3FDevSoundSetBalanceDuringPlay::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0032"), _L("SectionPCM-0032"), fourCCCodePCM16));
|
sl@0
|
140 |
AddTestStepL(RStepA3FDevSoundGetSampleNumsAfterStop::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0033"), _L("SectionPCM-0033"), fourCCCodePCM16));
|
sl@0
|
141 |
AddTestStepL(RStepA3FDevSoundInititalizeDuringInitialize::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0034"), _L("SectionPCM-0034"), fourCCCodePCM16));
|
sl@0
|
142 |
AddTestStepL(RStepA3FDevSoundPlayInitDuringPlayInit::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0035"), _L("SectionPCM-0035"), fourCCCodePCM16));
|
sl@0
|
143 |
AddTestStepL(RStepA3FDevSoundVolumeCrop::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0036"), _L("SectionPCM-0036"), fourCCCodePCM16));
|
sl@0
|
144 |
AddTestStepL(RStepA3FDevSoundInitializeForConverting::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0037"), _L("SectionPCM-0037"), fourCCCodePCM16));
|
sl@0
|
145 |
AddTestStepL(RStepA3FDevSoundCancelInitializePlay::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0038"), _L("SectionPCM-0038"), fourCCCodePCM16));
|
sl@0
|
146 |
AddTestStepL(RStepA3FDevSoundNegCancelInitializePlay::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0039"), _L("SectionPCM-0039"), fourCCCodePCM16));
|
sl@0
|
147 |
AddTestStepL(RStepA3FDevSoundEmptyBuffersInCreatedState::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0040")));
|
sl@0
|
148 |
AddTestStepL(RStepA3FDevSoundEmptyBuffersInInitializedState::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0041"), _L("SectionPCM-0041"), fourCCCodePCM16));
|
sl@0
|
149 |
AddTestStepL(RStepA3FDevSoundEmptyBuffersInInitializingState::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0042"), _L("SectionPCM-0042"), fourCCCodePCM16));
|
sl@0
|
150 |
|
sl@0
|
151 |
// DevSound PCM - Long Play test cases
|
sl@0
|
152 |
|
sl@0
|
153 |
AddTestStepL(RStepA3FDevSoundPlaySimple::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-LONG-I-0001"), _L("SectionPCM-Long-0001"), fourCCCodePCM16));
|
sl@0
|
154 |
|
sl@0
|
155 |
// DevSound PCM - Record test cases
|
sl@0
|
156 |
|
sl@0
|
157 |
AddTestStepL(RStepA3FDevSoundRecordSimple::NewL(_L("MM-A3F-DEVSOUND-REC-PCM-I-0001"), _L("SectionPCM-0001"), fourCCCodePCM16));
|
sl@0
|
158 |
AddTestStepL(RStepA3FDevSoundRecordMultipleTimes::NewL(_L("MM-A3F-DEVSOUND-REC-PCM-I-0002"), _L("SectionPCM-0002"), fourCCCodePCM16));
|
sl@0
|
159 |
AddTestStepL(RStepA3FDevSoundRecordSimple::NewL(_L("MM-A3F-DEVSOUND-REC-PCM-I-0003"), _L("SectionPCM-0003"), fourCCCodePCM16));
|
sl@0
|
160 |
AddTestStepL(RStepA3FDevSoundRecordSimple::NewL(_L("MM-A3F-DEVSOUND-REC-PCM-I-0004"), _L("SectionPCM-0004"), fourCCCodePCM16));
|
sl@0
|
161 |
AddTestStepL(RStepA3FDevSoundRecordSimple::NewL(_L("MM-A3F-DEVSOUND-REC-PCM-I-0005"), _L("SectionPCM-0005"), fourCCCodePCM16));
|
sl@0
|
162 |
AddTestStepL(RStepA3FDevSoundRecordSimple::NewL(_L("MM-A3F-DEVSOUND-REC-PCM-I-0006"), _L("SectionPCM-0006"), fourCCCodePCM16));
|
sl@0
|
163 |
AddTestStepL(RStepA3FDevSoundRecordSimple::NewL(_L("MM-A3F-DEVSOUND-REC-PCM-I-0007"), _L("SectionPCM-0007"), fourCCCodePCM16));
|
sl@0
|
164 |
AddTestStepL(RStepA3FDevSoundRecordSimple::NewL(_L("MM-A3F-DEVSOUND-REC-PCM-I-0008"), _L("SectionPCM-0008"), fourCCCodePCM16));
|
sl@0
|
165 |
AddTestStepL(RStepA3FDevSoundRecordSimple::NewL(_L("MM-A3F-DEVSOUND-REC-PCM-I-0009"), _L("SectionPCM-0009"), fourCCCodePCM16));
|
sl@0
|
166 |
AddTestStepL(RStepA3FDevSoundRecordSimple::NewL(_L("MM-A3F-DEVSOUND-REC-PCM-I-0010"), _L("SectionPCM-0010"), fourCCCodePCM16));
|
sl@0
|
167 |
AddTestStepL(RStepA3FDevSoundRecordSimple::NewL(_L("MM-A3F-DEVSOUND-REC-PCM-I-0011"), _L("SectionPCM-0011"), fourCCCodePCM16));
|
sl@0
|
168 |
AddTestStepL(RStepA3FDevSoundRecordAndPlay::NewL(_L("MM-A3F-DEVSOUND-REC-PCM-I-0012"), _L("SectionPCM-0012"), fourCCCodePCM16));
|
sl@0
|
169 |
AddTestStepL(RStepA3FDevSoundSetGainDuringRecord::NewL(_L("MM-A3F-DEVSOUND-REC-PCM-I-0013"), _L("SectionPCM-0013"), fourCCCodePCM8));
|
sl@0
|
170 |
AddTestStepL(RStepA3FDevSoundSetGainDuringRecord::NewL(_L("MM-A3F-DEVSOUND-REC-PCM-I-0014"), _L("SectionPCM-0014"), fourCCCodePCM16));
|
sl@0
|
171 |
AddTestStepL(RStepA3FDevSoundInvalidModeRecord::NewL(_L("MM-A3F-DEVSOUND-REC-PCM-I-0015"), fourCCCodePCM16));
|
sl@0
|
172 |
AddTestStepL(RStepA3FDevSoundInitializeWhileRecording::NewL(_L("MM-A3F-DEVSOUND-REC-PCM-I-0016"), fourCCCodePCM16));
|
sl@0
|
173 |
AddTestStepL(RStepA3FDevSoundCancelInitializeRecord::NewL(_L("MM-A3F-DEVSOUND-REC-PCM-I-0017"), _L("SectionPCM-0017"), fourCCCodePCM16));
|
sl@0
|
174 |
AddTestStepL(RStepA3FDevSoundEmptyBuffersInitializedToRecord::NewL(_L("MM-A3F-DEVSOUND-REC-PCM-I-0018"), _L("SectionPCM-0018"), fourCCCodePCM16));
|
sl@0
|
175 |
AddTestStepL(RStepA3FDevSoundEmptyBuffersWhileRecording::NewL(_L("MM-A3F-DEVSOUND-REC-PCM-I-0019"), fourCCCodePCM16));
|
sl@0
|
176 |
|
sl@0
|
177 |
// DevSound PCM - Long Record test cases
|
sl@0
|
178 |
|
sl@0
|
179 |
AddTestStepL(RStepA3FDevSoundRecordLong::NewL(_L("MM-A3F-DEVSOUND-REC-PCM-LONG-I-0001"), _L("SectionPCM-Long-0001"), fourCCCodePCM16));
|
sl@0
|
180 |
|
sl@0
|
181 |
// DevSound - Tone test cases
|
sl@0
|
182 |
|
sl@0
|
183 |
AddTestStepL(RStepA3FDevSoundDTMFTonePlay::NewL(_L("MM-A3F-DEVSOUND-TONE-I-0001")));
|
sl@0
|
184 |
AddTestStepL(RStepA3FDevSoundNormalAndDualTonePlay::NewL(_L("MM-A3F-DEVSOUND-TONE-I-0002"), _L("SectionTONE-0002")));
|
sl@0
|
185 |
AddTestStepL(RStepA3FDevSoundNormalAndDualTonePlay::NewL(_L("MM-A3F-DEVSOUND-TONE-I-0003"), _L("SectionTONE-0003")));
|
sl@0
|
186 |
AddTestStepL(RStepA3FDevSoundInitializeWhileTonePlaying::NewL(_L("MM-A3F-DEVSOUND-TONE-I-0004")));
|
sl@0
|
187 |
AddTestStepL(RStepA3FDevSoundNotSupportedPlayFixedSeq::NewL(_L("MM-A3F-DEVSOUND-TONE-I-0005")));
|
sl@0
|
188 |
AddTestStepL(RStepA3FDevSoundInvalidInitializeForTone::NewL(_L("MM-A3F-DEVSOUND-TONE-I-0006")));
|
sl@0
|
189 |
AddTestStepL(RStepA3FDevSoundCancelInitializeTone::NewL(_L("MM-A3F-DEVSOUND-TONE-I-0007"), _L("SectionTONE-0007")));
|
sl@0
|
190 |
AddTestStepL(RStepA3FDevSoundEmptyBuffersInitializedForTone::NewL(_L("MM-A3F-DEVSOUND-TONE-I-0008"), _L("SectionTONE-0008")));
|
sl@0
|
191 |
AddTestStepL(RStepA3FDevSoundEmptyBuffersWhileTonePlaying::NewL(_L("MM-A3F-DEVSOUND-TONE-I-0009")));
|
sl@0
|
192 |
|
sl@0
|
193 |
}
|
sl@0
|
194 |
|
sl@0
|
195 |
// End of File
|