epoc32/include/audioequalizerdata.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
child 4 837f303aceeb
equal deleted inserted replaced
1:666f914201fb 2:2fe1408b6811
     1 audioequalizerdata.h
     1 /*
       
     2 * Copyright (c) 2004 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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  This file contains definitions of audio effects data structures for
       
    15 *                equalizer.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 #ifndef EQUALIZERDATA_H
       
    22 #define EQUALIZERDATA_H
       
    23 
       
    24 //  INCLUDES
       
    25 #include <e32std.h>
       
    26 #include <s32mem.h>
       
    27 #include <AudioEffectData.h>
       
    28 
       
    29 // CLASS DECLARATION
       
    30 
       
    31 /**
       
    32 *  This class defines the effect data structure of a particular frequency band.
       
    33 *
       
    34 *  @lib EqualizerEffect.lib
       
    35 *  @since 3.0
       
    36 */
       
    37 class TEfAudioEqualizerBand
       
    38     {
       
    39     public:
       
    40 
       
    41         /**
       
    42         * Constructor.
       
    43         */
       
    44         TEfAudioEqualizerBand() {}
       
    45 
       
    46         void ExternalizeL( RWriteStream& aStream ) const
       
    47         	{
       
    48 			aStream.WriteUint8L(iBandId);
       
    49 			aStream.WriteUint32L(iBandLevel);
       
    50 			aStream.WriteUint32L(iBandWidth);
       
    51 			aStream.WriteUint32L(iCenterFrequency);
       
    52 			aStream.WriteUint32L(iCrossoverFrequency);
       
    53 			}
       
    54 
       
    55         void InternalizeL( RReadStream& aStream )
       
    56         	{
       
    57 			iBandId = aStream.ReadUint8L();
       
    58 			iBandLevel = aStream.ReadUint32L();
       
    59 			iBandWidth = aStream.ReadUint32L();
       
    60 			iCenterFrequency = aStream.ReadUint32L();
       
    61 			iCrossoverFrequency = aStream.ReadUint32L();
       
    62 			}
       
    63 
       
    64 		TUint8 iBandId;
       
    65 		TInt32 iBandLevel;
       
    66 		TInt32 iBandWidth;
       
    67 		TInt32 iCenterFrequency;
       
    68 		TInt32 iCrossoverFrequency;
       
    69 
       
    70     };
       
    71 
       
    72 /**
       
    73 *  This class defines the effect data structure to be passed between client and
       
    74 *  server.
       
    75 *
       
    76 *  @lib EqualizerEffect.lib
       
    77 *  @since 3.0
       
    78 */
       
    79 class TEfAudioEqualizer : public TEfCommon
       
    80     {
       
    81     public:
       
    82 
       
    83         /**
       
    84         * Constructor.
       
    85         */
       
    86         TEfAudioEqualizer() {}
       
    87 
       
    88         /**
       
    89         * Constructor.
       
    90         */
       
    91         TEfAudioEqualizer( TInt32 aMindB, TInt32 aMaxdB ) :
       
    92         	iMindB(aMindB), iMaxdB(aMaxdB) {}
       
    93 
       
    94 		TInt32 iMindB;
       
    95 		TInt32 iMaxdB;
       
    96 
       
    97     };
       
    98 
       
    99 
       
   100 class TEfAudioEqualizerCombined : public TEfAudioEqualizer, public TEfAudioEqualizerBand
       
   101     {
       
   102     public:
       
   103 
       
   104 		// Indicates the data is valid for Equalizer
       
   105 		TBool iAudioEqualizerDataValid;
       
   106 		// Indicates the data is valid for Equalizer Band
       
   107 		TBool iAudioEqualizerBandDataValid;
       
   108     };
       
   109 
       
   110 
       
   111 typedef TPckgBuf<TEfAudioEqualizer> TEfAudioEqualizerDataPckg;
       
   112 typedef TPckgBuf<TEfAudioEqualizerBand> TEfAudioEqualizerBandDataPckg;
       
   113 typedef TPckgBuf<TEfAudioEqualizerCombined> TEfAudioEqualizerCombinedDataPckg;
       
   114 
       
   115 #endif      // EQUALIZERDATA_H
       
   116 
       
   117 // End of File