mpxplugins/inc/mpxaudioeffectengine.h
changeset 0 ff3acec5bc43
equal deleted inserted replaced
-1:000000000000 0:ff3acec5bc43
       
     1 /*
       
     2 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Audio effect engine
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef _MPXAUDIOEFFECTENGINE_H_
       
    20 #define _MPXAUDIOEFFECTENGINE_H_
       
    21 #define _LOUDNESS
       
    22 //#undef _LOUDNESS
       
    23 //#define _BASSBOOST
       
    24 #undef _BASSBOOST
       
    25 #define _REVERB
       
    26 //#undef _REVERB
       
    27 #define _STEREO
       
    28 
       
    29 
       
    30 // INCLUDES
       
    31 const TInt KAudioEffectsID = 0x101FFC02;
       
    32 const TInt KEqualizerID = 0x101FFC76;
       
    33 
       
    34 // System Includes
       
    35 #include <e32base.h>
       
    36 #include <mdaaudiosampleplayer.h>
       
    37 
       
    38 #include <mpxplaybackobserver.h>
       
    39 #include "mpxaudioeffectproperties.h"
       
    40 
       
    41 // FORWARD DECLARATIONS
       
    42 class CMdaAudioPlayerUtility;
       
    43 class CEnvironmentalReverbUtility;
       
    44 class CStereoWidening;
       
    45 class CBassBoost;
       
    46 class CLoudness;
       
    47 class CAudioEqualizerUtility;
       
    48 
       
    49 class MMPXPlaybackUtility;
       
    50 class TMPXPlaybackMessage;
       
    51 
       
    52 /**
       
    53 *  Audio effect engine Class
       
    54 *
       
    55 *  @lib mpxaudioeffectengine.dll
       
    56 *  @since Series 60 3.0
       
    57 */
       
    58 class CMPXAudioEffectEngine : public CBase
       
    59 {
       
    60 public: 
       
    61 
       
    62     /**
       
    63     * Two-phased constructor
       
    64     *
       
    65     * @param aPlayer audio player utility
       
    66     * @return object of constructed
       
    67     */
       
    68 	IMPORT_C static CMPXAudioEffectEngine* NewL(
       
    69 	                                    CMdaAudioPlayerUtility* aPlayer);
       
    70 	
       
    71     /**
       
    72     * Destructor
       
    73     */
       
    74 	IMPORT_C ~CMPXAudioEffectEngine();
       
    75 	
       
    76     /**
       
    77     * Set balance
       
    78     */
       
    79  	IMPORT_C void SetBalanceL();
       
    80 
       
    81     /**
       
    82     * Set bass boost
       
    83     */
       
    84 	IMPORT_C void SetBassBoostL();
       
    85 
       
    86     /**
       
    87     * Set stero widening
       
    88     */
       
    89 	IMPORT_C void SetStereoWideningL();
       
    90 
       
    91     /**
       
    92     * Set reverberation
       
    93     */
       
    94  	IMPORT_C void SetReverberationL();
       
    95 
       
    96     /**
       
    97     * Set loundness
       
    98     */
       
    99     IMPORT_C void SetLoudnessL();
       
   100 
       
   101     /**
       
   102     * Sets the equalizer preset
       
   103     * This function will check MPX cenrep for preset id
       
   104     */
       
   105     IMPORT_C void SetEqualizerL();
       
   106     
       
   107     /**
       
   108      * Creates the audio effects
       
   109      */
       
   110     IMPORT_C void CreateAudioEffectsL();
       
   111 
       
   112     /**
       
   113     * Destroy audio effect objects
       
   114     */
       
   115     IMPORT_C void DestroyAudioEffect();
       
   116    
       
   117 private:
       
   118     /**
       
   119     * C++ constructor
       
   120     *
       
   121     * @param aPlayer audio player utility
       
   122     */
       
   123 	CMPXAudioEffectEngine(CMdaAudioPlayerUtility* aPlayer);
       
   124 
       
   125     /**
       
   126     * Second phase constructor
       
   127     */
       
   128     void ConstructL();
       
   129  
       
   130     /**
       
   131      *  Handle playback state changed.
       
   132      *
       
   133      *  @param aState New Playback state
       
   134      */
       
   135     void DoHandleStateChangedL(
       
   136         TMPXPlaybackState aState );
       
   137 
       
   138 private: //Data
       
   139 	
       
   140     CMPXAudioEffectProperties* iProp;
       
   141     
       
   142 private:
       
   143 	CMdaAudioPlayerUtility* iMdaPlayer;  // Not owned
       
   144 	
       
   145 	CEnvironmentalReverbUtility* iReverbEffect;
       
   146 	CStereoWidening* iStereoEffect;
       
   147 	CBassBoost* iBassBoostEffect;
       
   148 	CLoudness*  iLoudnessEffect;
       
   149 	CAudioEqualizerUtility* iEqualizerEffect;
       
   150 	};
       
   151 
       
   152 #endif // _MPXAUDIOEFFECTENGINE_H_
       
   153 
       
   154 // End of File