|
1 /* |
|
2 * Copyright (c) 2005 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: Manipulates the settings of an audio effect reverb source. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CAMMSEMCREVERBSOURCECONTROL_H |
|
20 #define CAMMSEMCREVERBSOURCECONTROL_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 #include <RoomLevelControl.h> |
|
25 #include "cammsbasereverbsourcecontrol.h" |
|
26 #include <cmmaemcaudioplayer.h> |
|
27 // CONSTANTS |
|
28 _LIT(KAMMSEMCReverbSourceControl, "ReverbSourceControl"); |
|
29 |
|
30 using multimedia::MRoomLevelControl; |
|
31 using multimedia::KRoomLevelEffectControl; |
|
32 |
|
33 // FORWARD DECLARATIONS |
|
34 class CAMMSBaseReverbControl; |
|
35 |
|
36 // CLASS DECLARATION |
|
37 |
|
38 /** |
|
39 * |
|
40 * Controls for the Reverb Source effect. |
|
41 * This class delegates Reverb Source effect method calls to CRoomLevel. |
|
42 * |
|
43 * |
|
44 * @since 5.1 |
|
45 */ |
|
46 NONSHARABLE_CLASS(CAMMSEMCReverbSourceControl): public CAMMSBaseReverbSourceControl /*CAMMSControl*/ |
|
47 { |
|
48 public: // Constructors and destructor |
|
49 |
|
50 /** |
|
51 * Two-phased constructor. |
|
52 * @param aPlayer Player that has this control. |
|
53 * @param aReverbControl Reverb control belonging to aPlayer. |
|
54 */ |
|
55 static CAMMSEMCReverbSourceControl* NewLC(CMMAPlayer* aPlayer, |
|
56 CAMMSBaseReverbControl* aBaseReverbControl); |
|
57 |
|
58 /** |
|
59 * Destructor. |
|
60 */ |
|
61 ~CAMMSEMCReverbSourceControl(); |
|
62 |
|
63 public: // New functions |
|
64 |
|
65 /** |
|
66 * Sets the object specific level for the reverberant sound. |
|
67 * The default value is 0 meaning the natural room gain (set by |
|
68 * ReverbControl's presets). |
|
69 * |
|
70 * @param aLevel The new level of the reverberation in millibels. |
|
71 * |
|
72 * @par Leaving: |
|
73 * @li \c KErrArgument - \a aLevel is greater than 0 |
|
74 */ |
|
75 void SetRoomLevelL(TInt aLevel); |
|
76 |
|
77 public: // Functions from base classes |
|
78 |
|
79 const TDesC& ClassName() const; |
|
80 |
|
81 /** |
|
82 * Prepares the Control. |
|
83 */ |
|
84 void PrepareControlL(); |
|
85 |
|
86 /** |
|
87 * Deallocates the Control. |
|
88 */ |
|
89 void DeallocateControl(); |
|
90 |
|
91 private: |
|
92 /** |
|
93 * C++ constructor. |
|
94 * @param aPlayer Player that has this control. |
|
95 * @param aReverbControl Reverb control belonging to aPlayer. |
|
96 */ |
|
97 CAMMSEMCReverbSourceControl(CMMAPlayer* aPlayer, |
|
98 CAMMSBaseReverbControl* aReverbControl); |
|
99 |
|
100 private: // Data |
|
101 |
|
102 /** Reverb control belonging to the player */ |
|
103 CAMMSBaseReverbControl* iBaseReverbControl; |
|
104 |
|
105 private: |
|
106 |
|
107 CMMAPlayer *iMMAPlayer; |
|
108 /** |
|
109 * EMC ReverbSource Control |
|
110 */ |
|
111 |
|
112 CMultimediaFactory* iFactory; |
|
113 MStreamControl* iStreamControl; |
|
114 MRoomLevelControl* iRoomLevelControl; |
|
115 }; |
|
116 |
|
117 #endif // CAMMSEMCREVERBSOURCECONTROL_H |
|
118 |
|
119 |