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_PCMU8_HW_DEVICE_H__
17 #define __MMF_BT_PCM16_TO_PCMU8_HW_DEVICE_H__
19 #include <mmfbtswcodecwrapper.h>
20 #include "MmfBtAudioCodec.h"
22 #include "MMFAudioS16ToU8PcmCodec.h"
24 const TInt KPCM16ToPCMU8SourceBufferSize = 0x2000;
25 const TInt KPCM16ToPCMU8SinkBufferSize = 0x1000; //sink buffer length is half source
29 * class CMMFPcm16ToPcmU8HwDevice
32 class CMMFPcm16ToPcmU8HwDevice : public CMMFSwCodecWrapper
35 static CMMFPcm16ToPcmU8HwDevice* NewL();
36 virtual CMMFSwCodec& Codec();
37 ~CMMFPcm16ToPcmU8HwDevice();
44 * class CMMFPcm16ToPcmU8Codec converts Pcm16 to Pcm unsigned 8 bit
47 class CMMFPcm16ToPcmU8Codec : public CMMFSwCodec
50 virtual TCodecProcessResult ProcessL(const CMMFBuffer& aSource, CMMFBuffer& aDest);
51 virtual TUint SourceBufferSize() {return KPCM16ToPCMU8SourceBufferSize;};
52 virtual TUint SinkBufferSize() {return KPCM16ToPCMU8SinkBufferSize;};
54 TBool CheckPreconditions( const CMMFDataBuffer* aSrcBuffer, CMMFDataBuffer* aDestBuffer );
56 TMMFAudioS16ToU8PcmCodec iAudioS16ToU8Pcm ;
59 #endif //__MMF_BT_PCMS16_TO_PCMS8_HW_DEVICE_H__