1 /* |
|
2 * Copyright (c) 2005-2007 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: Controls an abstract filter with various preset settings. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 #include <logger.h> |
|
22 #include "cammseffectcontrol.h" |
|
23 #include "cammseffectcontrolgroup.h" |
|
24 |
|
25 // ============================ MEMBER FUNCTIONS =============================== |
|
26 |
|
27 // Destructor |
|
28 CAMMSEffectControl::~CAMMSEffectControl() |
|
29 { |
|
30 LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEffectControl::~CAMMSEffectControl"); |
|
31 } |
|
32 |
|
33 // ----------------------------------------------------------------------------- |
|
34 // CAMMSEffectControl::SetEnforcedL |
|
35 // Enforces the effect to be in use. |
|
36 // ----------------------------------------------------------------------------- |
|
37 // |
|
38 void CAMMSEffectControl::SetEnforcedL(TBool aEnforced) |
|
39 { |
|
40 LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEffectControl:SetEnforcedL"); |
|
41 // Indicate the effect is to be enforced or not. ETrue = Enforced. |
|
42 |
|
43 iAudioEffect->EnforceL(aEnforced); |
|
44 |
|
45 ApplySettingsL(); |
|
46 } |
|
47 |
|
48 // ----------------------------------------------------------------------------- |
|
49 // CAMMSEffectControl::Enforced |
|
50 // Returns the current enforced setting of the effect. |
|
51 // ----------------------------------------------------------------------------- |
|
52 // |
|
53 TBool CAMMSEffectControl::Enforced() |
|
54 { |
|
55 // Returns ETrue if the effect is enforced, EFalse if not enforced. |
|
56 return iAudioEffect->IsEnforced(); |
|
57 } |
|
58 |
|
59 // ----------------------------------------------------------------------------- |
|
60 // CAMMSEffectControl::SetScopeL |
|
61 // Sets the scope of the effect. |
|
62 // ----------------------------------------------------------------------------- |
|
63 // |
|
64 void CAMMSEffectControl::SetScopeL(TInt aScope) |
|
65 { |
|
66 LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEffectControl:SetScopeL"); |
|
67 // Check in debug build that scope is the only supported scope (LIVE_ONLY). |
|
68 __ASSERT_DEBUG( |
|
69 (aScope == CAMMSEffectControlGroup::EScopeLiveOnly), |
|
70 User::Invariant()); |
|
71 // Just to suppress warning in release build |
|
72 (void)aScope; |
|
73 } |
|
74 |
|
75 // ----------------------------------------------------------------------------- |
|
76 // CAMMSEffectControl::Scope |
|
77 // Returns the scope in which the effect is present. |
|
78 // ----------------------------------------------------------------------------- |
|
79 // |
|
80 TInt CAMMSEffectControl::Scope() |
|
81 { |
|
82 // For now only the (LIVE_ONLY) scope is supported. |
|
83 return CAMMSEffectControlGroup::EScopeLiveOnly; |
|
84 } |
|
85 |
|
86 // ----------------------------------------------------------------------------- |
|
87 // CAMMSEffectControl::ApplySettingsL |
|
88 // Apply changed settings if Effect is in enabled state. |
|
89 // ----------------------------------------------------------------------------- |
|
90 void CAMMSEffectControl::ApplySettingsL() |
|
91 { |
|
92 LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEffectControl:ApplySettingsL called, checking state"); |
|
93 if (iAudioEffect->IsEnabled()) |
|
94 { |
|
95 LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEffectControl:ApplySettingsL calling ApplyL"); |
|
96 iAudioEffect->ApplyL(); |
|
97 } |
|
98 } |
|
99 |
|
100 // ----------------------------------------------------------------------------- |
|
101 // CAMMSEffectControl::ConstructL |
|
102 // Symbian 2nd phase constructor can leave. |
|
103 // ----------------------------------------------------------------------------- |
|
104 void CAMMSEffectControl::ConstructL() |
|
105 { |
|
106 } |
|
107 |
|
108 // ----------------------------------------------------------------------------- |
|
109 // CAMMSEffectControl::CAMMSEffectControl |
|
110 // C++ default constructor can NOT contain any code, that |
|
111 // might leave. |
|
112 // ----------------------------------------------------------------------------- |
|
113 CAMMSEffectControl::CAMMSEffectControl(CMMAPlayer* aPlayer): |
|
114 CAMMSControl(aPlayer) |
|
115 { |
|
116 } |
|
117 |
|
118 // End of File |
|