S60 3rd Edition API Reference: audioequalizerbase.h Source File

audioequalizerbase.h

Go to the documentation of this file.
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: 6 %
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 #start_since SINCE_3_1_SDK
00044 class CMidiClientUtility;
00045 #end_since SINCE_3_1_SDK
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 #start_since SINCE_3_1_SDK
00143                 
00151                 IMPORT_C static CAudioEqualizer* NewL( CMidiClientUtility& aUtility );
00152 #end_since SINCE_3_1_SDK
00153 
00154 
00155 
00160                 IMPORT_C virtual ~CAudioEqualizer();
00161 
00168                 IMPORT_C TInt32 BandLevel( TUint8 aBand ) const;
00169 
00176                 IMPORT_C TInt32 BandWidth( TUint8 aBand ) const;
00177 
00184                 IMPORT_C TInt32 CenterFrequency( TUint8 aBand ) const;
00185 
00192                 IMPORT_C TInt32 CrossoverFrequency( TUint8 aBand ) const;
00193 
00200                 IMPORT_C void DbLevelLimits( TInt32& aMin, TInt32& aMax );
00201 
00208                 IMPORT_C TUint8 NumberOfBands() const;
00209 
00217                 IMPORT_C void SetBandLevelL( TInt8 aBand, TInt32 aLevel );
00218 
00219         public: // functions from base class
00220 
00221                 /*
00222                 * From CAudioEffect
00223         * Get the unique identifier of the audio effect
00224         * 
00225         * @return Unique identifier
00226         */
00227                 IMPORT_C TUid Uid() const;
00228 
00229 
00230     protected:  // Functions from base classes
00231 
00238                 IMPORT_C const TDesC8& DoEffectData();
00239 
00247         IMPORT_C void SetEffectData( const TDesC8& aEffectDataBuffer );
00248 
00249         protected:
00250 
00256                 IMPORT_C CAudioEqualizer();
00257 
00265                 IMPORT_C const TDesC8& DoBandDataL( TUint8 aBand, TBool aAllBands );
00266 
00273         IMPORT_C void SetBandDataL( TInt aNumberOfBands, const TDesC8& aBandDataBuffer );
00274 
00275         protected:
00276 
00277                 // Equalizer data structure
00278                 TEfAudioEqualizer iAudioEqualizerData;
00279                 // Equalizer Band data structure
00280                 RArray<TEfAudioEqualizerBand> iBandsData;
00281                 // Data package sent to server
00282                 TEfAudioEqualizerDataPckg iDataPckgTo;
00283                 // Band Data package sent to server
00284                 TEfAudioEqualizerBandDataPckg iBandDataPckgTo;
00285                 // Bitmask used to indicate change in band data
00286                 TUint32 iBandChange;
00287 
00288                 HBufC8* iBandDataBuf;
00289 
00290     protected:    // Friend classes
00291 
00292                 friend class CAudioEqualizerMessageHandler;
00293                 friend class CAudioEqualizerUtility;
00294 
00295         };
00296 
00297 // of CAUDIOEQUALIZER_H
00298 #endif
00299 
00300 // End of File

Copyright © Nokia Corporation 2001-2007
Back to top