1 /* |
|
2 * Copyright (c) 2010 Ixonos Plc. |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the "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 * Ixonos Plc |
|
14 * |
|
15 * Description: |
|
16 * Common internal constants for audio. |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 |
|
22 #ifndef __AUDCONSTANTS_H__ |
|
23 #define __AUDCONSTANTS_H__ |
|
24 |
|
25 |
|
26 |
|
27 // CONSTANTS |
|
28 |
|
29 const TInt KAedSampleRate8kHz = 8000; |
|
30 const TInt KAedSampleRate11kHz = 11025; |
|
31 const TInt KAedSampleRate16kHz = 16000; |
|
32 const TInt KAedSampleRate22kHz = 22050; |
|
33 const TInt KAedSampleRate24kHz = 24000; |
|
34 const TInt KAedSampleRate32kHz = 32000; |
|
35 const TInt KAedSampleRate44kHz = 44100; |
|
36 const TInt KAedSampleRate48kHz = 48000; |
|
37 |
|
38 const TInt KAedBitRateAMR = 12200; |
|
39 const TInt KAedBitRateAAC16kHz = 48000; |
|
40 const TInt KAedBitRateAAC48kHz = 192000; |
|
41 |
|
42 const TInt KAedAACMinBitRateMultiplier = 1; // min bitrate is 1 bit per sample |
|
43 const TInt KAedAACMaxBitRateMultiplier = 6; // max bitrate is 6 bits per sample |
|
44 |
|
45 const TInt KAedAMRFrameDuration = 20000; |
|
46 |
|
47 const TInt KAedSizeAACBuffer = 2048; |
|
48 const TInt KAedSizeAACStereoBuffer = 4096; |
|
49 const TInt KAedMaxFeedBufferSize = 4096; |
|
50 const TInt KAedMaxAACFrameLengthPerChannel = 768; |
|
51 const TInt KAedMaxAMRFrameLength = 32; |
|
52 const TInt KAedMaxAWBFrameLength = 61; |
|
53 const TInt KAedMaxMP3FrameLength = 1440; |
|
54 const TInt KAedSizeAMRBuffer = 320; |
|
55 const TInt KAedSizeAWBBuffer = 640; |
|
56 |
|
57 const TInt KAedMinAMRBitRate = 400; // voice activity detection creates at least 1 byte per frame => 50 bytes/s = 400 bits/s |
|
58 const TInt KAedMaxAMRBitRate = 12200; |
|
59 const TInt KAedNumSupportedAACSampleRates = 2; |
|
60 const TInt KAedSupportedAACSampleRates[KAedNumSupportedAACSampleRates] = {KAedSampleRate16kHz, KAedSampleRate48kHz}; |
|
61 |
|
62 // Max resolution for visualization; this should cover > 30 minute clip if 5 samples per sec are requested |
|
63 const TInt KAedMaxVisualizationResolution = 10000; |
|
64 |
|
65 // UId of the AAC CMMFCodec encoder |
|
66 const TUid KAedAACEncSWCodecUid = {0x1020382F}; //KAdvancedUidCodecPCM16ToAAC |
|
67 // UId of the AMR-NB CMMFCodec encoder |
|
68 const TUid KAedAMRNBEncSWCodecUid = {0x101FAF68}; //KAdvancedUidCodecPCM16ToAMR |
|
69 |
|
70 // UId of the AAC CMMFCodec decoder |
|
71 const TUid KMmfAACDecSWCodecUid = {0x101FAF81}; //KMmfUidCodecAACToPCM16 |
|
72 // UId of the AMR-NB CMMFCodec decoder |
|
73 const TUid KMmfAMRNBDecSWCodecUid = {0x101FAF67}; //KAdvancedUidCodecAMRToPCM16 |
|
74 // UId of the eAAC+ CMMFCodec decoder |
|
75 const TUid KMmfUidCodecEnhAACPlusToPCM16 = {0x10207AA9}; |
|
76 // UId of the AMR-WB CMMFCodec decoder |
|
77 const TUid KMmfAMRWBDecSWCodecUid = {0x101FAF5E}; |
|
78 // UId of the MP3 CMMFCodec decoder |
|
79 const TUid KMmfAdvancedUidCodecMP3ToPCM16 = {0x101FAF85}; |
|
80 |
|
81 // FourCC for the eAAC+ |
|
82 const TUint32 KMMFFourCCCodeAACPlus = 0x43414520; //(' ','E','A','C') |
|
83 |
|
84 // Used in CProcInFileHandler::GetGainNow() to reduce positive gains |
|
85 const TInt KAedPositiveGainDivider = 5; |
|
86 |
|
87 |
|
88 #endif // __AUDCONSTANTS_H__ |
|
89 |
|