sl@0: // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0: // All rights reserved.
sl@0: // This component and the accompanying materials are made available
sl@0: // under the terms of "Eclipse Public License v1.0"
sl@0: // which accompanies this distribution, and is available
sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0: //
sl@0: // Initial Contributors:
sl@0: // Nokia Corporation - initial contribution.
sl@0: //
sl@0: // Contributors:
sl@0: //
sl@0: // Description:
sl@0: //
sl@0: 
sl@0: #ifndef __MMF_BT_PCMS8_TO_PCMS16_HW_DEVICE_H__
sl@0: #define __MMF_BT_PCMS8_TO_PCMS16_HW_DEVICE_H__
sl@0: 
sl@0: #include <mmfbtswcodecwrapper.h>
sl@0: #include "MmfBtAudioCodec.h"
sl@0: #include "MMFAudioPcm8ToPcm16Codec.h"
sl@0: 
sl@0: const TInt KPCM8ToPCM16SourceBufferSize = 0x0800;
sl@0: const TInt KPCM8ToPCM16SinkBufferSize = 0x1000; //sink buffer length is twice source
sl@0: 
sl@0: /*
sl@0: *
sl@0: * class CMMFPcm8ToPcm16HwDevice
sl@0: *
sl@0: */
sl@0: class CMMFPcm8ToPcm16HwDevice : public CMMFSwCodecWrapper
sl@0: 	{
sl@0: public:
sl@0: 	static  CMMFPcm8ToPcm16HwDevice* NewL();
sl@0: 	virtual CMMFSwCodec& Codec();
sl@0: 	~CMMFPcm8ToPcm16HwDevice();
sl@0: private:
sl@0: 	void ConstructL();
sl@0: 	};
sl@0: 
sl@0: /*
sl@0: *
sl@0: * class CMMFPcm8ToPcm16Codec converts pcm8 to pcm16
sl@0: *
sl@0: */
sl@0: class CMMFPcm8ToPcm16Codec : public CMMFSwCodec
sl@0: 	{
sl@0: public:
sl@0: 	virtual TCodecProcessResult ProcessL(const CMMFBuffer& aSource, CMMFBuffer& aDest);
sl@0: 	virtual TUint SourceBufferSize() {return KPCM8ToPCM16SourceBufferSize;};
sl@0: 	virtual TUint SinkBufferSize() {return KPCM8ToPCM16SinkBufferSize;};
sl@0: private:
sl@0: 	TBool CheckPreconditions( const CMMFDataBuffer* aSrcBuffer, CMMFDataBuffer* aDestBuffer );
sl@0: private:
sl@0: 	TMMFAudioPcm8ToPcm16Codec iAudioPcm8ToPcm16 ;
sl@0: 	};
sl@0: 
sl@0: #endif //__MMF_BT_PCMS8_TO_PCMS16_HW_DEVICE_H__
sl@0: