os/mm/devsound/sounddevbt/src/Plugin/HwDevice/Audio/MmfBtPcm16SwapEndianHwDevice.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
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".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 #ifndef __MMF_BT_SWAP_ENDIAN_HW_DEVICE_H__
    17 #define __MMF_BT_SWAP_ENDIAN_HW_DEVICE_H__
    18 #include <mmfbtswcodecwrapper.h>
    19 #include "MmfBtAudioCodec.h"
    20 #include "MMFAudioPcm16SwapEndianCodecCommon.h"
    21 
    22 const TInt KPCM16ToPCM16BBufferSize = 0x2000;
    23 
    24 /*
    25 *
    26 * class CMMFPcm16SwapEndianHwDevice 
    27 *
    28 */
    29 class CMMFPcm16SwapEndianHwDevice : public CMMFSwCodecWrapper
    30 	{
    31 public:
    32 	static  CMMFPcm16SwapEndianHwDevice* NewL();
    33 	virtual CMMFSwCodec& Codec();
    34     ~CMMFPcm16SwapEndianHwDevice(); 
    35 private:
    36 	void ConstructL();
    37 	};
    38 
    39 /*
    40 *
    41 * class CMMFPcm16SwapEndianCodec coverts PCM16 to PCM16Big Endian
    42 *  
    43 */
    44 class CMMFPcm16SwapEndianCodec : public CMMFSwCodec
    45 	{
    46 public:
    47 	virtual TCodecProcessResult ProcessL(const CMMFBuffer& aSource, CMMFBuffer& aDest);
    48 	virtual TUint SourceBufferSize() {return KPCM16ToPCM16BBufferSize;};
    49 	virtual TUint SinkBufferSize() {return KPCM16ToPCM16BBufferSize;};
    50 private:
    51 	TBool CheckPreconditions( const CMMFDataBuffer* aSrcBuffer, CMMFDataBuffer* aDestBuffer );
    52 private:
    53 	TMMFAudioPcm16SwapEndianCodec iPcm16EndianSwap;
    54 	};
    55 
    56 #endif //__MMF_SWAP_ENDIAN_HW_DEVICE_H__