diff -r 000000000000 -r bde4ae8d615e os/mm/devsound/sounddevbt/src/Plugin/HwDevice/Audio/MmfBtPcm16ToMulawHwDevice.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/os/mm/devsound/sounddevbt/src/Plugin/HwDevice/Audio/MmfBtPcm16ToMulawHwDevice.h Fri Jun 15 03:10:57 2012 +0200 @@ -0,0 +1,58 @@ +// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __MMF_BT_PCM16_TO_MULAW_HW_DEVICE_H__ +#define __MMF_BT_PCM16_TO_MULAW_HW_DEVICE_H__ + +#include +#include "MmfBtAudioCodec.h" +#include "MMFAudioSPcm16ToMuLawCodec.h" + +const TInt KPCM16ToMuLawSrcBufferSize = 0x2000; +const TInt KPCM16ToMuLawSinkBufferSize = 0x1000; + +/* +* +* CMMFPcm16ToMulawHwDevice +* +*/ +class CMMFPcm16ToMulawHwDevice : public CMMFSwCodecWrapper + { +public: + static CMMFPcm16ToMulawHwDevice* NewL(); + virtual CMMFSwCodec& Codec(); + ~CMMFPcm16ToMulawHwDevice(); +private: + void ConstructL(); + }; + +/* +* +* class CMMFPcm16ToALawCodec coverts PCM16 to MuLaw +* +*/ +class CMMFPcm16ToMuLawCodec : public CMMFSwCodec + { +public: + virtual TCodecProcessResult ProcessL(const CMMFBuffer& aSource, CMMFBuffer& aDest); + virtual TUint SourceBufferSize() {return KPCM16ToMuLawSrcBufferSize;}; + virtual TUint SinkBufferSize() {return KPCM16ToMuLawSinkBufferSize;}; +private: + TBool CheckPreconditions( const CMMFDataBuffer* aSrcBuffer, CMMFDataBuffer* aDestBuffer ); +private: + TMMFAudioSPcm16ToMuLawCodec iPcm16ToMuLaw; + }; + +#endif // __MMF_BT_PCM16_TO_MULAW_HW_DEVICE_H__