1 /* |
|
2 * Copyright (c) 2005 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: Manipulates the doppler of the spectator. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CAMMSEMCSPECTATORDOPPLERCONTROL_H |
|
20 #define CAMMSEMCSPECTATORDOPPLERCONTROL_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 #include<ListenerDopplerControl.h> |
|
25 #include <DopplerData.h> |
|
26 #include "cammsdopplercontrol.h" |
|
27 #include <cmmaemcaudioplayer.h> // from MMAPI |
|
28 |
|
29 using multimedia :: MListenerDopplerControl; |
|
30 using multimedia :: KListenerDopplerEffectControl; |
|
31 |
|
32 // CONSTANTS |
|
33 _LIT(KAMMSEMCListenerDopplerControl, "DopplerControl"); |
|
34 |
|
35 // CLASS DECLARATION |
|
36 |
|
37 /** |
|
38 * |
|
39 * Controls for the Doppler Control effect for the Spectator. |
|
40 * This class delegates Doppler Control effect method calls to |
|
41 * MListenerDopplerControl. |
|
42 * |
|
43 * |
|
44 * @since 5.1 |
|
45 */ |
|
46 NONSHARABLE_CLASS(CAMMSEMCSpectatorDopplerControl): public CAMMSDopplerControl |
|
47 { |
|
48 public: // Constructors and destructor |
|
49 |
|
50 /** |
|
51 * Two-phased constructor. |
|
52 * @param aPlayer Player that has this control. |
|
53 */ |
|
54 static CAMMSEMCSpectatorDopplerControl* NewLC(CMMAPlayer* aPlayer); |
|
55 |
|
56 /** |
|
57 * Destructor. |
|
58 */ |
|
59 ~CAMMSEMCSpectatorDopplerControl(); |
|
60 |
|
61 public: // Functions from base classes |
|
62 const TDesC& ClassName() const; |
|
63 |
|
64 /** |
|
65 * Prepares the Control. |
|
66 */ |
|
67 void PrepareControlL(); |
|
68 |
|
69 /** |
|
70 * Deallocates the Control. |
|
71 */ |
|
72 void DeallocateControl(); |
|
73 |
|
74 private: |
|
75 /** |
|
76 * C++ constructor. |
|
77 * @param aPlayer Player that has this control. |
|
78 */ |
|
79 CAMMSEMCSpectatorDopplerControl(CMMAPlayer* aPlayer); |
|
80 |
|
81 public: |
|
82 |
|
83 void SetEnabledL(TBool aDopplerEnabled); |
|
84 |
|
85 TBool Enabled(); |
|
86 |
|
87 void SetVelocityCartesianL(TInt aX, TInt aY, TInt aZ); |
|
88 |
|
89 void VelocityCartesian(TInt& aX, TInt& aY, TInt& aZ); |
|
90 |
|
91 void SetVelocitySphericalL(TInt aAzimuth, TInt aElevation, |
|
92 TInt aRadius); |
|
93 |
|
94 private: |
|
95 |
|
96 CMMAPlayer *iMMAPlayer; |
|
97 /** |
|
98 * EMC Spectator Doppler Control |
|
99 */ |
|
100 |
|
101 CMultimediaFactory* iFactory; |
|
102 MStreamControl* iStreamControl; |
|
103 MListenerDopplerControl *iMListenerDopplerControl; |
|
104 }; |
|
105 |
|
106 #endif // CAMMSEMCSPECTATORDOPPLERCONTROL_H |
|
107 |
|
108 |
|