|
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 * Audio processor class. |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 #ifndef __AUDIOPROCESSOR_H__ |
|
22 #define __AUDIOPROCESSOR_H__ |
|
23 |
|
24 #ifndef __E32BASE_H__ |
|
25 #include <e32base.h> |
|
26 #endif |
|
27 |
|
28 class CMovieProcessorImpl; |
|
29 class CAudSong; |
|
30 |
|
31 /** |
|
32 * Audio processor. |
|
33 */ |
|
34 class CAudioProcessor : public CActive |
|
35 { |
|
36 public: // Constructors and destructor |
|
37 |
|
38 /** |
|
39 * Two-phased constructor |
|
40 */ |
|
41 |
|
42 static CAudioProcessor* NewL(CMovieProcessorImpl *aMovieProcessor, CAudSong* aSong); |
|
43 static CAudioProcessor* NewLC(CMovieProcessorImpl *aMovieProcessor, CAudSong* aSong); |
|
44 |
|
45 /** |
|
46 * Destructor. |
|
47 */ |
|
48 |
|
49 virtual ~CAudioProcessor(); |
|
50 |
|
51 public: // Functions from base classes |
|
52 |
|
53 /** |
|
54 * From CActive Active object cancelling method |
|
55 */ |
|
56 void DoCancel(); |
|
57 |
|
58 /** |
|
59 * From CActive Active object running method |
|
60 */ |
|
61 void RunL(); |
|
62 |
|
63 /** |
|
64 * From CActive Active object error method |
|
65 */ |
|
66 TInt RunError(TInt aError); |
|
67 |
|
68 public: // New functions |
|
69 |
|
70 /** |
|
71 * Starts audio processing |
|
72 */ |
|
73 void StartL(); |
|
74 |
|
75 /** |
|
76 * Stops audio processing |
|
77 */ |
|
78 void StopL(); |
|
79 |
|
80 private: |
|
81 |
|
82 /** |
|
83 * Constructor |
|
84 */ |
|
85 CAudioProcessor(CMovieProcessorImpl *aMovieProcessor, CAudSong* aSong); |
|
86 |
|
87 /** |
|
88 * By default EPOC constructor is private. |
|
89 */ |
|
90 void ConstructL(); |
|
91 |
|
92 /** |
|
93 * Process a number of audio frames |
|
94 */ |
|
95 void ProcessFramesL(); |
|
96 |
|
97 private: // Data |
|
98 |
|
99 // movie processor instance |
|
100 CMovieProcessorImpl* iMovieProcessor; |
|
101 |
|
102 // song |
|
103 CAudSong* iSong; |
|
104 |
|
105 TBool iProcessing; |
|
106 |
|
107 }; |
|
108 |
|
109 |
|
110 #endif |
|
111 |
|
112 // End of file |