1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/mm/devsound/sounddevbt/src/Plugin/HwDevice/Audio/MmfBtPcm16ToPcm16HwDevice.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,71 @@
1.4 +// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +// src\plugin\Hwdevice\audio\MmfBtPcm16ToPcm16HwDevice.h
1.18 +//
1.19 +//
1.20 +
1.21 +#ifndef __MMF_BT_PCM16_TO_PCM16_HW_DEVICE_H__
1.22 +#define __MMF_BT_PCM16_TO_PCM16_HW_DEVICE_H__
1.23 +#include <mmfbtswcodecwrapper.h>
1.24 +#include <mdasound.h>
1.25 +
1.26 +#include "../../../swcodecwrapper/mmfBtSwCodecDataPath.h"
1.27 +
1.28 +//note we need to keep this buffer at 8K as the tone utility expects 8K
1.29 +const TInt KPCM16ToPCM16BufferSize = 0x2000;
1.30 +const TInt KDevSoundMinFrameSize = 0x800; //2K
1.31 +const TInt KDevSoundMaxFrameSize = 0x4000; //16K
1.32 +const TInt KDevSoundDeltaFrameSize = 0x800; //2K
1.33 +const TInt KDevSoundFramesPerSecond = 4;
1.34 +
1.35 +/*
1.36 +*
1.37 +* class CMMFPcm16ToPcm16HwDevice
1.38 +*
1.39 +*/
1.40 +class CMMFPcm16ToPcm16HwDevice : public CMMFSwCodecWrapper
1.41 + {
1.42 +public:
1.43 + static CMMFPcm16ToPcm16HwDevice* NewL();
1.44 + virtual CMMFSwCodec& Codec();
1.45 + ~CMMFPcm16ToPcm16HwDevice();
1.46 +
1.47 + TUint CalculateBufferSize();
1.48 +private:
1.49 + void ConstructL();
1.50 + };
1.51 +
1.52 +/*
1.53 +*
1.54 +* class CMMFPcm16ToPcm16Codec converts Pcm16 to pcm16
1.55 +*
1.56 +*/
1.57 +class CMMFPcm16ToPcm16Codec : public CMMFSwCodec
1.58 + {
1.59 +public:
1.60 + virtual TCodecProcessResult ProcessL(const CMMFBuffer& /*aSource*/, CMMFBuffer& /*aDest*/);
1.61 +// virtual TUint SourceBufferSize() {return KPCM16ToPCM16BufferSize;};
1.62 +// virtual TUint SinkBufferSize() {return KPCM16ToPCM16BufferSize;};
1.63 + virtual TUint SourceBufferSize();
1.64 + virtual TUint SinkBufferSize();
1.65 + virtual TBool IsNullCodec() {return ETrue;};
1.66 +
1.67 + void SetHwDevice(CMMFPcm16ToPcm16HwDevice* aHwDevice);
1.68 +private:
1.69 + TUint iBufferSize;
1.70 + CMMFPcm16ToPcm16HwDevice* iHwDevice;
1.71 + };
1.72 +
1.73 +#endif //__MMF_BT_PCM16_TO_PCM16_HW_DEVICE_H__
1.74 +