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 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #ifndef MP3MIXAPI__H |
|
22 #define MP3MIXAPI__H |
|
23 |
|
24 #include "ProcInFileHandler.h" |
|
25 #include "ProcOutFileHandler.h" |
|
26 #include "imdct2.h" |
|
27 #include "editdef.h" |
|
28 |
|
29 |
|
30 class CImdct2; |
|
31 |
|
32 class CMp3Mix : public CBase |
|
33 { |
|
34 |
|
35 public: |
|
36 |
|
37 IMPORT_C static CMp3Mix* NewL(); |
|
38 IMPORT_C ~CMp3Mix(); |
|
39 |
|
40 IMPORT_C TBool StartMixingL(CProcInFileHandler* aMP3InFileHandler1, |
|
41 TInt aStartPosMilli1, |
|
42 CProcInFileHandler* aMP3InFileHandler2, |
|
43 TInt aStartPosMilli2, |
|
44 CProcOutFileHandler* aMP3OutFileHandler, |
|
45 TInt aBitrateShort, |
|
46 TInt aBitrateLong, |
|
47 TInt& aMixingDuration); |
|
48 |
|
49 IMPORT_C TBool MixFrameL(HBufC8* aMP3InBuffer1, HBufC8* aMP3InBuffer2, TInt& aFramesProcessed); |
|
50 |
|
51 IMPORT_C TBool StopMixing(); |
|
52 |
|
53 |
|
54 static TBool WriteL(TDesC& aMessage); |
|
55 TBool WriteFloatsL(FLOAT* aArray, TInt aLen) const; |
|
56 TBool WriteIntsL(TInt16* aArray, TInt aLen); |
|
57 |
|
58 |
|
59 |
|
60 private: |
|
61 |
|
62 void ConstructL(); |
|
63 CMp3Mix(); |
|
64 |
|
65 CProcInFileHandler* iIn1; |
|
66 CProcInFileHandler* iIn2; |
|
67 CProcOutFileHandler* iOut1; |
|
68 TAudioMixerInputInfo* iInfo; |
|
69 CEditorAPIHandle* iEditorAPIHandle1; |
|
70 CEditorAPIHandle* iEditorAPIHandle2; |
|
71 TUint iFrameCount1; |
|
72 TUint iFrameCount2; |
|
73 |
|
74 CEditorChunk* iChunk1; |
|
75 CEditorChunk* iChunk2; |
|
76 |
|
77 |
|
78 TUint iFramesMixed; |
|
79 |
|
80 CL3MixerHelper* iL3Mix; |
|
81 CImdct2* imdct2; |
|
82 |
|
83 TInt iMixingDuration; |
|
84 |
|
85 RFile* iFile; |
|
86 RFs* iFs; |
|
87 TBool iFileOpened; |
|
88 HBufC8* iWriteBuffer; |
|
89 |
|
90 |
|
91 }; |
|
92 |
|
93 #endif |
|