00001 /* 00002 * ============================================================================== 00003 * Name : AudioEqualizerBase.h 00004 * Part of : Effects Framework 00005 * Description : This is the definition of the Audio Equalizer effect class. 00006 * Version : %version: 7 % 00007 * 00008 * Copyright © 2006 Nokia Corporation. 00009 * This material, including documentation and any related 00010 * computer programs, is protected by copyright controlled by 00011 * Nokia Corporation. All rights are reserved. Copying, 00012 * including reproducing, storing, adapting or translating, any 00013 * or all of this material requires the prior written consent of 00014 * Nokia Corporation. This material also contains confidential 00015 * information which may not be disclosed to others without the 00016 * prior written consent of Nokia Corporation. 00017 * ============================================================================== 00018 */ 00019 00020 #ifndef CAUDIOEQUALIZER_H 00021 #define CAUDIOEQUALIZER_H 00022 00023 // INCLUDES 00024 00025 #include <e32base.h> 00026 #include <AudioEffectBase.h> 00027 #include <AudioEqualizerData.h> 00028 #include <MCustomInterface.h> 00029 00030 00031 const TUid KUidAudioEqualizerEffect = {0x1020382A}; 00032 00033 // FORWARD DELCARATION 00034 class CMdaAudioConvertUtility; 00035 class CMdaAudioPlayerUtility; 00036 class CMdaAudioRecorderUtility; 00037 class CMdaAudioInputStream; 00038 class CMdaAudioOutputStream; 00039 class CMdaAudioToneUtility; 00040 class CCustomCommandUtility; 00041 class CCustomInterfaceUtility; 00042 class CMMFDevSound; 00043 class CMidiClientUtility; 00044 class CDrmPlayerUtility; 00045 class CVideoPlayerUtility; 00046 00047 // CLASS DECLARATION 00048 00056 class CAudioEqualizer : public CAudioEffect 00057 { 00058 00059 public: //New Functions 00060 00066 IMPORT_C static CAudioEqualizer* NewL(); 00067 00074 IMPORT_C static CAudioEqualizer* NewL( CMdaAudioConvertUtility& aUtility ); 00075 00082 IMPORT_C static CAudioEqualizer* NewL( CMdaAudioInputStream& aUtility ); 00083 00090 IMPORT_C static CAudioEqualizer* NewL( CMdaAudioOutputStream& aUtility ); 00091 00098 IMPORT_C static CAudioEqualizer* NewL( CMdaAudioPlayerUtility& aUtility ); 00099 00108 IMPORT_C static CAudioEqualizer* NewL( CMdaAudioRecorderUtility& aUtility, TBool aRecordStream ); 00109 00116 IMPORT_C static CAudioEqualizer* NewL( CMdaAudioToneUtility& aUtility ); 00117 00124 IMPORT_C static CAudioEqualizer* NewL( CMMFDevSound& aDevSound ); 00125 00132 IMPORT_C static CAudioEqualizer* NewL( CCustomCommandUtility* aUtility ); 00133 00140 IMPORT_C static CAudioEqualizer* NewL( MCustomInterface& aCustomInterface ); 00141 00142 00149 IMPORT_C static CAudioEqualizer* NewL( CMidiClientUtility& aUtility ); 00150 00157 IMPORT_C static CAudioEqualizer* NewL( CDrmPlayerUtility& aUtility ); 00158 00165 IMPORT_C static CAudioEqualizer* NewL( CVideoPlayerUtility& aUtility ); 00166 00171 IMPORT_C virtual ~CAudioEqualizer(); 00172 00179 IMPORT_C TInt32 BandLevel( TUint8 aBand ) const; 00180 00187 IMPORT_C TInt32 BandWidth( TUint8 aBand ) const; 00188 00195 IMPORT_C TInt32 CenterFrequency( TUint8 aBand ) const; 00196 00203 IMPORT_C TInt32 CrossoverFrequency( TUint8 aBand ) const; 00204 00211 IMPORT_C void DbLevelLimits( TInt32& aMin, TInt32& aMax ); 00212 00219 IMPORT_C TUint8 NumberOfBands() const; 00220 00228 IMPORT_C void SetBandLevelL( TInt8 aBand, TInt32 aLevel ); 00229 00230 public: // functions from base class 00231 00232 /* 00233 * From CAudioEffect 00234 * Get the unique identifier of the audio effect 00235 * 00236 * @return Unique identifier 00237 */ 00238 IMPORT_C TUid Uid() const; 00239 00240 00241 protected: // Functions from base classes 00242 00249 IMPORT_C const TDesC8& DoEffectData(); 00250 00258 IMPORT_C void SetEffectData( const TDesC8& aEffectDataBuffer ); 00259 00260 protected: 00261 00267 IMPORT_C CAudioEqualizer(); 00268 00276 IMPORT_C const TDesC8& DoBandDataL( TUint8 aBand, TBool aAllBands ); 00277 00284 IMPORT_C void SetBandDataL( TInt aNumberOfBands, const TDesC8& aBandDataBuffer ); 00285 00286 protected: 00287 00288 // Equalizer data structure 00289 TEfAudioEqualizer iAudioEqualizerData; 00290 // Equalizer Band data structure 00291 RArray<TEfAudioEqualizerBand> iBandsData; 00292 // Data package sent to server 00293 TEfAudioEqualizerDataPckg iDataPckgTo; 00294 // Band Data package sent to server 00295 TEfAudioEqualizerBandDataPckg iBandDataPckgTo; 00296 // Bitmask used to indicate change in band data 00297 TUint32 iBandChange; 00298 00299 HBufC8* iBandDataBuf; 00300 00301 protected: // Friend classes 00302 00303 friend class CAudioEqualizerMessageHandler; 00304 friend class CAudioEqualizerUtility; 00305 00306 }; 00307 00308 // of CAUDIOEQUALIZER_H 00309 #endif 00310 00311 // End of File