00001 /* 00002 * ============================================================================== 00003 * Name : DistanceAttenuationBase.h 00004 * Part of : Effects Framework 00005 * Description : This is the definition of the Distance Attenuation effect class. 00006 * Version : %version: 4 % 00007 * 00008 * Copyright © 2006 Nokia. All rights reserved. 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 CDISTANCEATTENUATION_H 00021 #define CDISTANCEATTENUATION_H 00022 00023 // INCLUDES 00024 00025 #include <e32base.h> 00026 #include <AudioEffectBase.h> 00027 #include <DistanceAttenuationData.h> 00028 #include <MCustomInterface.h> 00029 00030 00031 const TUid KUidDistanceAttenuationEffect = {0x1020382C}; 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 CDistanceAttenuation : public CAudioEffect 00057 { 00058 00059 public: //New Functions 00060 00067 IMPORT_C static CDistanceAttenuation* NewL( CMdaAudioConvertUtility& aUtility ); 00068 00075 IMPORT_C static CDistanceAttenuation* NewL( CMdaAudioInputStream& aUtility ); 00076 00083 IMPORT_C static CDistanceAttenuation* NewL( CMdaAudioOutputStream& aUtility ); 00084 00091 IMPORT_C static CDistanceAttenuation* NewL( CMdaAudioPlayerUtility& aUtility ); 00092 00101 IMPORT_C static CDistanceAttenuation* NewL( CMdaAudioRecorderUtility& aUtility, TBool aRecordStream ); 00102 00109 IMPORT_C static CDistanceAttenuation* NewL( CMMFDevSound& aDevSound ); 00110 00117 IMPORT_C static CDistanceAttenuation* NewL( CMdaAudioToneUtility& aUtility ); 00118 00125 IMPORT_C static CDistanceAttenuation* NewL( CCustomCommandUtility* aUtility ); 00126 00133 IMPORT_C static CDistanceAttenuation* NewL( MCustomInterface& aCustomInterface ); 00134 00141 IMPORT_C static CDistanceAttenuation* NewL( CMidiClientUtility& aUtility ); 00142 00143 00150 IMPORT_C static CDistanceAttenuation* NewL( CDrmPlayerUtility& aUtility ); 00151 00158 IMPORT_C static CDistanceAttenuation* NewL( CVideoPlayerUtility& aUtility ); 00159 00164 IMPORT_C virtual ~CDistanceAttenuation(); 00165 00176 IMPORT_C void DistanceAttenuation( TInt32& aRMin, TInt32& aRMax, TBool& aMuteAfterMax, 00177 TUint32& aRollOffFactor, TUint32& aRoomRollOffFactor ); 00178 00185 IMPORT_C void RollOffFactorMax( TUint32& aRollOfFactorMax ); 00186 00193 IMPORT_C void RoomRollOffFactorMax( TUint32& aRoomRollOfFactorMax ); 00194 00205 IMPORT_C void SetDistanceAttenuationL( TInt32 aRMin, TInt32 aRMax, TBool aMuteAfterMax, 00206 TUint32 aRollOffFactor, TUint32 aRoomRollOffFactor ); 00207 00208 public: // functions from base class 00209 00210 /* 00211 * From CAudioEffect 00212 * Get the unique identifier of the audio effect 00213 * 00214 * @return Unique identifier 00215 */ 00216 IMPORT_C TUid Uid() const; 00217 00218 protected: // Functions from base classes 00219 00226 IMPORT_C const TDesC8& DoEffectData(); 00227 00235 IMPORT_C void SetEffectData( const TDesC8& aEffectDataBuffer ); 00236 00237 protected: 00238 00245 IMPORT_C CDistanceAttenuation(); 00246 00247 protected: 00248 00249 // Distance Attenuation data structure 00250 TEfDistanceAttenuation iDistanceAttenuationData; 00251 // Data package sent to server 00252 TEfDistanceAttenuationDataPckg iDataPckgTo; 00253 // Data package received from server 00254 TEfDistanceAttenuationDataPckg iDataPckgFrom; 00255 00256 protected: // Friend classes 00257 00258 friend class CDistanceAttenuationMessageHandler; 00259 00260 }; 00261 00262 // of CDISTANCEATTENUATION_H 00263 #endif 00264 00265 // End of File