devsound/devsoundrefplugin/src/plugin/audio/mmfpcmU16TopcmS16HwDevice.h
changeset 0 40261b775718
equal deleted inserted replaced
-1:000000000000 0:40261b775718
       
     1 /*
       
     2 * Copyright (c) 2002-2003 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:
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef __MMF_PCMU16_TO_PCM16_HW_DEVICE_H__
       
    19 #define __MMF_PCMU16_TO_PCM16_HW_DEVICE_H__
       
    20 
       
    21 #include <mmf/server/mmfswcodecwrapper.h>
       
    22 #include "MMFAudioCodec.h"
       
    23 #include "MMFAudioU16ToS16PcmCodec.h"
       
    24 
       
    25 
       
    26 const TInt KPCMU16ToPCM16SourceBufferSize = 0x1000;
       
    27 const TInt KPCMU16ToPCM16SinkBufferSize = KPCMU16ToPCM16SourceBufferSize; 
       
    28 
       
    29 /*
       
    30 *
       
    31 * class CMMFPcmU16ToPcm16HwDevice
       
    32 *
       
    33 */
       
    34 class CMMFPcmU16ToPcm16HwDevice : public CMMFSwCodecWrapper
       
    35 	{
       
    36 public:
       
    37 	static  CMMFPcmU16ToPcm16HwDevice* NewL();
       
    38 	virtual CMMFSwCodec& Codec();
       
    39     ~CMMFPcmU16ToPcm16HwDevice(); 
       
    40 private:
       
    41 	void ConstructL();
       
    42 	};
       
    43 
       
    44 /*
       
    45 *
       
    46 * class CMMFPcmU16ToPcm16Codec converts Pcm16 Unsigned to Pcm16
       
    47 *
       
    48 */
       
    49 class CMMFPcmU16ToPcm16Codec : public CMMFSwCodec
       
    50 	{
       
    51 public:
       
    52 	virtual TCodecProcessResult ProcessL(const CMMFBuffer& aSource, CMMFBuffer& aDest);
       
    53 	virtual TUint SourceBufferSize() {return KPCMU16ToPCM16SourceBufferSize;};
       
    54 	virtual TUint SinkBufferSize() {return KPCMU16ToPCM16SourceBufferSize;};
       
    55 private:
       
    56 	TBool CheckPreconditions( const CMMFDataBuffer* aSrcBuffer, CMMFDataBuffer* aDestBuffer );
       
    57 private:
       
    58 	TMMFAudioU16ToS16PcmCodec iAudioU16ToS16Pcm ;
       
    59 	};
       
    60 
       
    61 #endif //__MMF_PCMU16_TO_PCM16_HW_DEVICE_H__
       
    62