mpxplugins/inc/mpxaudioeffectproperties.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:  Container of properties for audio effect
       
    15 *
       
    16 */
       
    17 
       
    18  
       
    19 
       
    20 #ifndef CMPXAUDIOEFFECTPROPERTIES_H
       
    21 #define CMPXAUDIOEFFECTPROPERTIES_H
       
    22 
       
    23 
       
    24 #include <e32base.h>
       
    25 #include <s32strm.h>
       
    26 
       
    27 
       
    28 /**
       
    29 *  Supports 'standard' a attributes. Streamable object
       
    30 */
       
    31 class CMPXAudioEffectProperties : public CBase
       
    32     {
       
    33 public: 
       
    34     inline virtual ~CMPXAudioEffectProperties();
       
    35 public:
       
    36     inline TInt Balance() const;
       
    37     inline TInt Reverb() const;
       
    38     inline TBool Stereo() const;  
       
    39     inline TBool BassBoost() const;
       
    40     inline TBool Loudness() const;
       
    41 
       
    42 public:
       
    43     inline void SetBalance(TInt aBalance);
       
    44     inline void SetReverb(TInt aReverb);
       
    45     inline void SetStereo(TBool aStereo);  
       
    46     inline void SetBassBoost(TBool aBassBoost);  
       
    47     inline void SetLoudness(TBool aLoudness);  
       
    48     inline void Reset();
       
    49 public:
       
    50     inline void ExternalizeL(RWriteStream& aStream) const;
       
    51     inline void InternalizeL(RReadStream& aStream);
       
    52     inline void SaveToFileL() const;
       
    53     inline void LoadFromFileL();
       
    54 private:
       
    55     enum TDesProperty 
       
    56         { 
       
    57         //EDesPresetName, // Not used yet. EQ
       
    58         EDesNumItems = 0
       
    59         };
       
    60 
       
    61     enum TIntProperty 
       
    62         { 
       
    63         EIntBalance, //(From -100 to 100, 0 = center)
       
    64         EIntReverb, //(from 1 to 8, 0 = default)
       
    65         EIntStereo, //(default off)
       
    66         EIntBassBoost, //(default off)
       
    67         EIntLoudness, //(default off)
       
    68         EIntNumItems 
       
    69         };
       
    70 private:
       
    71     inline const TDesC& Value(TDesProperty aProperty) const;
       
    72     inline TInt Value(TIntProperty aProperty) const;
       
    73     inline void SetValue(TDesProperty aProperty,const TDesC& aValue);
       
    74     inline void SetValue(TIntProperty aProperty,TInt aValue);
       
    75 private:
       
    76     //TFixedArray<HBufC*,EDesNumItems> iDesValues;
       
    77     TFixedArray<TInt,EIntNumItems> iIntValues;
       
    78     };
       
    79 
       
    80 #include "mpxaudioeffectproperties.inl"
       
    81 
       
    82 #endif // CMPXAUDIOEFFECTPROPERTIES_H