Update contrib.
2 * Copyright (c) 2002-2003 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
18 #ifndef __MMF_TMMFAUDIO_CODEC_BASE_H__
19 #define __MMF_TMMFAUDIO_CODEC_BASE_H__
21 #include "MMFAudioDataSettings.h"
23 const TInt KClamp = 32768;
24 const TInt KMaskSign16bit = 0x8000;
25 const TInt KMaskSign8bit = 0x80;
26 const TInt KAndMask8bit = 0xff;
27 const TInt KMaxImaAdpcmTableEntries = 88;
29 const TUint KImaAdpcmBlockAlign = 256;
30 //samples per block = [((block align - (4 * nChannels)) * 8) / (bits per sample * nChannels)] + 1
31 const TUint KImaAdpcmSamplesPerBlock = ((KImaAdpcmBlockAlign - 4)*2) + 1; //505
32 const TUint KImaAdpcmStereoSamplesPerBlock = (KImaAdpcmBlockAlign - 8) + 1; //249
33 const TUint KImaAdpcmTempBufferSize = KImaAdpcmSamplesPerBlock*2;
34 const TUint KImaAdpcmStereoTempBufferSize = KImaAdpcmStereoSamplesPerBlock*4;
36 //Gsm coded Frame size
37 const TInt KCodedBufferSize = 152;
39 // Base of Audio codecs
42 * class TMMFAudioCodecBase
45 class TMMFAudioCodecBase
48 inline TMMFAudioCodecBase();
50 virtual void Convert(TUint8* aSrc, TUint8* aDst, TInt aSamples)=0;
53 inline TMMFAudioCodecBase::TMMFAudioCodecBase()
56 #endif //__MMF_TMMFAUDIO_CODEC_BASE_H__