os/mm/mm_pub/audio_effects_api/inc/AudioEqualizerData.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/mm/mm_pub/audio_effects_api/inc/AudioEqualizerData.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,117 @@
     1.4 +/*
     1.5 +* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). 
     1.6 +* All rights reserved.
     1.7 +* This component and the accompanying materials are made available
     1.8 +* under the terms of "Eclipse Public License v1.0"
     1.9 +* which accompanies this distribution, and is available
    1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.11 +*
    1.12 +* Initial Contributors:
    1.13 +* Nokia Corporation - initial contribution.
    1.14 +*
    1.15 +* Contributors:
    1.16 +*
    1.17 +* Description:  This file contains definitions of audio effects data structures for
    1.18 +*                equalizer.
    1.19 +*
    1.20 +*/
    1.21 +
    1.22 +
    1.23 +
    1.24 +#ifndef EQUALIZERDATA_H
    1.25 +#define EQUALIZERDATA_H
    1.26 +
    1.27 +//  INCLUDES
    1.28 +#include <e32std.h>
    1.29 +#include <s32mem.h>
    1.30 +#include <AudioEffectData.h>
    1.31 +
    1.32 +// CLASS DECLARATION
    1.33 +
    1.34 +/**
    1.35 +*  This class defines the effect data structure of a particular frequency band.
    1.36 +*
    1.37 +*  @lib EqualizerEffect.lib
    1.38 +*  @since 3.0
    1.39 +*/
    1.40 +class TEfAudioEqualizerBand
    1.41 +    {
    1.42 +    public:
    1.43 +
    1.44 +        /**
    1.45 +        * Constructor.
    1.46 +        */
    1.47 +        TEfAudioEqualizerBand() {}
    1.48 +
    1.49 +        void ExternalizeL( RWriteStream& aStream ) const
    1.50 +        	{
    1.51 +			aStream.WriteUint8L(iBandId);
    1.52 +			aStream.WriteUint32L(iBandLevel);
    1.53 +			aStream.WriteUint32L(iBandWidth);
    1.54 +			aStream.WriteUint32L(iCenterFrequency);
    1.55 +			aStream.WriteUint32L(iCrossoverFrequency);
    1.56 +			}
    1.57 +
    1.58 +        void InternalizeL( RReadStream& aStream )
    1.59 +        	{
    1.60 +			iBandId = aStream.ReadUint8L();
    1.61 +			iBandLevel = aStream.ReadUint32L();
    1.62 +			iBandWidth = aStream.ReadUint32L();
    1.63 +			iCenterFrequency = aStream.ReadUint32L();
    1.64 +			iCrossoverFrequency = aStream.ReadUint32L();
    1.65 +			}
    1.66 +
    1.67 +		TUint8 iBandId;
    1.68 +		TInt32 iBandLevel;
    1.69 +		TInt32 iBandWidth;
    1.70 +		TInt32 iCenterFrequency;
    1.71 +		TInt32 iCrossoverFrequency;
    1.72 +
    1.73 +    };
    1.74 +
    1.75 +/**
    1.76 +*  This class defines the effect data structure to be passed between client and
    1.77 +*  server.
    1.78 +*
    1.79 +*  @lib EqualizerEffect.lib
    1.80 +*  @since 3.0
    1.81 +*/
    1.82 +class TEfAudioEqualizer : public TEfCommon
    1.83 +    {
    1.84 +    public:
    1.85 +
    1.86 +        /**
    1.87 +        * Constructor.
    1.88 +        */
    1.89 +        TEfAudioEqualizer() {}
    1.90 +
    1.91 +        /**
    1.92 +        * Constructor.
    1.93 +        */
    1.94 +        TEfAudioEqualizer( TInt32 aMindB, TInt32 aMaxdB ) :
    1.95 +        	iMindB(aMindB), iMaxdB(aMaxdB) {}
    1.96 +
    1.97 +		TInt32 iMindB;
    1.98 +		TInt32 iMaxdB;
    1.99 +
   1.100 +    };
   1.101 +
   1.102 +
   1.103 +class TEfAudioEqualizerCombined : public TEfAudioEqualizer, public TEfAudioEqualizerBand
   1.104 +    {
   1.105 +    public:
   1.106 +
   1.107 +		// Indicates the data is valid for Equalizer
   1.108 +		TBool iAudioEqualizerDataValid;
   1.109 +		// Indicates the data is valid for Equalizer Band
   1.110 +		TBool iAudioEqualizerBandDataValid;
   1.111 +    };
   1.112 +
   1.113 +
   1.114 +typedef TPckgBuf<TEfAudioEqualizer> TEfAudioEqualizerDataPckg;
   1.115 +typedef TPckgBuf<TEfAudioEqualizerBand> TEfAudioEqualizerBandDataPckg;
   1.116 +typedef TPckgBuf<TEfAudioEqualizerCombined> TEfAudioEqualizerCombinedDataPckg;
   1.117 +
   1.118 +#endif      // EQUALIZERDATA_H
   1.119 +
   1.120 +// End of File