williamr@2
|
1 |
/*
|
williamr@2
|
2 |
* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
|
williamr@2
|
3 |
* All rights reserved.
|
williamr@2
|
4 |
* This component and the accompanying materials are made available
|
williamr@2
|
5 |
* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
|
williamr@2
|
6 |
* which accompanies this distribution, and is available
|
williamr@2
|
7 |
* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
|
williamr@2
|
8 |
*
|
williamr@2
|
9 |
* Initial Contributors:
|
williamr@2
|
10 |
* Nokia Corporation - initial contribution.
|
williamr@2
|
11 |
*
|
williamr@2
|
12 |
* Contributors:
|
williamr@2
|
13 |
*
|
williamr@2
|
14 |
* Description: This is the definition of the Loudness effect class.
|
williamr@2
|
15 |
*
|
williamr@2
|
16 |
*/
|
williamr@2
|
17 |
|
williamr@2
|
18 |
|
williamr@2
|
19 |
#ifndef CLOUDNESS_H
|
williamr@2
|
20 |
#define CLOUDNESS_H
|
williamr@2
|
21 |
|
williamr@2
|
22 |
// INCLUDES
|
williamr@2
|
23 |
|
williamr@2
|
24 |
#include <e32base.h>
|
williamr@2
|
25 |
#include <AudioEffectBase.h>
|
williamr@2
|
26 |
#include <LoudnessData.h>
|
williamr@2
|
27 |
#include <MCustomInterface.h>
|
williamr@2
|
28 |
|
williamr@2
|
29 |
const TUid KUidLoudnessEffect = {0x10207AA8};
|
williamr@2
|
30 |
|
williamr@2
|
31 |
// FORWARD DELCARATION
|
williamr@2
|
32 |
class CMdaAudioConvertUtility;
|
williamr@2
|
33 |
class CMdaAudioPlayerUtility;
|
williamr@2
|
34 |
class CMdaAudioRecorderUtility;
|
williamr@2
|
35 |
class CMdaAudioInputStream;
|
williamr@2
|
36 |
class CMdaAudioOutputStream;
|
williamr@2
|
37 |
class CMdaAudioToneUtility;
|
williamr@2
|
38 |
class CCustomCommandUtility;
|
williamr@2
|
39 |
class CCustomInterfaceUtility;
|
williamr@2
|
40 |
class CMMFDevSound;
|
williamr@2
|
41 |
class CMidiClientUtility;
|
williamr@2
|
42 |
class CDrmPlayerUtility;
|
williamr@2
|
43 |
class CVideoPlayerUtility;
|
williamr@2
|
44 |
|
williamr@2
|
45 |
// CLASS DECLARATION
|
williamr@2
|
46 |
|
williamr@2
|
47 |
/**
|
williamr@2
|
48 |
* This is the Loudness effect class for managing audio Loudness settings.
|
williamr@2
|
49 |
*
|
williamr@2
|
50 |
* @lib LoudnessUtility.lib
|
williamr@2
|
51 |
* @since 3.0
|
williamr@2
|
52 |
*/
|
williamr@2
|
53 |
|
williamr@2
|
54 |
class CLoudness : public CAudioEffect
|
williamr@2
|
55 |
{
|
williamr@2
|
56 |
|
williamr@2
|
57 |
public: //New Functions
|
williamr@2
|
58 |
|
williamr@2
|
59 |
/**
|
williamr@2
|
60 |
* Factory function for creating the audio Loudness object.
|
williamr@2
|
61 |
* @since 3.0
|
williamr@2
|
62 |
* @param aUtility A reference to a convert utility
|
williamr@2
|
63 |
* @return pointer to CLoudness object
|
williamr@2
|
64 |
*/
|
williamr@2
|
65 |
IMPORT_C static CLoudness* NewL( CMdaAudioConvertUtility& aUtility );
|
williamr@2
|
66 |
|
williamr@2
|
67 |
/**
|
williamr@2
|
68 |
* Factory function for creating the Loudness object.
|
williamr@2
|
69 |
* @since 3.0
|
williamr@2
|
70 |
* @param aUtility A reference to an audio input stream utility
|
williamr@2
|
71 |
* @param aEnable Indicate whether the effect will be automatically enabled after creation.
|
williamr@2
|
72 |
* @return pointer to CLoudness object
|
williamr@2
|
73 |
*/
|
williamr@2
|
74 |
IMPORT_C static CLoudness* NewL( CMdaAudioInputStream& aUtility , TBool aEnable = EFalse );
|
williamr@2
|
75 |
|
williamr@2
|
76 |
/**
|
williamr@2
|
77 |
* Factory function for creating the Loudness object.
|
williamr@2
|
78 |
* @since 3.0
|
williamr@2
|
79 |
* @param aUtility A reference to an audio output stream utility
|
williamr@2
|
80 |
* @param aEnable Indicate whether the effect will be automatically enabled after creation.
|
williamr@2
|
81 |
* @return pointer to CLoudness object
|
williamr@2
|
82 |
*/
|
williamr@2
|
83 |
IMPORT_C static CLoudness* NewL( CMdaAudioOutputStream& aUtility , TBool aEnable = EFalse );
|
williamr@2
|
84 |
|
williamr@2
|
85 |
/**
|
williamr@2
|
86 |
* Factory function for creating the Loudness object.
|
williamr@2
|
87 |
* @since 3.0
|
williamr@2
|
88 |
* @param aUtility A reference to an audio player utility
|
williamr@2
|
89 |
* @param aEnable Indicate whether the effect will be automatically enabled after creation.
|
williamr@2
|
90 |
* @return pointer to CLoudness object
|
williamr@2
|
91 |
*/
|
williamr@2
|
92 |
IMPORT_C static CLoudness* NewL( CMdaAudioPlayerUtility& aUtility , TBool aEnable = EFalse );
|
williamr@2
|
93 |
|
williamr@2
|
94 |
/**
|
williamr@2
|
95 |
* Factory function for creating the Loudness object.
|
williamr@2
|
96 |
* @since 3.0
|
williamr@2
|
97 |
* @param aUtility A reference to an audio record utility
|
williamr@2
|
98 |
* @param aRecordStream ETrue if the effect is to be applied to the recording,
|
williamr@2
|
99 |
* EFalse if the effect is to be applied only to the playback
|
williamr@2
|
100 |
* @param aEnable Indicate whether the effect will be automatically enabled after creation.
|
williamr@2
|
101 |
* @return pointer to CLoudness object
|
williamr@2
|
102 |
*/
|
williamr@2
|
103 |
IMPORT_C static CLoudness* NewL( CMdaAudioRecorderUtility& aUtility, TBool aRecordStream, TBool aEnable = EFalse );
|
williamr@2
|
104 |
|
williamr@2
|
105 |
/**
|
williamr@2
|
106 |
* Factory function for creating the Loudness object.
|
williamr@2
|
107 |
* @since 3.0
|
williamr@2
|
108 |
* @param aUtility A reference to an audio tone utility
|
williamr@2
|
109 |
* @param aEnable Indicate whether the effect will be automatically enabled after creation.
|
williamr@2
|
110 |
* @return pointer to CLoudness object
|
williamr@2
|
111 |
*/
|
williamr@2
|
112 |
IMPORT_C static CLoudness* NewL( CMdaAudioToneUtility& aUtility , TBool aEnable = EFalse );
|
williamr@2
|
113 |
|
williamr@2
|
114 |
/**
|
williamr@2
|
115 |
* Factory function for creating the Loudness object.
|
williamr@2
|
116 |
* @since 3.0
|
williamr@2
|
117 |
* @param aDevSound A reference to a DevSound instance
|
williamr@2
|
118 |
* @param aEnable Indicate whether the effect will be automatically enabled after creation.
|
williamr@2
|
119 |
* @return pointer to CLoudness object
|
williamr@2
|
120 |
*/
|
williamr@2
|
121 |
IMPORT_C static CLoudness* NewL( CMMFDevSound& aDevSound, TBool aEnable = EFalse );
|
williamr@2
|
122 |
|
williamr@2
|
123 |
/**
|
williamr@2
|
124 |
* Factory function for creating the Loudness object.
|
williamr@2
|
125 |
* @since 3.0
|
williamr@2
|
126 |
* @param aUtility A reference to a custom command utility
|
williamr@2
|
127 |
* @param aEnable Indicate whether the effect will be automatically enabled after creation.
|
williamr@2
|
128 |
* @return pointer to CLoudness object
|
williamr@2
|
129 |
*/
|
williamr@2
|
130 |
IMPORT_C static CLoudness* NewL( CCustomCommandUtility* aUtility , TBool aEnable = EFalse );
|
williamr@2
|
131 |
|
williamr@2
|
132 |
/**
|
williamr@2
|
133 |
* Factory function for creating the Loudness object.
|
williamr@2
|
134 |
* @since 3.0
|
williamr@2
|
135 |
* @param aCustomInterface A reference to a custom interface
|
williamr@2
|
136 |
* @param aEnable Indicate whether the effect will be automatically enabled after creation.
|
williamr@2
|
137 |
* @return pointer to CLoudness object
|
williamr@2
|
138 |
*/
|
williamr@2
|
139 |
IMPORT_C static CLoudness* NewL( MCustomInterface& aCustomInterface, TBool aEnable = EFalse );
|
williamr@2
|
140 |
|
williamr@2
|
141 |
/**
|
williamr@2
|
142 |
* Factory function for creating the Loudness object.
|
williamr@2
|
143 |
* @since 3.0
|
williamr@2
|
144 |
* @param aUtility A reference to a CMidiClientUtility
|
williamr@2
|
145 |
* @param aEnable Indicate whether the effect will be automatically enabled after creation.
|
williamr@2
|
146 |
* @return pointer to CLoudness object
|
williamr@2
|
147 |
*/
|
williamr@2
|
148 |
IMPORT_C static CLoudness* NewL( CMidiClientUtility& aUtility , TBool aEnable = EFalse );
|
williamr@2
|
149 |
|
williamr@2
|
150 |
/**
|
williamr@2
|
151 |
* Factory function for creating the Loudness object.
|
williamr@2
|
152 |
* @since 3.0
|
williamr@2
|
153 |
* @param CDrmPlayerUtility A reference to a CDrmPlayerUtility object
|
williamr@2
|
154 |
* @return pointer to CLoudness object
|
williamr@2
|
155 |
*/
|
williamr@2
|
156 |
IMPORT_C static CLoudness* NewL( CDrmPlayerUtility& aUtility , TBool aEnable = EFalse);
|
williamr@2
|
157 |
|
williamr@2
|
158 |
/**
|
williamr@2
|
159 |
* Factory function for creating the Loudness object.
|
williamr@2
|
160 |
* @since 3.2
|
williamr@2
|
161 |
* @param CVideoPlayerUtility A reference to a CVideoPlayerUtility object
|
williamr@2
|
162 |
* @return pointer to CLoudness object
|
williamr@2
|
163 |
*/
|
williamr@2
|
164 |
IMPORT_C static CLoudness* NewL( CVideoPlayerUtility& aUtility , TBool aEnable = EFalse);
|
williamr@2
|
165 |
|
williamr@2
|
166 |
/**
|
williamr@2
|
167 |
*
|
williamr@2
|
168 |
* Destructor
|
williamr@2
|
169 |
*/
|
williamr@2
|
170 |
IMPORT_C virtual ~CLoudness();
|
williamr@2
|
171 |
|
williamr@2
|
172 |
public: // functions from base class
|
williamr@2
|
173 |
|
williamr@2
|
174 |
/*
|
williamr@2
|
175 |
* From CAudioEffect
|
williamr@2
|
176 |
* Get the unique identifier of the audio effect
|
williamr@2
|
177 |
* @since 3.0
|
williamr@2
|
178 |
* @return Unique identifier
|
williamr@2
|
179 |
*/
|
williamr@2
|
180 |
IMPORT_C TUid Uid() const;
|
williamr@2
|
181 |
|
williamr@2
|
182 |
protected: // functions from base class
|
williamr@2
|
183 |
|
williamr@2
|
184 |
/**
|
williamr@2
|
185 |
* From CAudioEffect
|
williamr@2
|
186 |
* Create a package of the effect data
|
williamr@2
|
187 |
* @since 3.0
|
williamr@2
|
188 |
* @return A descriptor containing the effect data.
|
williamr@2
|
189 |
*/
|
williamr@2
|
190 |
IMPORT_C const TDesC8& DoEffectData();
|
williamr@2
|
191 |
|
williamr@2
|
192 |
/**
|
williamr@2
|
193 |
* From CAudioEffect
|
williamr@2
|
194 |
* Internal function to unpack effect data
|
williamr@2
|
195 |
* @since 3.0
|
williamr@2
|
196 |
* @param aEffectDataBuffer Descriptor containing packed effect data
|
williamr@2
|
197 |
* @return -
|
williamr@2
|
198 |
*/
|
williamr@2
|
199 |
IMPORT_C void SetEffectData( const TDesC8& aEffectDataBuffer );
|
williamr@2
|
200 |
|
williamr@2
|
201 |
protected:
|
williamr@2
|
202 |
|
williamr@2
|
203 |
/**
|
williamr@2
|
204 |
* Private C++ constructor for this class.
|
williamr@2
|
205 |
* @since 3.0
|
williamr@2
|
206 |
* @param aEffectObserver reference to event observer object
|
williamr@2
|
207 |
* @return -
|
williamr@2
|
208 |
*/
|
williamr@2
|
209 |
IMPORT_C CLoudness();
|
williamr@2
|
210 |
|
williamr@2
|
211 |
|
williamr@2
|
212 |
protected:
|
williamr@2
|
213 |
|
williamr@2
|
214 |
// Loudness data structure
|
williamr@2
|
215 |
TEfLoudnessData iLoudnessData;
|
williamr@2
|
216 |
// Data package sent to server
|
williamr@2
|
217 |
TEfLoudnessDataPckg iDataPckgTo;
|
williamr@2
|
218 |
// Data package received from server
|
williamr@2
|
219 |
TEfLoudnessDataPckg iDataPckgFrom;
|
williamr@2
|
220 |
|
williamr@2
|
221 |
protected: // Friend classes
|
williamr@2
|
222 |
|
williamr@2
|
223 |
friend class CLoudnessMessageHandler;
|
williamr@2
|
224 |
|
williamr@2
|
225 |
};
|
williamr@2
|
226 |
|
williamr@2
|
227 |
#endif // of CLOUDNESS_H
|
williamr@2
|
228 |
|
williamr@2
|
229 |
// End of File
|