sl@0
|
1 |
// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
2 |
// All rights reserved.
|
sl@0
|
3 |
// This component and the accompanying materials are made available
|
sl@0
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
sl@0
|
5 |
// which accompanies this distribution, and is available
|
sl@0
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
7 |
//
|
sl@0
|
8 |
// Initial Contributors:
|
sl@0
|
9 |
// Nokia Corporation - initial contribution.
|
sl@0
|
10 |
//
|
sl@0
|
11 |
// Contributors:
|
sl@0
|
12 |
//
|
sl@0
|
13 |
// Description:
|
sl@0
|
14 |
// src\plugin\Hwdevice\audio\MmfBtPcm16ToPcm16HwDevice.h
|
sl@0
|
15 |
//
|
sl@0
|
16 |
//
|
sl@0
|
17 |
|
sl@0
|
18 |
#ifndef __MMF_BT_PCM16_TO_PCM16_HW_DEVICE_H__
|
sl@0
|
19 |
#define __MMF_BT_PCM16_TO_PCM16_HW_DEVICE_H__
|
sl@0
|
20 |
#include <mmfbtswcodecwrapper.h>
|
sl@0
|
21 |
#include <mdasound.h>
|
sl@0
|
22 |
|
sl@0
|
23 |
#include "../../../swcodecwrapper/mmfBtSwCodecDataPath.h"
|
sl@0
|
24 |
|
sl@0
|
25 |
//note we need to keep this buffer at 8K as the tone utility expects 8K
|
sl@0
|
26 |
const TInt KPCM16ToPCM16BufferSize = 0x2000;
|
sl@0
|
27 |
const TInt KDevSoundMinFrameSize = 0x800; //2K
|
sl@0
|
28 |
const TInt KDevSoundMaxFrameSize = 0x4000; //16K
|
sl@0
|
29 |
const TInt KDevSoundDeltaFrameSize = 0x800; //2K
|
sl@0
|
30 |
const TInt KDevSoundFramesPerSecond = 4;
|
sl@0
|
31 |
|
sl@0
|
32 |
/*
|
sl@0
|
33 |
*
|
sl@0
|
34 |
* class CMMFPcm16ToPcm16HwDevice
|
sl@0
|
35 |
*
|
sl@0
|
36 |
*/
|
sl@0
|
37 |
class CMMFPcm16ToPcm16HwDevice : public CMMFSwCodecWrapper
|
sl@0
|
38 |
{
|
sl@0
|
39 |
public:
|
sl@0
|
40 |
static CMMFPcm16ToPcm16HwDevice* NewL();
|
sl@0
|
41 |
virtual CMMFSwCodec& Codec();
|
sl@0
|
42 |
~CMMFPcm16ToPcm16HwDevice();
|
sl@0
|
43 |
|
sl@0
|
44 |
TUint CalculateBufferSize();
|
sl@0
|
45 |
private:
|
sl@0
|
46 |
void ConstructL();
|
sl@0
|
47 |
};
|
sl@0
|
48 |
|
sl@0
|
49 |
/*
|
sl@0
|
50 |
*
|
sl@0
|
51 |
* class CMMFPcm16ToPcm16Codec converts Pcm16 to pcm16
|
sl@0
|
52 |
*
|
sl@0
|
53 |
*/
|
sl@0
|
54 |
class CMMFPcm16ToPcm16Codec : public CMMFSwCodec
|
sl@0
|
55 |
{
|
sl@0
|
56 |
public:
|
sl@0
|
57 |
virtual TCodecProcessResult ProcessL(const CMMFBuffer& /*aSource*/, CMMFBuffer& /*aDest*/);
|
sl@0
|
58 |
// virtual TUint SourceBufferSize() {return KPCM16ToPCM16BufferSize;};
|
sl@0
|
59 |
// virtual TUint SinkBufferSize() {return KPCM16ToPCM16BufferSize;};
|
sl@0
|
60 |
virtual TUint SourceBufferSize();
|
sl@0
|
61 |
virtual TUint SinkBufferSize();
|
sl@0
|
62 |
virtual TBool IsNullCodec() {return ETrue;};
|
sl@0
|
63 |
|
sl@0
|
64 |
void SetHwDevice(CMMFPcm16ToPcm16HwDevice* aHwDevice);
|
sl@0
|
65 |
private:
|
sl@0
|
66 |
TUint iBufferSize;
|
sl@0
|
67 |
CMMFPcm16ToPcm16HwDevice* iHwDevice;
|
sl@0
|
68 |
};
|
sl@0
|
69 |
|
sl@0
|
70 |
#endif //__MMF_BT_PCM16_TO_PCM16_HW_DEVICE_H__
|
sl@0
|
71 |
|