equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 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_TMMFTABLEAUDIOCODEC_H__ |
|
19 #define __MMF_TMMFTABLEAUDIOCODEC_H__ |
|
20 |
|
21 #include <e32std.h> |
|
22 #include "MMFAudioCodecBase.h" |
|
23 |
|
24 class TMMFTableAudioCodec : public TMMFAudioCodecBase |
|
25 { |
|
26 public: |
|
27 inline TMMFTableAudioCodec(); |
|
28 // |
|
29 inline TInt TableSize(); |
|
30 inline void SetTable(TPtr8 aTable); |
|
31 // |
|
32 virtual void FillTable(TPtr8 aTable)=0; |
|
33 IMPORT_C virtual void Convert(TUint8* aSrc, TUint8* aDst, TInt aSamples); |
|
34 protected: |
|
35 virtual void ConvertSlow(TUint8* aSrc, TUint8* aDst, TInt aSamples)=0; |
|
36 virtual void ConvertFast(TUint8* aSrc, TUint8* aDst, TInt aSamples)=0; |
|
37 protected: |
|
38 TInt iTableSize; |
|
39 TUint8* iTablePtr; |
|
40 }; |
|
41 |
|
42 /** |
|
43 * Inline functions |
|
44 **/ |
|
45 inline TMMFTableAudioCodec::TMMFTableAudioCodec() |
|
46 : iTablePtr(0) |
|
47 { |
|
48 } |
|
49 |
|
50 inline TInt TMMFTableAudioCodec::TableSize() |
|
51 { |
|
52 return iTableSize; |
|
53 } |
|
54 |
|
55 inline void TMMFTableAudioCodec::SetTable(TPtr8 aTable) |
|
56 { |
|
57 ASSERT(aTable.Length()>iTableSize); |
|
58 iTablePtr = &aTable[0]; |
|
59 } |
|
60 |
|
61 #endif |
|
62 |