First public contribution.
2 * Copyright (c) 2002-2003 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
18 #ifndef __MMF_MULAW_TO_PCM16_HW_DEVICE_H__
19 #define __MMF_MULAW_TO_PCM16_HW_DEVICE_H__
21 #include <mmf/server/mmfswcodecwrapper.h>
22 #include "MMFAudioCodecBase.h"
24 #include "MMFAudioMuLawToS16PcmCodec.h"
26 const TInt KMuLawToCM16SrcBufferSize = 0x1000;
27 const TInt KMuLawToCM16SinkBufferSize = 0x2000;
31 * class CMMFMulawToPcm16CodecHwDevice
34 class CMMFMulawToPcm16CodecHwDevice : public CMMFSwCodecWrapper
37 static CMMFMulawToPcm16CodecHwDevice* NewL();
38 virtual CMMFSwCodec& Codec();
39 ~CMMFMulawToPcm16CodecHwDevice();
46 * class CMMFMulawToPcm16Codec coverts MuLaw to PCM
49 class CMMFMulawToPcm16Codec : public CMMFSwCodec
52 virtual TCodecProcessResult ProcessL(const CMMFBuffer& aSource, CMMFBuffer& aDest);
53 virtual TUint SourceBufferSize() {return KMuLawToCM16SrcBufferSize;};
54 virtual TUint SinkBufferSize() {return KMuLawToCM16SinkBufferSize;};
56 TBool CheckPreconditions( const CMMFDataBuffer* aSrcBuffer, CMMFDataBuffer* aDestBuffer );
57 TInt MulawSampleToPcm(TUint8 aAlaw);
59 TMMFAudioMuLawToS16PcmCodec iMulawTo16Pcm;
62 #endif //__MMF_MULAW_TO_PCM16_HW_DEVICE_H__