First public contribution.
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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #ifndef __MMF_BT_PCM16_TO_MULAW_HW_DEVICE_H__
17 #define __MMF_BT_PCM16_TO_MULAW_HW_DEVICE_H__
19 #include <mmfbtswcodecwrapper.h>
20 #include "MmfBtAudioCodec.h"
21 #include "MMFAudioSPcm16ToMuLawCodec.h"
23 const TInt KPCM16ToMuLawSrcBufferSize = 0x2000;
24 const TInt KPCM16ToMuLawSinkBufferSize = 0x1000;
28 * CMMFPcm16ToMulawHwDevice
31 class CMMFPcm16ToMulawHwDevice : public CMMFSwCodecWrapper
34 static CMMFPcm16ToMulawHwDevice* NewL();
35 virtual CMMFSwCodec& Codec();
36 ~CMMFPcm16ToMulawHwDevice();
43 * class CMMFPcm16ToALawCodec coverts PCM16 to MuLaw
46 class CMMFPcm16ToMuLawCodec : public CMMFSwCodec
49 virtual TCodecProcessResult ProcessL(const CMMFBuffer& aSource, CMMFBuffer& aDest);
50 virtual TUint SourceBufferSize() {return KPCM16ToMuLawSrcBufferSize;};
51 virtual TUint SinkBufferSize() {return KPCM16ToMuLawSinkBufferSize;};
53 TBool CheckPreconditions( const CMMFDataBuffer* aSrcBuffer, CMMFDataBuffer* aDestBuffer );
55 TMMFAudioSPcm16ToMuLawCodec iPcm16ToMuLaw;
58 #endif // __MMF_BT_PCM16_TO_MULAW_HW_DEVICE_H__