|
1 /* |
|
2 * Copyright (c) 2006-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: Module for holding control groups belonging to EffectModule. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDE FILES |
|
20 #include "cammseffectmodule.h" |
|
21 #include "cammsaudiovirtualizercontrolgroup.h" |
|
22 #include "cammsglobalmanager.h" |
|
23 #include "jdebug.h" |
|
24 |
|
25 |
|
26 // ============================ MEMBER FUNCTIONS =============================== |
|
27 |
|
28 // ----------------------------------------------------------------------------- |
|
29 // CAMMSEffectModule::NewLC |
|
30 // Two-phased constructor. |
|
31 // ----------------------------------------------------------------------------- |
|
32 CAMMSEffectModule* CAMMSEffectModule::NewLC( |
|
33 CAMMSGlobalManager* aGlobalManager) |
|
34 { |
|
35 DEBUG("AMMS:CAMMSEffectModule::NewLC +"); |
|
36 |
|
37 CAMMSEffectModule* self = new(ELeave) CAMMSEffectModule(aGlobalManager); |
|
38 |
|
39 CleanupStack::PushL(self); |
|
40 self->ConstructL(); |
|
41 |
|
42 DEBUG("AMMS:CAMMSEffectModule::NewLC -"); |
|
43 |
|
44 return self; |
|
45 } |
|
46 |
|
47 // ----------------------------------------------------------------------------- |
|
48 // CAMMSEffectModule::~CAMMSEffectModule() |
|
49 // Destructor. |
|
50 // ----------------------------------------------------------------------------- |
|
51 // |
|
52 CAMMSEffectModule::~CAMMSEffectModule() |
|
53 { |
|
54 DEBUG("AMMS:CAMMSEffectModule::~"); |
|
55 } |
|
56 |
|
57 // ----------------------------------------------------------------------------- |
|
58 // CAMMSEffectModule::AddPlayerNoStateCheckL |
|
59 // Adds player without checking its state. |
|
60 // (other items were commented in a header). |
|
61 // ----------------------------------------------------------------------------- |
|
62 // |
|
63 void CAMMSEffectModule::AddPlayerNoStateCheckL(CMMAPlayer* aPlayer) |
|
64 { |
|
65 DEBUG("AMMS:CAMMSEffectModule::AddPlayerNoStateCheckL +"); |
|
66 |
|
67 // Check that the player can be added. |
|
68 User::LeaveIfError(iGlobalManager->PlayerAddingAllowed(aPlayer)); |
|
69 |
|
70 // Add the player to this module. |
|
71 CAMMSModule::AddPlayerNoStateCheckL(aPlayer); |
|
72 |
|
73 DEBUG("AMMS:CAMMSEffectModule::AddPlayerNoStateCheckL -"); |
|
74 } |
|
75 |
|
76 |
|
77 // ----------------------------------------------------------------------------- |
|
78 // CAMMSSoundSource3D::ConstructL |
|
79 // Symbian 2nd phase constructor can leave. |
|
80 // ----------------------------------------------------------------------------- |
|
81 void CAMMSEffectModule::ConstructL() |
|
82 { |
|
83 DEBUG("AMMS:CAMMSEffectModule::ConstructL +"); |
|
84 |
|
85 CAMMSModule::ConstructL(); |
|
86 |
|
87 // Add required controls to the EffectModule. |
|
88 |
|
89 AddControlGroupAndPopL(CAMMSAudioVirtualizerControlGroup::NewLC()); |
|
90 |
|
91 DEBUG("AMMS:CAMMSEffectModule::ConstructL -"); |
|
92 } |
|
93 |
|
94 // ----------------------------------------------------------------------------- |
|
95 // CAMMSEffectModule::CAMMSEffectModule |
|
96 // C++ default constructor can NOT contain any code, that |
|
97 // might leave. |
|
98 // ----------------------------------------------------------------------------- |
|
99 CAMMSEffectModule::CAMMSEffectModule(CAMMSGlobalManager* aGlobalManager) |
|
100 : iGlobalManager(aGlobalManager) |
|
101 { |
|
102 } |
|
103 |
|
104 // End of File |