First public contribution.
1 // Copyright (c) 1997-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.
17 #ifndef MMFIMAADPCMTOPCM16CODEC_H
18 #define MMFIMAADPCMTOPCM16CODEC_H
20 #include "MMFCodecBaseDefinitions.h"
21 #include "MMFAudioCodecBase.h"
22 #include <mmf/server/devsoundstandardcustominterfaces.h>
24 const TUint KMaxImaAdpcmBlockAlign = 2048;
25 const TUint KImaAdpcmBitsPerSample = 4;
27 //mono so iImaAdpcmTo16Pcm constructed with 1 (mono)
28 class CMMFImaAdPcmPcm16Codec : public CMMFCodec, public MMMFDevSoundCustomInterfaceFileBlockLength
31 static CMMFCodec* NewL(TAny* aInitParams);
32 virtual ~CMMFImaAdPcmPcm16Codec();
33 TCodecProcessResult ProcessL(const CMMFBuffer& aSrc, CMMFBuffer& aDst);
34 void ConfigureL(TUid aConfigType, const TDesC8& aConfigData);
35 // from MMMFDevSoundCustomInterfaceFileBlockLength
36 void SetFileBlockLength(TUint aBlockAlign);
38 virtual TInt Extension_(TUint aExtensionId, TAny*& aExtPtr, TAny*);
40 CMMFImaAdPcmPcm16Codec();
41 void ConstructL(TAny* aInitParams);
42 virtual void ResetL();
45 //owned by the Datapath
46 const CMMFDataBuffer* iSrc;
49 TUint iTempSrcBufferCount;
50 TUint8* iTempSrcBufferPtr;
51 TUint8 iTempSrcBuffer[KMaxImaAdpcmBlockAlign];
52 TMMFImaAdpcmTo16PcmCodecOld iImaAdpcmTo16Pcm ;
53 TUint iLastFrameNumber;
55 // allow configuring sample rate
58 TUint iSamplesPerBlock;