|
1 /* |
|
2 * Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Audio Stubs - Implementation of the StereoWidening effect Custom Interface class |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifdef _DEBUG |
|
20 #include <e32svr.h> |
|
21 #endif |
|
22 #include "StereoWideningCI.h" |
|
23 |
|
24 |
|
25 EXPORT_C CStereoWideningCI* CStereoWideningCI::NewL( |
|
26 CMMFDevSound& aDevSound ) |
|
27 { |
|
28 CStereoWideningCI* self = new(ELeave) CStereoWideningCI(aDevSound); |
|
29 return self; |
|
30 } |
|
31 |
|
32 CStereoWideningCI::CStereoWideningCI( |
|
33 CMMFDevSound& aDevSound ) |
|
34 : iDevSound(&aDevSound ) |
|
35 { |
|
36 iStereoWideningData.iLevel = 20; // Initial value |
|
37 iStereoWideningData.iContinuousLevelSupported = EFalse; // Initial value |
|
38 } |
|
39 |
|
40 EXPORT_C CStereoWideningCI* CStereoWideningCI::NewL() |
|
41 { |
|
42 CStereoWideningCI* self = new(ELeave) CStereoWideningCI(); |
|
43 return self; |
|
44 } |
|
45 |
|
46 CStereoWideningCI::CStereoWideningCI() |
|
47 { |
|
48 iStereoWideningData.iLevel = 20; // Initial value |
|
49 iStereoWideningData.iContinuousLevelSupported = EFalse; // Initial value |
|
50 } |
|
51 |
|
52 CStereoWideningCI::~CStereoWideningCI() |
|
53 { |
|
54 } |
|
55 |
|
56 void CStereoWideningCI::ApplyL() |
|
57 { |
|
58 #ifdef _DEBUG |
|
59 RDebug::Print(_L("CStereoWideningCI::ApplyL")); |
|
60 #endif |
|
61 |
|
62 if (iObservers.Count() > 0) |
|
63 { |
|
64 if(iStereoWideningData.iEnabled) |
|
65 { |
|
66 iEnabled = iStereoWideningData.iEnabled; |
|
67 iObservers[0]->EffectChanged(this, (TUint8)MAudioEffectObserver::KEnabled); |
|
68 } |
|
69 else |
|
70 { |
|
71 iEnabled = iStereoWideningData.iEnabled; |
|
72 iObservers[0]->EffectChanged(this, (TUint8)MAudioEffectObserver::KDisabled); |
|
73 } |
|
74 |
|
75 } |
|
76 } |
|
77 |
|
78 |
|
79 // ========================== OTHER EXPORTED FUNCTIONS ========================= |
|
80 |
|
81 |
|
82 // End of File |