devsound/devsoundrefplugin/src/plugin/audio/mmfpcmS16topcmU16Codec.h
changeset 0 79dd3e2336a0
equal deleted inserted replaced
-1:000000000000 0:79dd3e2336a0
       
     1 // Copyright (c) 2002-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 #ifndef __MMF_PCMS16_TO_PCMU16_HW_DEVICE_H__
       
    17 #define __MMF_PCMS16_TO_PCMU16_HW_DEVICE_H__
       
    18 
       
    19 #include <mmf/server/mmfswcodecwrapper.h>
       
    20 #include "MMFAudioCodec.h"
       
    21 #include <mmfcodec/mmfaudiopcm16topcmu16codec.h>
       
    22 
       
    23 const TInt KPCM16ToPCMU16SourceBufferSize = 0x1000;
       
    24 const TInt KPCM16ToPCMU16SinkBufferSize   = KPCM16ToPCMU16SourceBufferSize; 
       
    25 
       
    26 /*
       
    27 *
       
    28 * class CMMFPcm16ToPcmU16HwDevice
       
    29 *
       
    30 */
       
    31 class CMMFPcm16ToPcmU16HwDevice : public CMMFSwCodecWrapper
       
    32 	{
       
    33 public:
       
    34 	static  CMMFPcm16ToPcmU16HwDevice* NewL();
       
    35 	virtual CMMFSwCodec& Codec();
       
    36 	~CMMFPcm16ToPcmU16HwDevice(); 
       
    37 private:
       
    38 	void ConstructL();
       
    39 	};
       
    40 
       
    41 /*
       
    42 *
       
    43 * class CMMFPcm16ToPcmU16CodecCodec converts Pcm16 to Pcm16 unsigned
       
    44 *
       
    45 */
       
    46 class CMMFPcm16ToPcmU16CodecCodec : public CMMFSwCodec
       
    47 	{
       
    48 public:
       
    49 	virtual TCodecProcessResult ProcessL(const CMMFBuffer& aSource, CMMFBuffer& aDest);
       
    50 	virtual TUint SourceBufferSize() {return KPCM16ToPCMU16SourceBufferSize;};
       
    51 	virtual TUint SinkBufferSize() {return KPCM16ToPCMU16SinkBufferSize;};
       
    52 private:
       
    53 	TBool CheckPreconditions( const CMMFDataBuffer* aSrcBuffer, CMMFDataBuffer* aDestBuffer );
       
    54 private:
       
    55 	TMMFAudioPcm16ToPcmU16Codec iAudioPcm16ToPcmU16;
       
    56 	};
       
    57 
       
    58 #endif //__MMF_PCMS16_TO_PCMU16_HW_DEVICE_H__
       
    59