1.1 --- a/epoc32/include/environmentalreverbbase.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/environmentalreverbbase.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,439 @@
1.4 -environmentalreverbbase.h
1.5 +/*
1.6 +* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
1.7 +* All rights reserved.
1.8 +* This component and the accompanying materials are made available
1.9 +* 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
1.10 +* which accompanies this distribution, and is available
1.11 +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.12 +*
1.13 +* Initial Contributors:
1.14 +* Nokia Corporation - initial contribution.
1.15 +*
1.16 +* Contributors:
1.17 +*
1.18 +* Description: This is the definition of the Environmental Reverb effect class.
1.19 +*
1.20 +*/
1.21 +
1.22 +
1.23 +#ifndef CENVIRONMENTALREVERB_H
1.24 +#define CENVIRONMENTALREVERB_H
1.25 +
1.26 +// INCLUDES
1.27 +
1.28 +#include <e32base.h>
1.29 +#include <AudioEffectBase.h>
1.30 +#include <EnvironmentalReverbData.h>
1.31 +#include <MCustomInterface.h>
1.32 +
1.33 +const TUid KUidEnvironmentalReverbEffect = {0x10203837};
1.34 +
1.35 +// FORWARD DELCARATION
1.36 +class CMdaAudioConvertUtility;
1.37 +class CMdaAudioPlayerUtility;
1.38 +class CMdaAudioRecorderUtility;
1.39 +class CMdaAudioInputStream;
1.40 +class CMdaAudioOutputStream;
1.41 +class CMdaAudioToneUtility;
1.42 +class CCustomCommandUtility;
1.43 +class CCustomInterfaceUtility;
1.44 +class CMMFDevSound;
1.45 +class CMidiClientUtility;
1.46 +class CDrmPlayerUtility;
1.47 +class CVideoPlayerUtility;
1.48 +
1.49 +// CLASS DECLARATION
1.50 +
1.51 +/**
1.52 +* This is the Environmental Reverb effect class for managing reverb settings.
1.53 +*
1.54 +* @lib EnvironmentalReverbEffect.lib
1.55 +* @since 3.0
1.56 +*/
1.57 +
1.58 +class CEnvironmentalReverb : public CAudioEffect
1.59 + {
1.60 +
1.61 + public: //New Functions
1.62 +
1.63 + /**
1.64 + * Factory function for creating the audio reverb object.
1.65 + * @since 3.0
1.66 + * @return pointer to CEnvironmentalReverb object
1.67 + */
1.68 + IMPORT_C static CEnvironmentalReverb* NewL();
1.69 +
1.70 + /**
1.71 + * Factory function for creating the audio reverb object.
1.72 + * @since 3.0
1.73 + * @param aUtility A reference to a convert utility
1.74 + * @return pointer to CEnvironmentalReverb object
1.75 + */
1.76 + IMPORT_C static CEnvironmentalReverb* NewL( CMdaAudioConvertUtility& aUtility );
1.77 +
1.78 + /**
1.79 + * Factory function for creating the audio reverb object.
1.80 + * @since 3.0
1.81 + * @param aUtility A reference to an audio input stream utility
1.82 + * @return pointer to CEnvironmentalReverb object
1.83 + */
1.84 + IMPORT_C static CEnvironmentalReverb* NewL( CMdaAudioInputStream& aUtility );
1.85 +
1.86 + /**
1.87 + * Factory function for creating the audio reverb object.
1.88 + * @since 3.0
1.89 + * @param aUtility A reference to an audio output stream utility
1.90 + * @return pointer to CEnvironmentalReverb object
1.91 + */
1.92 + IMPORT_C static CEnvironmentalReverb* NewL( CMdaAudioOutputStream& aUtility );
1.93 +
1.94 + /**
1.95 + * Factory function for creating the audio reverb object.
1.96 + * @since 3.0
1.97 + * @param aUtility A reference to an audio player utility
1.98 + * @return pointer to CEnvironmentalReverb object
1.99 + */
1.100 + IMPORT_C static CEnvironmentalReverb* NewL( CMdaAudioPlayerUtility& aUtility );
1.101 +
1.102 + /**
1.103 + * Factory function for creating the audio reverb object.
1.104 + * @since 3.0
1.105 + * @param aUtility A reference to an audio record utility
1.106 + * @param aRecordStream ETrue if the effect is to be applied to the recording,
1.107 + * EFalse if the effect is to be applied only to the playback
1.108 + * @return pointer to CEnvironmentalReverb object
1.109 + */
1.110 + IMPORT_C static CEnvironmentalReverb* NewL( CMdaAudioRecorderUtility& aUtility, TBool aRecordStream );
1.111 +
1.112 + /**
1.113 + * Factory function for creating the audio reverb object.
1.114 + * @since 3.0
1.115 + * @param aUtility A reference to an audio tone utility
1.116 + * @return pointer to CEnvironmentalReverb object
1.117 + */
1.118 + IMPORT_C static CEnvironmentalReverb* NewL( CMdaAudioToneUtility& aUtility );
1.119 +
1.120 + /**
1.121 + * Factory function for creating the audio reverb object.
1.122 + * @since 3.0
1.123 + * @param aDevSound A reference to a DevSound instance
1.124 + * @return pointer to CEnvironmentalReverb object
1.125 + */
1.126 + IMPORT_C static CEnvironmentalReverb* NewL( CMMFDevSound& aDevSound );
1.127 +
1.128 + /**
1.129 + * Factory function for creating the audio reverb object.
1.130 + * @since 3.0
1.131 + * @param aUtility A reference to a custom command utility
1.132 + * @return pointer to CEnvironmentalReverb object
1.133 + */
1.134 + IMPORT_C static CEnvironmentalReverb* NewL( CCustomCommandUtility* aUtility );
1.135 +
1.136 + /**
1.137 + * Factory function for creating the audio reverb object.
1.138 + * @since 3.0
1.139 + * @param aCustomInterface A reference to a custom interface
1.140 + * @return pointer to CEnvironmentalReverb object
1.141 + */
1.142 + IMPORT_C static CEnvironmentalReverb* NewL( MCustomInterface& aCustomInterface );
1.143 +
1.144 + /**
1.145 + * Factory function for creating the audio reverb object.
1.146 + * @since 3.0
1.147 + * @param aUtility A reference to a CMidiClientUtility object
1.148 + * @return pointer to CEnvironmentalReverb object
1.149 + */
1.150 + IMPORT_C static CEnvironmentalReverb* NewL( CMidiClientUtility& aUtility );
1.151 +
1.152 + /**
1.153 + * Factory function for creating the audio equalizer object.
1.154 + * @since 3.0
1.155 + * @param CDrmPlayerUtility A reference to a CDrmPlayerUtility object
1.156 + * @return pointer to CAudioEqualizer object
1.157 + */
1.158 + IMPORT_C static CEnvironmentalReverb* NewL( CDrmPlayerUtility& aUtility );
1.159 +
1.160 + /**
1.161 + * Factory function for creating the audio equalizer object.
1.162 + * @since 3.2
1.163 + * @param CVideoPlayerUtility A reference to a CVideoPlayerUtility object
1.164 + * @return pointer to CAudioEqualizer object
1.165 + */
1.166 + IMPORT_C static CEnvironmentalReverb* NewL( CVideoPlayerUtility& aUtility );
1.167 +
1.168 + /**
1.169 + *
1.170 + * Destructor
1.171 + */
1.172 + IMPORT_C virtual ~CEnvironmentalReverb();
1.173 +
1.174 + /**
1.175 + * Gets the decay HF Ratio in hundredths
1.176 + * @since 3.0
1.177 + * @return decay HF Ratio
1.178 + */
1.179 + IMPORT_C TUint32 DecayHFRatio() const;
1.180 +
1.181 + /**
1.182 + * Gets the reverb decay HF Ratio minimum and maximum in hundredths.
1.183 + * @since 3.0
1.184 + * @param aMin Minimum decay HF Ratio
1.185 + * @param aMax Maximum decay HF Ratio
1.186 + */
1.187 + IMPORT_C void DecayHFRatioRange(TUint32& aMin, TUint32& aMax);
1.188 +
1.189 + /**
1.190 + * Gets the decay time in milliseconds
1.191 + * @since 3.0
1.192 + * @return decay time
1.193 + */
1.194 + IMPORT_C TUint32 DecayTime() const;
1.195 +
1.196 + /**
1.197 + * Gets the allowable reverb decay time range in milliseconds.
1.198 + * @since 3.0
1.199 + * @param aMin Minimum decay time in milliseconds
1.200 + * @param aMax Maximum decay time in milliseconds
1.201 + */
1.202 + IMPORT_C void DecayTimeRange(TUint32& aMin, TUint32& aMax);
1.203 +
1.204 + /**
1.205 + * Gets the density current value as a percentage in hundredths
1.206 + * @since 3.0
1.207 + * @return density value
1.208 + */
1.209 + IMPORT_C TUint32 Density() const;
1.210 +
1.211 + /**
1.212 + * Gets the diffusion current value as a percentage in hundredths.
1.213 + * @since 3.0
1.214 + * @return diffusion value
1.215 + */
1.216 + IMPORT_C TUint32 Diffusion() const;
1.217 +
1.218 + /**
1.219 + * Gets the reverb reflections delay in ms.
1.220 + * @since 3.0
1.221 + * @return reverb reflections delay
1.222 + */
1.223 + IMPORT_C TUint32 ReflectionsDelay() const;
1.224 +
1.225 + /**
1.226 + * Gets the reverb reflections delay maximum in milliseconds.
1.227 + * @since 3.0
1.228 + * @return reverb reflections delay maximum
1.229 + */
1.230 + IMPORT_C TUint32 ReflectionsDelayMax() const;
1.231 +
1.232 + /**
1.233 + * Gets the reverb reflections level in mB
1.234 + * @since 3.0
1.235 + * @return Reverb reflections level
1.236 + */
1.237 + IMPORT_C TInt32 ReflectionsLevel() const;
1.238 +
1.239 + /**
1.240 + * Gets the reverb reflections level maximum and minimum in mB
1.241 + * @since 3.0
1.242 + * @param aMin Minimum reflections level
1.243 + * @param aMax Maximum reflections level
1.244 + */
1.245 + IMPORT_C void ReflectionLevelRange( TInt32& aMin, TInt32& aMax );
1.246 +
1.247 + /**
1.248 + * Gets the reverb delay in milliseconds
1.249 + * @since 3.0
1.250 + * @return reverb delay
1.251 + */
1.252 + IMPORT_C TUint32 ReverbDelay() const;
1.253 +
1.254 + /**
1.255 + * Gets the reverb delay maximum in milliseconds
1.256 + * @since 3.0
1.257 + * @return reverb delay maximum
1.258 + */
1.259 + IMPORT_C TUint32 ReverbDelayMax() const;
1.260 +
1.261 + /**
1.262 + * Gets the reverb current level in mB
1.263 + * @since 3.0
1.264 + * @return reverb current level
1.265 + */
1.266 + IMPORT_C TInt32 ReverbLevel() const;
1.267 +
1.268 + /**
1.269 + * Gets the reverb current level maximum and minimum in mB
1.270 + * @since 3.0
1.271 + * @param aMin Minimum current level
1.272 + * @param aMax Maximum current level
1.273 + * @return -
1.274 + */
1.275 + IMPORT_C void ReverbLevelRange( TInt32& aMin, TInt32& aMax );
1.276 +
1.277 + /**
1.278 + * Gets the room HF level current ratio
1.279 + * @since 3.0
1.280 + * @return room HF level ratio
1.281 + */
1.282 + IMPORT_C TInt32 RoomHFLevel() const;
1.283 +
1.284 + /**
1.285 + * Gets the room HF level maximum and minimum ratios
1.286 + * @since 3.0
1.287 + * @param aMin Minimum current room HF level
1.288 + * @param aMax Maximum current room HF level
1.289 + * @return -
1.290 + */
1.291 + IMPORT_C void RoomHFLevelRange( TInt32& aMin, TInt32& aMax );
1.292 +
1.293 + /**
1.294 + * Gets the room level current value in mB
1.295 + * @since 3.0
1.296 + * @return room level value
1.297 + */
1.298 + IMPORT_C TInt32 RoomLevel() const;
1.299 +
1.300 + /**
1.301 + * Gets the room level maximum and minimum in mB
1.302 + * @since 3.0
1.303 + * @param aMin Minimum current room level
1.304 + * @param aMax Maximum current room level
1.305 + * @return -
1.306 + */
1.307 + IMPORT_C void RoomLevelRange( TInt32& aMin, TInt32& aMax );
1.308 +
1.309 + /**
1.310 + * Sets the decay HF Ratio in hundredths
1.311 + * @since 3.0
1.312 + * @param aDecayHFRatio The decay high frequence ratio in hundredths
1.313 + * @return -
1.314 + */
1.315 + IMPORT_C void SetDecayHFRatioL( TUint32 aDecayHFRatio );
1.316 +
1.317 + /**
1.318 + * Sets the decay time in millisecond
1.319 + * @since 3.0
1.320 + * @param aDecayTime Decay time in ms
1.321 + */
1.322 + IMPORT_C void SetDecayTimeL( TUint32 aDecayTime );
1.323 +
1.324 + /**
1.325 + * Sets the density value as percentage in hundredths
1.326 + * @since 3.0
1.327 + * @param aDensity The density.
1.328 + */
1.329 + IMPORT_C void SetDensityL( TUint32 aDensity );
1.330 +
1.331 + /**
1.332 + * Sets the diffusion value as a percentage in hundredths
1.333 + * @since 3.0
1.334 + * @param aDiffusion The diffusion.
1.335 + */
1.336 + IMPORT_C void SetDiffusionL( TUint32 aDiffusion );
1.337 +
1.338 + /**
1.339 + * Sets the reverb reflections delay
1.340 + * @since 3.0
1.341 + * @param aRefectionsDelay The reflection delay in ms.
1.342 + */
1.343 + IMPORT_C void SetReflectionsDelayL( TUint32 aReflectionsDelay );
1.344 +
1.345 + /**
1.346 + * Sets the reverb reflections level in milli-dB
1.347 + * @since 3.0
1.348 + * @param aRefectionsLevel The reflection level in mB
1.349 + */
1.350 + IMPORT_C void SetReflectionsLevelL( TInt32 aReflectionsLevel );
1.351 +
1.352 + /**
1.353 + * Sets the reverb delay
1.354 + * @since 3.0
1.355 + * @param aReverbDelay The reverb delay in ms
1.356 + */
1.357 + IMPORT_C void SetReverbDelayL( TUint32 aReverbDelay );
1.358 +
1.359 + /**
1.360 + * Sets the reverb level
1.361 + * @since 3.0
1.362 + * @param aReverbLevel The reverb level in mB
1.363 + */
1.364 + IMPORT_C void SetReverbLevelL( TInt32 aReverbLevel );
1.365 +
1.366 + /**
1.367 + * Sets the room HF level ratio
1.368 + * @since 3.0
1.369 + * @param aRoomHFLevel The room high frequency ratio
1.370 + */
1.371 + IMPORT_C void SetRoomHFLevelL( TInt32 aRoomHFLevel );
1.372 +
1.373 + /**
1.374 + * Sets the room level value in milli-dB
1.375 + * @since 3.0
1.376 + * @param aRoomLevel The room level
1.377 + */
1.378 + IMPORT_C void SetRoomLevelL( TInt32 aRoomLevel );
1.379 +
1.380 + /**
1.381 + * Gets the total delay maximum in milliseconds
1.382 + * @since 3.0
1.383 + * @return reverb delay maximum
1.384 + */
1.385 + IMPORT_C TUint32 DelayMax() const;
1.386 +
1.387 + public: // functions from base class
1.388 +
1.389 + /*
1.390 + * From CAudioEffect
1.391 + * Get the unique identifier of the audio effect
1.392 + * @since 3.0
1.393 + * @return Unique identifier
1.394 + */
1.395 + IMPORT_C TUid Uid() const;
1.396 +
1.397 + protected: // Functions from base classes
1.398 +
1.399 + /**
1.400 + * From CAudioEffect
1.401 + * Create a package of the effect data
1.402 + * @since 3.0
1.403 + * @return A descriptor containing the effect data.
1.404 + */
1.405 + IMPORT_C const TDesC8& DoEffectData();
1.406 +
1.407 + /**
1.408 + * From CAudioEffect
1.409 + * Internal function to unpack effect data
1.410 + * @since 3.0
1.411 + * @param aEffectDataBuffer Descriptor containing packed effect data
1.412 + * @return -
1.413 + */
1.414 + IMPORT_C void SetEffectData( const TDesC8& aEffectDataBuffer );
1.415 +
1.416 + protected:
1.417 +
1.418 + /**
1.419 + * Private C++ constructor for this class.
1.420 + * @since 3.0
1.421 + * @return -
1.422 + */
1.423 + IMPORT_C CEnvironmentalReverb();
1.424 +
1.425 + protected:
1.426 +
1.427 + // Reverb data structure
1.428 + TEfEnvironmentalReverb iReverbData;
1.429 + // Data package sent to server
1.430 + TEfEnvReverbDataPckg iDataPckgTo;
1.431 + // Data package received from server
1.432 + TEfEnvReverbDataPckg iDataPckgFrom;
1.433 +
1.434 + protected: // Friend classes
1.435 +
1.436 + friend class CEnvironmentalReverbMessageHandler;
1.437 + friend class CEnvironmentalReverbUtility;
1.438 +
1.439 + };
1.440 +
1.441 +#endif // of CENVIRONMENTALREVERB_H
1.442 +
1.443 +// End of File