|
1 /* |
|
2 * Copyright (c) 2002-2003 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
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". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef __MMF_TMMFAUDIO_CODEC_BASE_H__ |
|
19 #define __MMF_TMMFAUDIO_CODEC_BASE_H__ |
|
20 #include <e32std.h> |
|
21 #include <mmfcodec/mmfaudiodatasettings.h> |
|
22 |
|
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; |
|
28 |
|
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; |
|
35 |
|
36 //Gsm coded Frame size |
|
37 const TInt KCodedBufferSize = 152; |
|
38 |
|
39 // Base of Audio codecs |
|
40 /* |
|
41 * |
|
42 * class TMMFAudioCodecBase |
|
43 * |
|
44 */ |
|
45 class TMMFAudioCodecBase |
|
46 { |
|
47 public: |
|
48 inline TMMFAudioCodecBase(); |
|
49 // |
|
50 virtual void Convert(TUint8* aSrc, TUint8* aDst, TInt aSamples)=0; |
|
51 }; |
|
52 |
|
53 inline TMMFAudioCodecBase::TMMFAudioCodecBase() |
|
54 {} |
|
55 |
|
56 #endif //__MMF_TMMFAUDIO_CODEC_BASE_H__ |