mmlibs/mmfw/src/Plugin/Codec/audio/MMFImaAdPcmToPcm16Codec.h
changeset 0 40261b775718
child 19 8184f75a63d4
equal deleted inserted replaced
-1:000000000000 0:40261b775718
       
     1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 
       
    17 #ifndef MMFIMAADPCMTOPCM16CODEC_H
       
    18 #define MMFIMAADPCMTOPCM16CODEC_H
       
    19 
       
    20 #include "MMFCodecBaseDefinitions.h"
       
    21 #include "MMFAudioCodecBase.h"
       
    22 #include <mmf/server/devsoundstandardcustominterfaces.h>
       
    23 
       
    24 const TUint KMaxImaAdpcmBlockAlign = 2048;
       
    25 
       
    26 //mono so iImaAdpcmTo16Pcm constructed with 1 (mono)
       
    27 class CMMFImaAdPcmPcm16Codec : public CMMFCodec, public MMMFDevSoundCustomInterfaceFileBlockLength
       
    28 	{
       
    29 public:
       
    30 	static CMMFCodec* NewL(TAny* aInitParams);
       
    31 	virtual ~CMMFImaAdPcmPcm16Codec();
       
    32 	TCodecProcessResult ProcessL(const CMMFBuffer& aSrc, CMMFBuffer& aDst);
       
    33 	void ConfigureL(TUid aConfigType, const TDesC8& aConfigData);
       
    34 	// from MMMFDevSoundCustomInterfaceFileBlockLength
       
    35 	void SetFileBlockLength(TUint aBlockAlign);
       
    36 protected:
       
    37 	virtual TInt Extension_(TUint aExtensionId, TAny*& aExtPtr, TAny*);	
       
    38 private:
       
    39 	CMMFImaAdPcmPcm16Codec();
       
    40 	void ConstructL(TAny* aInitParams);
       
    41 	virtual void ResetL();
       
    42 	
       
    43 private:
       
    44 	//owned by the Datapath
       
    45 	const CMMFDataBuffer* iSrc;
       
    46 	CMMFDataBuffer* iDst;
       
    47 
       
    48 	TUint iTempSrcBufferCount;
       
    49 	TUint8* iTempSrcBufferPtr;
       
    50 	TUint8 iTempSrcBuffer[KMaxImaAdpcmBlockAlign];
       
    51 	TMMFImaAdpcmTo16PcmCodecOld iImaAdpcmTo16Pcm ;
       
    52 	TUint iLastFrameNumber;
       
    53 	
       
    54 	// allow configuring sample rate
       
    55 	TUint iChannels;
       
    56 	TUint iSamplesRate;
       
    57 	TUint iSamplesPerBlock;
       
    58 	TUint iBlockAlign;
       
    59 	};
       
    60 
       
    61 
       
    62 #endif