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 #ifndef VEISAMPLE_ARRAY_HANDLER_H |
|
21 #define VEISAMPLE_ARRAY_HANDLER_H |
|
22 |
|
23 #include <e32base.h> |
|
24 /** |
|
25 * CSampleArrayHandler container control class. |
|
26 * |
|
27 * Container for CVeiCutAudioView. |
|
28 */ |
|
29 class CSampleArrayHandler: public CBase |
|
30 { |
|
31 public: |
|
32 /** |
|
33 * Creates a CStoryboardContainer object, which will draw itself to aRect. |
|
34 * |
|
35 * @param aRect Frame rectangle for container. |
|
36 * @param aMovie movie being edited |
|
37 * |
|
38 * @return a pointer to the created instance of CStoryboardContainer |
|
39 */ |
|
40 static CSampleArrayHandler* NewL(); |
|
41 |
|
42 /** |
|
43 * Creates a CStoryboardContainer object, which will draw itself to aRect. |
|
44 * Leaves the created object in the cleanup stack. |
|
45 * |
|
46 * @param aRect Frame rectangle for container. |
|
47 * @param aMovie movie being edited |
|
48 * |
|
49 * @return a pointer to the created instance of CStoryboardContainer |
|
50 */ |
|
51 static CSampleArrayHandler* NewLC(); |
|
52 |
|
53 /** |
|
54 * Default constructor. |
|
55 * |
|
56 * @param aRect Frame rectangle for container. |
|
57 * @param aView pointer to the view. |
|
58 */ |
|
59 void ConstructL(); |
|
60 |
|
61 /** |
|
62 * Destructor. |
|
63 */ |
|
64 virtual ~CSampleArrayHandler(); |
|
65 |
|
66 public: |
|
67 |
|
68 void SetVisualizationArray( TInt8* aVisualization, TInt aResolution ); |
|
69 |
|
70 TInt8 Sample( const TInt aIndex )const; |
|
71 void ScaleAudioVisualization( const TInt8& aHeight ); |
|
72 TInt Size()const; |
|
73 TInt CurrentPoint()const; |
|
74 void SetCurrentPoint( const TTimeIntervalMicroSeconds& aTime ); |
|
75 void SetCutInPoint( const TTimeIntervalMicroSeconds& aCutInTime ); |
|
76 void SetCutOutPoint( const TTimeIntervalMicroSeconds& aCutOutTime ); |
|
77 TBool SampleCutted( const TInt aIndex )const; |
|
78 |
|
79 private: |
|
80 |
|
81 /** |
|
82 * Constructor. |
|
83 * |
|
84 * @param - |
|
85 */ |
|
86 CSampleArrayHandler(); |
|
87 |
|
88 private: |
|
89 //data |
|
90 |
|
91 TInt8* iVisualization; |
|
92 TInt iVisualizationSize; |
|
93 TInt8 iMaxSample; |
|
94 TInt8 iMaxSampleInCurrentScale; |
|
95 TReal iScaleFactor; |
|
96 |
|
97 TTimeIntervalMicroSeconds iCurrentTime; |
|
98 TTimeIntervalMicroSeconds iCutInTime; |
|
99 TTimeIntervalMicroSeconds iCutOutTime; |
|
100 |
|
101 TInt iCurrentIndex; |
|
102 TInt iCutInSampleIndex; |
|
103 TInt iCutOutSampleIndex; |
|
104 |
|
105 TInt iMarkOutCounter; |
|
106 TInt iMarkInCounter; |
|
107 |
|
108 TInt iPreviousScreenMode; |
|
109 TInt iCurrentScreenMode; |
|
110 |
|
111 TTimeIntervalMicroSeconds iMarkedInTime; |
|
112 TTimeIntervalMicroSeconds iMarkedOutTime; |
|
113 }; |
|
114 #endif |
|
115 |
|
116 // End of File |
|