|
1 /* |
|
2 * Copyright (c) 2002 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: This class implements PitchControl functionality. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CMMAMIDIPITCHCONTROL_H |
|
20 #define CMMAMIDIPITCHCONTROL_H |
|
21 |
|
22 // EXTERNAL INCLUDES |
|
23 |
|
24 // INTERNAL INCLUDES |
|
25 #include "cmmacontrol.h" // base class |
|
26 |
|
27 // CONSTANTS |
|
28 |
|
29 // Constant for control name. Name is used in Java side to instantiate |
|
30 // Java Class which uses CMMAMIDIPitchControl. |
|
31 _LIT(KMIDIPitchControlName, "PitchControl"); |
|
32 |
|
33 // Maximum and minimun pitch values |
|
34 const TInt KMIDIPitchControlMaxPitch = 2400; |
|
35 const TInt KMIDIPitchControlMinPitch = -2400; |
|
36 |
|
37 |
|
38 class CMMAMIDIPlayer; |
|
39 |
|
40 // CLASS DECLARATION |
|
41 /** |
|
42 * This class implements MIDIPitchControl interface. |
|
43 * |
|
44 * |
|
45 */ |
|
46 NONSHARABLE_CLASS(CMMAMIDIPitchControl): public CMMAControl |
|
47 { |
|
48 public: |
|
49 /** |
|
50 * Creates new CMMAMIDIPitchControl. |
|
51 * |
|
52 * @param aPlayer Player that plays the content. |
|
53 */ |
|
54 static CMMAMIDIPitchControl* NewL(CMMAMIDIPlayer* aPlayer); |
|
55 |
|
56 /** |
|
57 * Destructor. |
|
58 */ |
|
59 ~CMMAMIDIPitchControl(); |
|
60 protected: |
|
61 /** |
|
62 * Constructor. |
|
63 * @param aPlayer Player that plays the content. |
|
64 */ |
|
65 CMMAMIDIPitchControl(CMMAMIDIPlayer* aPlayer); |
|
66 |
|
67 public: // From CMMAControl |
|
68 const TDesC& ClassName() const; |
|
69 |
|
70 public: // New methods |
|
71 /** |
|
72 * @return Pitch, if not available the default. |
|
73 */ |
|
74 TInt PitchL(); |
|
75 |
|
76 /** |
|
77 * @param aPitch Pitch to set in milli-beats per minute. |
|
78 * @return Actual Pitch set. |
|
79 */ |
|
80 TInt SetPitchL(TInt aPitch); |
|
81 |
|
82 /** |
|
83 * @return The maximum rate supported. |
|
84 */ |
|
85 TInt MaxPitchL(); |
|
86 |
|
87 /** |
|
88 * @return The minimum rate supported. |
|
89 */ |
|
90 TInt MinPitchL(); |
|
91 |
|
92 private: // Data |
|
93 /** |
|
94 * Used to control MIDI playback. |
|
95 */ |
|
96 CMMAMIDIPlayer* iPlayer; |
|
97 }; |
|
98 |
|
99 |
|
100 #endif // CMMAMIDIPITCHCONTROL_H |