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.
14 // src\plugin\Hwdevice\audio\MmfBtPcm16ToPcm16HwDevice.h
18 #ifndef __MMF_BT_PCM16_TO_PCM16_HW_DEVICE_H__
19 #define __MMF_BT_PCM16_TO_PCM16_HW_DEVICE_H__
20 #include <mmfbtswcodecwrapper.h>
23 #include "../../../swcodecwrapper/mmfBtSwCodecDataPath.h"
25 //note we need to keep this buffer at 8K as the tone utility expects 8K
26 const TInt KPCM16ToPCM16BufferSize = 0x2000;
27 const TInt KDevSoundMinFrameSize = 0x800; //2K
28 const TInt KDevSoundMaxFrameSize = 0x4000; //16K
29 const TInt KDevSoundDeltaFrameSize = 0x800; //2K
30 const TInt KDevSoundFramesPerSecond = 4;
34 * class CMMFPcm16ToPcm16HwDevice
37 class CMMFPcm16ToPcm16HwDevice : public CMMFSwCodecWrapper
40 static CMMFPcm16ToPcm16HwDevice* NewL();
41 virtual CMMFSwCodec& Codec();
42 ~CMMFPcm16ToPcm16HwDevice();
44 TUint CalculateBufferSize();
51 * class CMMFPcm16ToPcm16Codec converts Pcm16 to pcm16
54 class CMMFPcm16ToPcm16Codec : public CMMFSwCodec
57 virtual TCodecProcessResult ProcessL(const CMMFBuffer& /*aSource*/, CMMFBuffer& /*aDest*/);
58 // virtual TUint SourceBufferSize() {return KPCM16ToPCM16BufferSize;};
59 // virtual TUint SinkBufferSize() {return KPCM16ToPCM16BufferSize;};
60 virtual TUint SourceBufferSize();
61 virtual TUint SinkBufferSize();
62 virtual TBool IsNullCodec() {return ETrue;};
64 void SetHwDevice(CMMFPcm16ToPcm16HwDevice* aHwDevice);
67 CMMFPcm16ToPcm16HwDevice* iHwDevice;
70 #endif //__MMF_BT_PCM16_TO_PCM16_HW_DEVICE_H__