devsound/sounddevbt/src/Plugin/HwDevice/Audio/MmfBtPcm16ToMulawHwDevice.h
author Tapani Kanerva <tapani.kanerva@nice.fi>
Tue, 16 Nov 2010 14:11:25 +0200
branchRCL_3
changeset 67 b35006be8823
parent 0 40261b775718
permissions -rw-r--r--
Bug 3673 - Seeking via grabbing the Music Player progress bar does not work.

// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
// which accompanies this distribution, and is available
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
//
// Initial Contributors:
// Nokia Corporation - initial contribution.
//
// Contributors:
//
// Description:
//

#ifndef __MMF_BT_PCM16_TO_MULAW_HW_DEVICE_H__
#define __MMF_BT_PCM16_TO_MULAW_HW_DEVICE_H__

#include <mmfbtswcodecwrapper.h>
#include "MmfBtAudioCodec.h"
#include "MMFAudioSPcm16ToMuLawCodec.h"
 
const TInt KPCM16ToMuLawSrcBufferSize   = 0x2000;
const TInt KPCM16ToMuLawSinkBufferSize  = 0x1000;

/*
*
* CMMFPcm16ToMulawHwDevice 
*
*/
class CMMFPcm16ToMulawHwDevice : public CMMFSwCodecWrapper
	{	
public:
	static  CMMFPcm16ToMulawHwDevice* NewL();
	virtual CMMFSwCodec& Codec();
	~CMMFPcm16ToMulawHwDevice(); 
private:
	void ConstructL();
	};

/*
*
* class CMMFPcm16ToALawCodec coverts PCM16 to MuLaw
*  
*/
class CMMFPcm16ToMuLawCodec : public CMMFSwCodec
	{
public:
	virtual TCodecProcessResult ProcessL(const CMMFBuffer& aSource, CMMFBuffer& aDest);
	virtual TUint SourceBufferSize() {return KPCM16ToMuLawSrcBufferSize;};
	virtual TUint SinkBufferSize() {return KPCM16ToMuLawSinkBufferSize;};
private:
	TBool CheckPreconditions( const CMMFDataBuffer* aSrcBuffer, CMMFDataBuffer* aDestBuffer );
private:
	TMMFAudioSPcm16ToMuLawCodec  iPcm16ToMuLaw;
	};

#endif  // __MMF_BT_PCM16_TO_MULAW_HW_DEVICE_H__