sl@0
|
1 |
/*
|
sl@0
|
2 |
* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
3 |
* All rights reserved.
|
sl@0
|
4 |
* This component and the accompanying materials are made available
|
sl@0
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
sl@0
|
6 |
* which accompanies this distribution, and is available
|
sl@0
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
8 |
*
|
sl@0
|
9 |
* Initial Contributors:
|
sl@0
|
10 |
* Nokia Corporation - initial contribution.
|
sl@0
|
11 |
*
|
sl@0
|
12 |
* Contributors:
|
sl@0
|
13 |
*
|
sl@0
|
14 |
* Description: Implementation of the Environmental Reverb effect class
|
sl@0
|
15 |
*
|
sl@0
|
16 |
*/
|
sl@0
|
17 |
|
sl@0
|
18 |
|
sl@0
|
19 |
|
sl@0
|
20 |
|
sl@0
|
21 |
// INCLUDE FILES
|
sl@0
|
22 |
|
sl@0
|
23 |
#ifdef _DEBUG
|
sl@0
|
24 |
#include <e32svr.h>
|
sl@0
|
25 |
#endif
|
sl@0
|
26 |
|
sl@0
|
27 |
#include <EnvironmentalReverbBase.h>
|
sl@0
|
28 |
#include <CustomInterfaceUtility.h>
|
sl@0
|
29 |
#include "EnvironmentalReverbProxy.h"
|
sl@0
|
30 |
#include <DrmAudioSamplePlayer.h>
|
sl@0
|
31 |
#include <mdaaudioinputstream.h>
|
sl@0
|
32 |
#include <mdaaudiooutputstream.h>
|
sl@0
|
33 |
#include <mdaaudiotoneplayer.h>
|
sl@0
|
34 |
#include <mmf/server/sounddevice.h>
|
sl@0
|
35 |
|
sl@0
|
36 |
#ifdef _DEBUG
|
sl@0
|
37 |
#define DEBPRN0 RDebug::Printf( "%s", __PRETTY_FUNCTION__);
|
sl@0
|
38 |
#define DEBPRN1(str) RDebug::Printf( "%s %s", __PRETTY_FUNCTION__, str );
|
sl@0
|
39 |
#else
|
sl@0
|
40 |
#define DEBPRN0
|
sl@0
|
41 |
#define DEBPRN1(str)
|
sl@0
|
42 |
#endif
|
sl@0
|
43 |
|
sl@0
|
44 |
// ============================ MEMBER FUNCTIONS ===============================
|
sl@0
|
45 |
|
sl@0
|
46 |
// -----------------------------------------------------------------------------
|
sl@0
|
47 |
// CEnvironmentalReverb::CEnvironmentalReverb
|
sl@0
|
48 |
// C++ default constructor can NOT contain any code, that
|
sl@0
|
49 |
// might leave.
|
sl@0
|
50 |
// -----------------------------------------------------------------------------
|
sl@0
|
51 |
//
|
sl@0
|
52 |
EXPORT_C CEnvironmentalReverb::CEnvironmentalReverb()
|
sl@0
|
53 |
: iReverbData(),
|
sl@0
|
54 |
iDataPckgTo(iReverbData)
|
sl@0
|
55 |
{
|
sl@0
|
56 |
}
|
sl@0
|
57 |
|
sl@0
|
58 |
// Destructor
|
sl@0
|
59 |
EXPORT_C CEnvironmentalReverb::~CEnvironmentalReverb()
|
sl@0
|
60 |
{
|
sl@0
|
61 |
}
|
sl@0
|
62 |
|
sl@0
|
63 |
// -----------------------------------------------------------------------------
|
sl@0
|
64 |
// CEnvironmentalReverb::NewL
|
sl@0
|
65 |
// Static function for creating an instance of the Environmental Reverb object.
|
sl@0
|
66 |
// -----------------------------------------------------------------------------
|
sl@0
|
67 |
//
|
sl@0
|
68 |
EXPORT_C CEnvironmentalReverb* CEnvironmentalReverb::NewL()
|
sl@0
|
69 |
{
|
sl@0
|
70 |
User::Leave(KErrNotSupported);
|
sl@0
|
71 |
return NULL;
|
sl@0
|
72 |
}
|
sl@0
|
73 |
|
sl@0
|
74 |
// -----------------------------------------------------------------------------
|
sl@0
|
75 |
// CEnvironmentalReverb::NewL
|
sl@0
|
76 |
// Static function for creating an instance of the EnvironmentalReverb object.
|
sl@0
|
77 |
// -----------------------------------------------------------------------------
|
sl@0
|
78 |
//
|
sl@0
|
79 |
EXPORT_C CEnvironmentalReverb* CEnvironmentalReverb::NewL(
|
sl@0
|
80 |
CMdaAudioConvertUtility& aUtility )
|
sl@0
|
81 |
{
|
sl@0
|
82 |
|
sl@0
|
83 |
DEBPRN0;
|
sl@0
|
84 |
CCustomInterfaceUtility* customInterface = CCustomInterfaceUtility::NewL(aUtility);
|
sl@0
|
85 |
CleanupStack::PushL(customInterface);
|
sl@0
|
86 |
|
sl@0
|
87 |
CEnvironmentalReverbProxy* environmentalReverbProxy = (CEnvironmentalReverbProxy*)customInterface->CustomInterface(KUidEnvironmentalReverbEffect);
|
sl@0
|
88 |
|
sl@0
|
89 |
if ( !environmentalReverbProxy )
|
sl@0
|
90 |
{
|
sl@0
|
91 |
DEBPRN1("No Adaptation Support - leaving");
|
sl@0
|
92 |
User::Leave(KErrNotSupported);
|
sl@0
|
93 |
}
|
sl@0
|
94 |
|
sl@0
|
95 |
CleanupStack::Pop(customInterface);
|
sl@0
|
96 |
|
sl@0
|
97 |
return environmentalReverbProxy;
|
sl@0
|
98 |
}
|
sl@0
|
99 |
|
sl@0
|
100 |
// -----------------------------------------------------------------------------
|
sl@0
|
101 |
// CEnvironmentalReverb::NewL
|
sl@0
|
102 |
// Static function for creating an instance of the EnvironmentalReverb object.
|
sl@0
|
103 |
// -----------------------------------------------------------------------------
|
sl@0
|
104 |
//
|
sl@0
|
105 |
EXPORT_C CEnvironmentalReverb* CEnvironmentalReverb::NewL(
|
sl@0
|
106 |
CMdaAudioInputStream& aUtility )
|
sl@0
|
107 |
{
|
sl@0
|
108 |
|
sl@0
|
109 |
DEBPRN0;
|
sl@0
|
110 |
CEnvironmentalReverbProxy* environmentalReverbProxy = (CEnvironmentalReverbProxy*)aUtility.CustomInterface(KUidEnvironmentalReverbEffect);
|
sl@0
|
111 |
|
sl@0
|
112 |
if (environmentalReverbProxy == NULL)
|
sl@0
|
113 |
{
|
sl@0
|
114 |
DEBPRN1("No Adaptation Support - leaving");
|
sl@0
|
115 |
User::Leave(KErrNotSupported);
|
sl@0
|
116 |
}
|
sl@0
|
117 |
|
sl@0
|
118 |
return environmentalReverbProxy;
|
sl@0
|
119 |
}
|
sl@0
|
120 |
|
sl@0
|
121 |
// -----------------------------------------------------------------------------
|
sl@0
|
122 |
// CEnvironmentalReverb::NewL
|
sl@0
|
123 |
// Static function for creating an instance of the EnvironmentalReverb object.
|
sl@0
|
124 |
// -----------------------------------------------------------------------------
|
sl@0
|
125 |
//
|
sl@0
|
126 |
EXPORT_C CEnvironmentalReverb* CEnvironmentalReverb::NewL(
|
sl@0
|
127 |
CMdaAudioOutputStream& aUtility )
|
sl@0
|
128 |
{
|
sl@0
|
129 |
|
sl@0
|
130 |
DEBPRN0;
|
sl@0
|
131 |
CEnvironmentalReverbProxy* environmentalReverbProxy = (CEnvironmentalReverbProxy*)aUtility.CustomInterface(KUidEnvironmentalReverbEffect);
|
sl@0
|
132 |
|
sl@0
|
133 |
if (environmentalReverbProxy == NULL)
|
sl@0
|
134 |
{
|
sl@0
|
135 |
DEBPRN1("No Adaptation Support - leaving");
|
sl@0
|
136 |
User::Leave(KErrNotSupported);
|
sl@0
|
137 |
}
|
sl@0
|
138 |
|
sl@0
|
139 |
return environmentalReverbProxy;
|
sl@0
|
140 |
}
|
sl@0
|
141 |
|
sl@0
|
142 |
// -----------------------------------------------------------------------------
|
sl@0
|
143 |
// CEnvironmentalReverb::NewL
|
sl@0
|
144 |
// Static function for creating an instance of the EnvironmentalReverb object.
|
sl@0
|
145 |
// -----------------------------------------------------------------------------
|
sl@0
|
146 |
//
|
sl@0
|
147 |
EXPORT_C CEnvironmentalReverb* CEnvironmentalReverb::NewL(
|
sl@0
|
148 |
CMdaAudioPlayerUtility& aUtility )
|
sl@0
|
149 |
{
|
sl@0
|
150 |
|
sl@0
|
151 |
DEBPRN0;
|
sl@0
|
152 |
CCustomInterfaceUtility* customInterface = CCustomInterfaceUtility::NewL(aUtility);
|
sl@0
|
153 |
CleanupStack::PushL(customInterface);
|
sl@0
|
154 |
|
sl@0
|
155 |
CEnvironmentalReverbProxy* environmentalReverbProxy = (CEnvironmentalReverbProxy*)customInterface->CustomInterface(KUidEnvironmentalReverbEffect);
|
sl@0
|
156 |
|
sl@0
|
157 |
if ( !environmentalReverbProxy )
|
sl@0
|
158 |
{
|
sl@0
|
159 |
DEBPRN1("No Adaptation Support - leaving");
|
sl@0
|
160 |
User::Leave(KErrNotSupported);
|
sl@0
|
161 |
}
|
sl@0
|
162 |
|
sl@0
|
163 |
CleanupStack::Pop(customInterface);
|
sl@0
|
164 |
|
sl@0
|
165 |
return environmentalReverbProxy;
|
sl@0
|
166 |
}
|
sl@0
|
167 |
|
sl@0
|
168 |
// -----------------------------------------------------------------------------
|
sl@0
|
169 |
// CEnvironmentalReverb::NewL
|
sl@0
|
170 |
// Static function for creating an instance of the EnvironmentalReverb object.
|
sl@0
|
171 |
// -----------------------------------------------------------------------------
|
sl@0
|
172 |
//
|
sl@0
|
173 |
EXPORT_C CEnvironmentalReverb* CEnvironmentalReverb::NewL(
|
sl@0
|
174 |
CMdaAudioRecorderUtility& aUtility,
|
sl@0
|
175 |
TBool aRecordStream )
|
sl@0
|
176 |
{
|
sl@0
|
177 |
|
sl@0
|
178 |
DEBPRN0;
|
sl@0
|
179 |
CCustomInterfaceUtility* customInterface = CCustomInterfaceUtility::NewL(aUtility, aRecordStream);
|
sl@0
|
180 |
CleanupStack::PushL(customInterface);
|
sl@0
|
181 |
|
sl@0
|
182 |
CEnvironmentalReverbProxy* environmentalReverbProxy = (CEnvironmentalReverbProxy*)customInterface->CustomInterface(KUidEnvironmentalReverbEffect);
|
sl@0
|
183 |
|
sl@0
|
184 |
if ( !environmentalReverbProxy )
|
sl@0
|
185 |
{
|
sl@0
|
186 |
DEBPRN1("No Adaptation Support - leaving");
|
sl@0
|
187 |
User::Leave(KErrNotSupported);
|
sl@0
|
188 |
}
|
sl@0
|
189 |
|
sl@0
|
190 |
CleanupStack::Pop(customInterface);
|
sl@0
|
191 |
|
sl@0
|
192 |
return environmentalReverbProxy;
|
sl@0
|
193 |
}
|
sl@0
|
194 |
|
sl@0
|
195 |
// -----------------------------------------------------------------------------
|
sl@0
|
196 |
// CEnvironmentalReverb::NewL
|
sl@0
|
197 |
// Static function for creating an instance of the EnvironmentalReverb object.
|
sl@0
|
198 |
// -----------------------------------------------------------------------------
|
sl@0
|
199 |
//
|
sl@0
|
200 |
EXPORT_C CEnvironmentalReverb* CEnvironmentalReverb::NewL(
|
sl@0
|
201 |
CMdaAudioToneUtility& aUtility )
|
sl@0
|
202 |
{
|
sl@0
|
203 |
|
sl@0
|
204 |
DEBPRN0;
|
sl@0
|
205 |
CEnvironmentalReverbProxy* environmentalReverbProxy = (CEnvironmentalReverbProxy*)aUtility.CustomInterface(KUidEnvironmentalReverbEffect);
|
sl@0
|
206 |
|
sl@0
|
207 |
if (environmentalReverbProxy == NULL)
|
sl@0
|
208 |
{
|
sl@0
|
209 |
DEBPRN1("No Adaptation Support - leaving");
|
sl@0
|
210 |
User::Leave(KErrNotSupported);
|
sl@0
|
211 |
}
|
sl@0
|
212 |
|
sl@0
|
213 |
return environmentalReverbProxy;
|
sl@0
|
214 |
}
|
sl@0
|
215 |
|
sl@0
|
216 |
// -----------------------------------------------------------------------------
|
sl@0
|
217 |
// CAudioEqualizer::NewL
|
sl@0
|
218 |
// Static function for creating an instance of the EnvironmentalReverb object.
|
sl@0
|
219 |
// -----------------------------------------------------------------------------
|
sl@0
|
220 |
//
|
sl@0
|
221 |
EXPORT_C CEnvironmentalReverb* CEnvironmentalReverb::NewL(
|
sl@0
|
222 |
CMMFDevSound& aDevSound )
|
sl@0
|
223 |
{
|
sl@0
|
224 |
|
sl@0
|
225 |
DEBPRN0;
|
sl@0
|
226 |
CEnvironmentalReverbProxy* environmentalReverbProxy = (CEnvironmentalReverbProxy*)aDevSound.CustomInterface(KUidEnvironmentalReverbEffect);
|
sl@0
|
227 |
|
sl@0
|
228 |
if (environmentalReverbProxy == NULL)
|
sl@0
|
229 |
{
|
sl@0
|
230 |
DEBPRN1("No Adaptation Support - leaving");
|
sl@0
|
231 |
User::Leave(KErrNotSupported);
|
sl@0
|
232 |
}
|
sl@0
|
233 |
|
sl@0
|
234 |
return environmentalReverbProxy;
|
sl@0
|
235 |
}
|
sl@0
|
236 |
|
sl@0
|
237 |
// -----------------------------------------------------------------------------
|
sl@0
|
238 |
// CEnvironmentalReverb::NewL
|
sl@0
|
239 |
// Static function for creating an instance of the EnvironmentalReverb object.
|
sl@0
|
240 |
// -----------------------------------------------------------------------------
|
sl@0
|
241 |
//
|
sl@0
|
242 |
EXPORT_C CEnvironmentalReverb* CEnvironmentalReverb::NewL(
|
sl@0
|
243 |
CCustomCommandUtility* aUtility )
|
sl@0
|
244 |
{
|
sl@0
|
245 |
|
sl@0
|
246 |
DEBPRN0;
|
sl@0
|
247 |
CCustomInterfaceUtility* customInterface = CCustomInterfaceUtility::NewL(aUtility);
|
sl@0
|
248 |
CleanupStack::PushL(customInterface);
|
sl@0
|
249 |
|
sl@0
|
250 |
CEnvironmentalReverbProxy* environmentalReverbProxy = (CEnvironmentalReverbProxy*)customInterface->CustomInterface(KUidEnvironmentalReverbEffect);
|
sl@0
|
251 |
|
sl@0
|
252 |
if ( !environmentalReverbProxy )
|
sl@0
|
253 |
{
|
sl@0
|
254 |
DEBPRN1("No Adaptation Support - leaving");
|
sl@0
|
255 |
User::Leave(KErrNotSupported);
|
sl@0
|
256 |
}
|
sl@0
|
257 |
|
sl@0
|
258 |
CleanupStack::Pop(customInterface);
|
sl@0
|
259 |
|
sl@0
|
260 |
return environmentalReverbProxy;
|
sl@0
|
261 |
}
|
sl@0
|
262 |
|
sl@0
|
263 |
// -----------------------------------------------------------------------------
|
sl@0
|
264 |
// CEnvironmentalReverb::NewL
|
sl@0
|
265 |
// Static function for creating an instance of the EnvironmentalReverb object.
|
sl@0
|
266 |
// -----------------------------------------------------------------------------
|
sl@0
|
267 |
//
|
sl@0
|
268 |
EXPORT_C CEnvironmentalReverb* CEnvironmentalReverb::NewL(
|
sl@0
|
269 |
MCustomInterface& aCustomInterface )
|
sl@0
|
270 |
{
|
sl@0
|
271 |
|
sl@0
|
272 |
DEBPRN0;
|
sl@0
|
273 |
CEnvironmentalReverb* environmentalReverbProxy = (CEnvironmentalReverb*)aCustomInterface.CustomInterface(KUidEnvironmentalReverbEffect);
|
sl@0
|
274 |
if ( !environmentalReverbProxy )
|
sl@0
|
275 |
{
|
sl@0
|
276 |
DEBPRN1("No Adaptation Support - leaving");
|
sl@0
|
277 |
User::Leave(KErrNotSupported);
|
sl@0
|
278 |
}
|
sl@0
|
279 |
|
sl@0
|
280 |
return environmentalReverbProxy;
|
sl@0
|
281 |
}
|
sl@0
|
282 |
|
sl@0
|
283 |
|
sl@0
|
284 |
// -----------------------------------------------------------------------------
|
sl@0
|
285 |
// CEnvironmentalReverb::NewL
|
sl@0
|
286 |
// Static function for creating an instance of the EnvironmentalReverb object.
|
sl@0
|
287 |
// -----------------------------------------------------------------------------
|
sl@0
|
288 |
//
|
sl@0
|
289 |
EXPORT_C CEnvironmentalReverb* CEnvironmentalReverb::NewL(CMidiClientUtility& aUtility )
|
sl@0
|
290 |
{
|
sl@0
|
291 |
|
sl@0
|
292 |
DEBPRN0;
|
sl@0
|
293 |
CCustomInterfaceUtility* customInterface = CCustomInterfaceUtility::NewL(aUtility);
|
sl@0
|
294 |
CleanupStack::PushL(customInterface);
|
sl@0
|
295 |
|
sl@0
|
296 |
CEnvironmentalReverbProxy* environmentalReverbProxy = (CEnvironmentalReverbProxy*)customInterface->CustomInterface(KUidEnvironmentalReverbEffect);
|
sl@0
|
297 |
|
sl@0
|
298 |
if ( !environmentalReverbProxy )
|
sl@0
|
299 |
{
|
sl@0
|
300 |
DEBPRN1("No Adaptation Support - leaving");
|
sl@0
|
301 |
User::Leave(KErrNotSupported);
|
sl@0
|
302 |
}
|
sl@0
|
303 |
|
sl@0
|
304 |
CleanupStack::Pop(customInterface);
|
sl@0
|
305 |
|
sl@0
|
306 |
return environmentalReverbProxy;
|
sl@0
|
307 |
}
|
sl@0
|
308 |
|
sl@0
|
309 |
// -----------------------------------------------------------------------------
|
sl@0
|
310 |
// CEnvironmentalReverb::NewL
|
sl@0
|
311 |
// Static function for creating an instance of the EnvironmentalReverb object.
|
sl@0
|
312 |
// -----------------------------------------------------------------------------
|
sl@0
|
313 |
//
|
sl@0
|
314 |
EXPORT_C CEnvironmentalReverb* CEnvironmentalReverb::NewL(CDrmPlayerUtility& aUtility)
|
sl@0
|
315 |
{
|
sl@0
|
316 |
|
sl@0
|
317 |
DEBPRN0;
|
sl@0
|
318 |
CCustomInterfaceUtility* customInterface = CCustomInterfaceUtility::NewL(aUtility);
|
sl@0
|
319 |
CleanupStack::PushL(customInterface);
|
sl@0
|
320 |
|
sl@0
|
321 |
CEnvironmentalReverbProxy* environmentalReverbProxy = (CEnvironmentalReverbProxy*)customInterface->CustomInterface(KUidEnvironmentalReverbEffect);
|
sl@0
|
322 |
|
sl@0
|
323 |
if ( !environmentalReverbProxy )
|
sl@0
|
324 |
{
|
sl@0
|
325 |
DEBPRN1("No Adaptation Support - leaving");
|
sl@0
|
326 |
User::Leave(KErrNotSupported);
|
sl@0
|
327 |
}
|
sl@0
|
328 |
|
sl@0
|
329 |
CleanupStack::Pop(customInterface);
|
sl@0
|
330 |
|
sl@0
|
331 |
return environmentalReverbProxy;
|
sl@0
|
332 |
}
|
sl@0
|
333 |
|
sl@0
|
334 |
// -----------------------------------------------------------------------------
|
sl@0
|
335 |
// CEnvironmentalReverb::NewL
|
sl@0
|
336 |
// Static function for creating an instance of the EnvironmentalReverb object.
|
sl@0
|
337 |
// -----------------------------------------------------------------------------
|
sl@0
|
338 |
//
|
sl@0
|
339 |
EXPORT_C CEnvironmentalReverb* CEnvironmentalReverb::NewL(CVideoPlayerUtility& aUtility)
|
sl@0
|
340 |
{
|
sl@0
|
341 |
|
sl@0
|
342 |
DEBPRN0;
|
sl@0
|
343 |
CCustomInterfaceUtility* customInterface = CCustomInterfaceUtility::NewL(aUtility);
|
sl@0
|
344 |
CleanupStack::PushL(customInterface);
|
sl@0
|
345 |
|
sl@0
|
346 |
CEnvironmentalReverbProxy* environmentalReverbProxy = (CEnvironmentalReverbProxy*)customInterface->CustomInterface(KUidEnvironmentalReverbEffect);
|
sl@0
|
347 |
|
sl@0
|
348 |
if ( !environmentalReverbProxy )
|
sl@0
|
349 |
{
|
sl@0
|
350 |
DEBPRN1("No Adaptation Support - leaving");
|
sl@0
|
351 |
User::Leave(KErrNotSupported);
|
sl@0
|
352 |
}
|
sl@0
|
353 |
|
sl@0
|
354 |
CleanupStack::Pop(customInterface);
|
sl@0
|
355 |
|
sl@0
|
356 |
return environmentalReverbProxy;
|
sl@0
|
357 |
}
|
sl@0
|
358 |
|
sl@0
|
359 |
// -----------------------------------------------------------------------------
|
sl@0
|
360 |
// CEnvironmentalReverb::DecayHFRatio
|
sl@0
|
361 |
// -----------------------------------------------------------------------------
|
sl@0
|
362 |
//
|
sl@0
|
363 |
EXPORT_C TUint32 CEnvironmentalReverb::DecayHFRatio() const
|
sl@0
|
364 |
{
|
sl@0
|
365 |
return iReverbData.iDecayHFRatio;
|
sl@0
|
366 |
}
|
sl@0
|
367 |
|
sl@0
|
368 |
// -----------------------------------------------------------------------------
|
sl@0
|
369 |
// CEnvironmentalReverb::DecayHFRatioRange
|
sl@0
|
370 |
// -----------------------------------------------------------------------------
|
sl@0
|
371 |
//
|
sl@0
|
372 |
EXPORT_C void CEnvironmentalReverb::DecayHFRatioRange(
|
sl@0
|
373 |
TUint32& aMin,
|
sl@0
|
374 |
TUint32& aMax )
|
sl@0
|
375 |
{
|
sl@0
|
376 |
aMin = iReverbData.iDecayHFRatioMin;
|
sl@0
|
377 |
aMax = iReverbData.iDecayHFRatioMax;
|
sl@0
|
378 |
}
|
sl@0
|
379 |
|
sl@0
|
380 |
// -----------------------------------------------------------------------------
|
sl@0
|
381 |
// CEnvironmentalReverb::DecayTime
|
sl@0
|
382 |
// -----------------------------------------------------------------------------
|
sl@0
|
383 |
//
|
sl@0
|
384 |
EXPORT_C TUint32 CEnvironmentalReverb::DecayTime() const
|
sl@0
|
385 |
{
|
sl@0
|
386 |
return iReverbData.iDecayTime;
|
sl@0
|
387 |
}
|
sl@0
|
388 |
|
sl@0
|
389 |
// -----------------------------------------------------------------------------
|
sl@0
|
390 |
// CEnvironmentalReverb::DecayTimeRange
|
sl@0
|
391 |
// -----------------------------------------------------------------------------
|
sl@0
|
392 |
//
|
sl@0
|
393 |
EXPORT_C void CEnvironmentalReverb::DecayTimeRange(
|
sl@0
|
394 |
TUint32& aMin,
|
sl@0
|
395 |
TUint32& aMax)
|
sl@0
|
396 |
{
|
sl@0
|
397 |
aMin = iReverbData.iDecayTimeMin;
|
sl@0
|
398 |
aMax = iReverbData.iDecayTimeMax;
|
sl@0
|
399 |
}
|
sl@0
|
400 |
|
sl@0
|
401 |
// -----------------------------------------------------------------------------
|
sl@0
|
402 |
// CEnvironmentalReverb::Density
|
sl@0
|
403 |
// -----------------------------------------------------------------------------
|
sl@0
|
404 |
//
|
sl@0
|
405 |
EXPORT_C TUint32 CEnvironmentalReverb::Density() const
|
sl@0
|
406 |
{
|
sl@0
|
407 |
return iReverbData.iDensity;
|
sl@0
|
408 |
}
|
sl@0
|
409 |
|
sl@0
|
410 |
// -----------------------------------------------------------------------------
|
sl@0
|
411 |
// CEnvironmentalReverb::Diffusion
|
sl@0
|
412 |
// -----------------------------------------------------------------------------
|
sl@0
|
413 |
//
|
sl@0
|
414 |
EXPORT_C TUint32 CEnvironmentalReverb::Diffusion() const
|
sl@0
|
415 |
{
|
sl@0
|
416 |
return iReverbData.iDiffusion;
|
sl@0
|
417 |
}
|
sl@0
|
418 |
|
sl@0
|
419 |
// -----------------------------------------------------------------------------
|
sl@0
|
420 |
// CEnvironmentalReverb::ReflectionsDelay
|
sl@0
|
421 |
// -----------------------------------------------------------------------------
|
sl@0
|
422 |
//
|
sl@0
|
423 |
EXPORT_C TUint32 CEnvironmentalReverb::ReflectionsDelay() const
|
sl@0
|
424 |
{
|
sl@0
|
425 |
return iReverbData.iReflectionsDelay;
|
sl@0
|
426 |
}
|
sl@0
|
427 |
|
sl@0
|
428 |
// -----------------------------------------------------------------------------
|
sl@0
|
429 |
// CEnvironmentalReverb::ReflectionsDelayMax
|
sl@0
|
430 |
// -----------------------------------------------------------------------------
|
sl@0
|
431 |
//
|
sl@0
|
432 |
EXPORT_C TUint32 CEnvironmentalReverb::ReflectionsDelayMax() const
|
sl@0
|
433 |
{
|
sl@0
|
434 |
return iReverbData.iReflectionsDelayMax;
|
sl@0
|
435 |
}
|
sl@0
|
436 |
|
sl@0
|
437 |
// -----------------------------------------------------------------------------
|
sl@0
|
438 |
// CEnvironmentalReverb::ReflectionsLevel
|
sl@0
|
439 |
// -----------------------------------------------------------------------------
|
sl@0
|
440 |
//
|
sl@0
|
441 |
EXPORT_C TInt32 CEnvironmentalReverb::ReflectionsLevel() const
|
sl@0
|
442 |
{
|
sl@0
|
443 |
return iReverbData.iReflectionsLevel;
|
sl@0
|
444 |
}
|
sl@0
|
445 |
|
sl@0
|
446 |
// -----------------------------------------------------------------------------
|
sl@0
|
447 |
// CEnvironmentalReverb::ReflectionLevelRange
|
sl@0
|
448 |
// -----------------------------------------------------------------------------
|
sl@0
|
449 |
//
|
sl@0
|
450 |
EXPORT_C void CEnvironmentalReverb::ReflectionLevelRange(
|
sl@0
|
451 |
TInt32& aMin,
|
sl@0
|
452 |
TInt32& aMax)
|
sl@0
|
453 |
{
|
sl@0
|
454 |
aMin = iReverbData.iReflectionLevelMin;
|
sl@0
|
455 |
aMax = iReverbData.iReflectionLevelMax;
|
sl@0
|
456 |
}
|
sl@0
|
457 |
|
sl@0
|
458 |
// -----------------------------------------------------------------------------
|
sl@0
|
459 |
// CEnvironmentalReverb::ReverbDelay
|
sl@0
|
460 |
// -----------------------------------------------------------------------------
|
sl@0
|
461 |
//
|
sl@0
|
462 |
EXPORT_C TUint32 CEnvironmentalReverb::ReverbDelay() const
|
sl@0
|
463 |
{
|
sl@0
|
464 |
return iReverbData.iReverbDelay;
|
sl@0
|
465 |
}
|
sl@0
|
466 |
|
sl@0
|
467 |
// -----------------------------------------------------------------------------
|
sl@0
|
468 |
// CEnvironmentalReverb::ReverbDelayMax
|
sl@0
|
469 |
// -----------------------------------------------------------------------------
|
sl@0
|
470 |
//
|
sl@0
|
471 |
EXPORT_C TUint32 CEnvironmentalReverb::ReverbDelayMax() const
|
sl@0
|
472 |
{
|
sl@0
|
473 |
return iReverbData.iReverbDelayMax;
|
sl@0
|
474 |
}
|
sl@0
|
475 |
|
sl@0
|
476 |
|
sl@0
|
477 |
// -----------------------------------------------------------------------------
|
sl@0
|
478 |
// CEnvironmentalReverb::ReverbLevel
|
sl@0
|
479 |
// -----------------------------------------------------------------------------
|
sl@0
|
480 |
//
|
sl@0
|
481 |
EXPORT_C TInt32 CEnvironmentalReverb::ReverbLevel() const
|
sl@0
|
482 |
{
|
sl@0
|
483 |
return iReverbData.iReverbLevel;
|
sl@0
|
484 |
}
|
sl@0
|
485 |
|
sl@0
|
486 |
// -----------------------------------------------------------------------------
|
sl@0
|
487 |
// CEnvironmentalReverb::ReverbLevelRange
|
sl@0
|
488 |
// -----------------------------------------------------------------------------
|
sl@0
|
489 |
//
|
sl@0
|
490 |
EXPORT_C void CEnvironmentalReverb::ReverbLevelRange(
|
sl@0
|
491 |
TInt32& aMin,
|
sl@0
|
492 |
TInt32& aMax)
|
sl@0
|
493 |
{
|
sl@0
|
494 |
aMin = iReverbData.iReverbLevelMin;
|
sl@0
|
495 |
aMax = iReverbData.iReverbLevelMax;
|
sl@0
|
496 |
}
|
sl@0
|
497 |
|
sl@0
|
498 |
|
sl@0
|
499 |
// -----------------------------------------------------------------------------
|
sl@0
|
500 |
// CEnvironmentalReverb::RoomHFLevel
|
sl@0
|
501 |
// -----------------------------------------------------------------------------
|
sl@0
|
502 |
//
|
sl@0
|
503 |
EXPORT_C TInt32 CEnvironmentalReverb::RoomHFLevel() const
|
sl@0
|
504 |
{
|
sl@0
|
505 |
return iReverbData.iRoomHFLevel;
|
sl@0
|
506 |
}
|
sl@0
|
507 |
|
sl@0
|
508 |
|
sl@0
|
509 |
// -----------------------------------------------------------------------------
|
sl@0
|
510 |
// CEnvironmentalReverb::RoomHFLevelRange
|
sl@0
|
511 |
// -----------------------------------------------------------------------------
|
sl@0
|
512 |
//
|
sl@0
|
513 |
EXPORT_C void CEnvironmentalReverb::RoomHFLevelRange(
|
sl@0
|
514 |
TInt32& aMin,
|
sl@0
|
515 |
TInt32& aMax)
|
sl@0
|
516 |
{
|
sl@0
|
517 |
aMin = iReverbData.iRoomHFLevelMin;
|
sl@0
|
518 |
aMax = iReverbData.iRoomHFLevelMax;
|
sl@0
|
519 |
}
|
sl@0
|
520 |
|
sl@0
|
521 |
|
sl@0
|
522 |
// -----------------------------------------------------------------------------
|
sl@0
|
523 |
// CEnvironmentalReverb::RoomLevel
|
sl@0
|
524 |
// -----------------------------------------------------------------------------
|
sl@0
|
525 |
//
|
sl@0
|
526 |
EXPORT_C TInt32 CEnvironmentalReverb::RoomLevel() const
|
sl@0
|
527 |
|
sl@0
|
528 |
{
|
sl@0
|
529 |
return iReverbData.iRoomLevel;
|
sl@0
|
530 |
}
|
sl@0
|
531 |
|
sl@0
|
532 |
|
sl@0
|
533 |
// -----------------------------------------------------------------------------
|
sl@0
|
534 |
// CEnvironmentalReverb::RoomLevelRange
|
sl@0
|
535 |
// -----------------------------------------------------------------------------
|
sl@0
|
536 |
//
|
sl@0
|
537 |
EXPORT_C void CEnvironmentalReverb::RoomLevelRange(
|
sl@0
|
538 |
TInt32& aMin,
|
sl@0
|
539 |
TInt32& aMax)
|
sl@0
|
540 |
{
|
sl@0
|
541 |
aMin = iReverbData.iRoomLevelMin;
|
sl@0
|
542 |
aMax = iReverbData.iRoomLevelMax;
|
sl@0
|
543 |
}
|
sl@0
|
544 |
|
sl@0
|
545 |
|
sl@0
|
546 |
|
sl@0
|
547 |
// -----------------------------------------------------------------------------
|
sl@0
|
548 |
// CEnvironmentalReverb::SetDecayHFRatioL
|
sl@0
|
549 |
// -----------------------------------------------------------------------------
|
sl@0
|
550 |
//
|
sl@0
|
551 |
EXPORT_C void CEnvironmentalReverb::SetDecayHFRatioL(
|
sl@0
|
552 |
TUint32 aDecayHFRatio )
|
sl@0
|
553 |
{
|
sl@0
|
554 |
if ( (aDecayHFRatio >= iReverbData.iDecayHFRatioMin) && (aDecayHFRatio <= iReverbData.iDecayHFRatioMax) )
|
sl@0
|
555 |
{
|
sl@0
|
556 |
iReverbData.iDecayHFRatio = aDecayHFRatio;
|
sl@0
|
557 |
}
|
sl@0
|
558 |
else
|
sl@0
|
559 |
{
|
sl@0
|
560 |
User::Leave(KErrArgument);
|
sl@0
|
561 |
}
|
sl@0
|
562 |
}
|
sl@0
|
563 |
|
sl@0
|
564 |
|
sl@0
|
565 |
// -----------------------------------------------------------------------------
|
sl@0
|
566 |
// CEnvironmentalReverb::SetDecayTimeL
|
sl@0
|
567 |
// -----------------------------------------------------------------------------
|
sl@0
|
568 |
//
|
sl@0
|
569 |
EXPORT_C void CEnvironmentalReverb::SetDecayTimeL(
|
sl@0
|
570 |
TUint32 aDecayTime )
|
sl@0
|
571 |
{
|
sl@0
|
572 |
if ( (aDecayTime >= iReverbData.iDecayTimeMin) && (aDecayTime <= iReverbData.iDecayTimeMax) )
|
sl@0
|
573 |
{
|
sl@0
|
574 |
iReverbData.iDecayTime = aDecayTime;
|
sl@0
|
575 |
}
|
sl@0
|
576 |
else
|
sl@0
|
577 |
{
|
sl@0
|
578 |
User::Leave(KErrArgument);
|
sl@0
|
579 |
}
|
sl@0
|
580 |
}
|
sl@0
|
581 |
|
sl@0
|
582 |
|
sl@0
|
583 |
// -----------------------------------------------------------------------------
|
sl@0
|
584 |
// CEnvironmentalReverb::SetDensityL
|
sl@0
|
585 |
// -----------------------------------------------------------------------------
|
sl@0
|
586 |
//
|
sl@0
|
587 |
EXPORT_C void CEnvironmentalReverb::SetDensityL(
|
sl@0
|
588 |
TUint32 aDensity )
|
sl@0
|
589 |
{
|
sl@0
|
590 |
iReverbData.iDensity = aDensity;
|
sl@0
|
591 |
}
|
sl@0
|
592 |
|
sl@0
|
593 |
// -----------------------------------------------------------------------------
|
sl@0
|
594 |
// CEnvironmentalReverb::SetDiffusionL
|
sl@0
|
595 |
// -----------------------------------------------------------------------------
|
sl@0
|
596 |
//
|
sl@0
|
597 |
EXPORT_C void CEnvironmentalReverb::SetDiffusionL(
|
sl@0
|
598 |
TUint32 aDiffusion )
|
sl@0
|
599 |
{
|
sl@0
|
600 |
iReverbData.iDiffusion = aDiffusion;
|
sl@0
|
601 |
}
|
sl@0
|
602 |
|
sl@0
|
603 |
|
sl@0
|
604 |
// -----------------------------------------------------------------------------
|
sl@0
|
605 |
// CEnvironmentalReverb::SetReflectionsDelayL
|
sl@0
|
606 |
// -----------------------------------------------------------------------------
|
sl@0
|
607 |
//
|
sl@0
|
608 |
EXPORT_C void CEnvironmentalReverb::SetReflectionsDelayL(
|
sl@0
|
609 |
TUint32 aReflectionsDelay )
|
sl@0
|
610 |
{
|
sl@0
|
611 |
if ( aReflectionsDelay > iReverbData.iReflectionsDelayMax )
|
sl@0
|
612 |
{
|
sl@0
|
613 |
User::Leave(KErrArgument);
|
sl@0
|
614 |
}
|
sl@0
|
615 |
else
|
sl@0
|
616 |
{
|
sl@0
|
617 |
iReverbData.iReflectionsDelay = aReflectionsDelay;
|
sl@0
|
618 |
}
|
sl@0
|
619 |
}
|
sl@0
|
620 |
|
sl@0
|
621 |
// -----------------------------------------------------------------------------
|
sl@0
|
622 |
// CEnvironmentalReverb::SetReflectionsLevelL
|
sl@0
|
623 |
// -----------------------------------------------------------------------------
|
sl@0
|
624 |
//
|
sl@0
|
625 |
EXPORT_C void CEnvironmentalReverb::SetReflectionsLevelL(
|
sl@0
|
626 |
TInt32 aReflectionsLevel )
|
sl@0
|
627 |
{
|
sl@0
|
628 |
if ( (aReflectionsLevel >= iReverbData.iReflectionLevelMin) && (aReflectionsLevel <= iReverbData.iReflectionLevelMax) )
|
sl@0
|
629 |
{
|
sl@0
|
630 |
iReverbData.iReflectionsLevel = aReflectionsLevel;
|
sl@0
|
631 |
}
|
sl@0
|
632 |
else
|
sl@0
|
633 |
{
|
sl@0
|
634 |
User::Leave(KErrArgument);
|
sl@0
|
635 |
}
|
sl@0
|
636 |
}
|
sl@0
|
637 |
|
sl@0
|
638 |
// -----------------------------------------------------------------------------
|
sl@0
|
639 |
// CEnvironmentalReverb::SetReverbDelayL
|
sl@0
|
640 |
// -----------------------------------------------------------------------------
|
sl@0
|
641 |
//
|
sl@0
|
642 |
EXPORT_C void CEnvironmentalReverb::SetReverbDelayL(
|
sl@0
|
643 |
TUint32 aReverbDelay )
|
sl@0
|
644 |
{
|
sl@0
|
645 |
if ( aReverbDelay > iReverbData.iReverbDelayMax )
|
sl@0
|
646 |
{
|
sl@0
|
647 |
User::Leave(KErrArgument);
|
sl@0
|
648 |
}
|
sl@0
|
649 |
else
|
sl@0
|
650 |
{
|
sl@0
|
651 |
iReverbData.iReverbDelay = aReverbDelay;
|
sl@0
|
652 |
}
|
sl@0
|
653 |
}
|
sl@0
|
654 |
|
sl@0
|
655 |
|
sl@0
|
656 |
// -----------------------------------------------------------------------------
|
sl@0
|
657 |
// CEnvironmentalReverb::SetReverbLevelL
|
sl@0
|
658 |
// -----------------------------------------------------------------------------
|
sl@0
|
659 |
//
|
sl@0
|
660 |
EXPORT_C void CEnvironmentalReverb::SetReverbLevelL(
|
sl@0
|
661 |
TInt32 aReverbLevel )
|
sl@0
|
662 |
{
|
sl@0
|
663 |
if ( (aReverbLevel >= iReverbData.iReverbLevelMin) && (aReverbLevel <= iReverbData.iReverbLevelMax) )
|
sl@0
|
664 |
{
|
sl@0
|
665 |
iReverbData.iReverbLevel = aReverbLevel;
|
sl@0
|
666 |
}
|
sl@0
|
667 |
else
|
sl@0
|
668 |
{
|
sl@0
|
669 |
User::Leave(KErrArgument);
|
sl@0
|
670 |
}
|
sl@0
|
671 |
}
|
sl@0
|
672 |
|
sl@0
|
673 |
// -----------------------------------------------------------------------------
|
sl@0
|
674 |
// CEnvironmentalReverb::SetRoomHFLevelL
|
sl@0
|
675 |
// -----------------------------------------------------------------------------
|
sl@0
|
676 |
//
|
sl@0
|
677 |
EXPORT_C void CEnvironmentalReverb::SetRoomHFLevelL(
|
sl@0
|
678 |
TInt32 aRoomHFLevel )
|
sl@0
|
679 |
{
|
sl@0
|
680 |
if ( (aRoomHFLevel >= iReverbData.iRoomHFLevelMin) && (aRoomHFLevel <= iReverbData.iRoomHFLevelMax) )
|
sl@0
|
681 |
{
|
sl@0
|
682 |
iReverbData.iRoomHFLevel = aRoomHFLevel;
|
sl@0
|
683 |
}
|
sl@0
|
684 |
else
|
sl@0
|
685 |
{
|
sl@0
|
686 |
User::Leave(KErrArgument);
|
sl@0
|
687 |
}
|
sl@0
|
688 |
}
|
sl@0
|
689 |
|
sl@0
|
690 |
// -----------------------------------------------------------------------------
|
sl@0
|
691 |
// CEnvironmentalReverb::SetRoomLevelL
|
sl@0
|
692 |
// -----------------------------------------------------------------------------
|
sl@0
|
693 |
//
|
sl@0
|
694 |
EXPORT_C void CEnvironmentalReverb::SetRoomLevelL(
|
sl@0
|
695 |
TInt32 aRoomLevel )
|
sl@0
|
696 |
{
|
sl@0
|
697 |
if ( (aRoomLevel >= iReverbData.iRoomLevelMin) && (aRoomLevel <= iReverbData.iRoomLevelMax) )
|
sl@0
|
698 |
{
|
sl@0
|
699 |
iReverbData.iRoomLevel = aRoomLevel;
|
sl@0
|
700 |
}
|
sl@0
|
701 |
else
|
sl@0
|
702 |
{
|
sl@0
|
703 |
User::Leave(KErrArgument);
|
sl@0
|
704 |
}
|
sl@0
|
705 |
}
|
sl@0
|
706 |
|
sl@0
|
707 |
// -----------------------------------------------------------------------------
|
sl@0
|
708 |
// CEnvironmentalReverb::DelayMax
|
sl@0
|
709 |
// -----------------------------------------------------------------------------
|
sl@0
|
710 |
//
|
sl@0
|
711 |
EXPORT_C TUint32 CEnvironmentalReverb::DelayMax() const
|
sl@0
|
712 |
{
|
sl@0
|
713 |
return iReverbData.iDelayMax;
|
sl@0
|
714 |
}
|
sl@0
|
715 |
|
sl@0
|
716 |
|
sl@0
|
717 |
// -----------------------------------------------------------------------------
|
sl@0
|
718 |
// CEnvironmentalReverb::Uid
|
sl@0
|
719 |
// -----------------------------------------------------------------------------
|
sl@0
|
720 |
//
|
sl@0
|
721 |
EXPORT_C TUid CEnvironmentalReverb::Uid() const
|
sl@0
|
722 |
{
|
sl@0
|
723 |
return KUidEnvironmentalReverbEffect;
|
sl@0
|
724 |
}
|
sl@0
|
725 |
|
sl@0
|
726 |
|
sl@0
|
727 |
// -----------------------------------------------------------------------------
|
sl@0
|
728 |
// CEnvironmentalReverb::DoEffectData
|
sl@0
|
729 |
// -----------------------------------------------------------------------------
|
sl@0
|
730 |
//
|
sl@0
|
731 |
EXPORT_C const TDesC8& CEnvironmentalReverb::DoEffectData()
|
sl@0
|
732 |
{
|
sl@0
|
733 |
DEBPRN0;
|
sl@0
|
734 |
iDataPckgTo = iReverbData;
|
sl@0
|
735 |
return iDataPckgTo;
|
sl@0
|
736 |
}
|
sl@0
|
737 |
|
sl@0
|
738 |
// -----------------------------------------------------------------------------
|
sl@0
|
739 |
// CEnvironmentalReverb::SetEffectData
|
sl@0
|
740 |
// -----------------------------------------------------------------------------
|
sl@0
|
741 |
//
|
sl@0
|
742 |
EXPORT_C void CEnvironmentalReverb::SetEffectData(
|
sl@0
|
743 |
const TDesC8& aEffectDataBuffer )
|
sl@0
|
744 |
{
|
sl@0
|
745 |
DEBPRN0;
|
sl@0
|
746 |
TEfEnvReverbDataPckg dataPckg;
|
sl@0
|
747 |
dataPckg.Copy(aEffectDataBuffer);
|
sl@0
|
748 |
iReverbData = dataPckg();
|
sl@0
|
749 |
iEnabled = iReverbData.iEnabled;
|
sl@0
|
750 |
iEnforced = iReverbData.iEnforced;
|
sl@0
|
751 |
iHaveUpdateRights = iReverbData.iHaveUpdateRights;
|
sl@0
|
752 |
}
|
sl@0
|
753 |
|
sl@0
|
754 |
|
sl@0
|
755 |
// ========================== OTHER EXPORTED FUNCTIONS =========================
|
sl@0
|
756 |
|
sl@0
|
757 |
|