williamr@2
|
1 |
/*
|
williamr@2
|
2 |
* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
|
williamr@2
|
3 |
* All rights reserved.
|
williamr@2
|
4 |
* This component and the accompanying materials are made available
|
williamr@4
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
williamr@2
|
6 |
* which accompanies this distribution, and is available
|
williamr@4
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
williamr@2
|
8 |
*
|
williamr@2
|
9 |
* Initial Contributors:
|
williamr@2
|
10 |
* Nokia Corporation - initial contribution.
|
williamr@2
|
11 |
*
|
williamr@2
|
12 |
* Contributors:
|
williamr@2
|
13 |
*
|
williamr@2
|
14 |
* Description: This is the definition of the doppler effect class.
|
williamr@2
|
15 |
*
|
williamr@2
|
16 |
*
|
williamr@2
|
17 |
*/
|
williamr@2
|
18 |
|
williamr@2
|
19 |
|
williamr@2
|
20 |
#ifndef CDOPPLER_H
|
williamr@2
|
21 |
#define CDOPPLER_H
|
williamr@2
|
22 |
|
williamr@2
|
23 |
// INCLUDES
|
williamr@2
|
24 |
|
williamr@2
|
25 |
#include <e32base.h>
|
williamr@2
|
26 |
#include <AudioEffectBase.h>
|
williamr@2
|
27 |
#include <DopplerData.h>
|
williamr@2
|
28 |
#include <MCustomInterface.h>
|
williamr@2
|
29 |
|
williamr@2
|
30 |
// CLASS DECLARATION
|
williamr@2
|
31 |
|
williamr@2
|
32 |
/**
|
williamr@2
|
33 |
* This is the Doppler effect class for managing doppler settings.
|
williamr@2
|
34 |
*
|
williamr@2
|
35 |
* @lib DopplerEffect.lib
|
williamr@2
|
36 |
* @since 3.0
|
williamr@2
|
37 |
*/
|
williamr@2
|
38 |
|
williamr@2
|
39 |
class CDoppler : public CAudioEffect
|
williamr@2
|
40 |
{
|
williamr@2
|
41 |
|
williamr@2
|
42 |
protected: // Constructor and Destructors
|
williamr@2
|
43 |
|
williamr@2
|
44 |
/**
|
williamr@2
|
45 |
*
|
williamr@2
|
46 |
* Destructor
|
williamr@2
|
47 |
*/
|
williamr@2
|
48 |
IMPORT_C virtual ~CDoppler();
|
williamr@2
|
49 |
|
williamr@2
|
50 |
/**
|
williamr@2
|
51 |
* Private C++ constructor for this class.
|
williamr@2
|
52 |
*/
|
williamr@2
|
53 |
IMPORT_C CDoppler();
|
williamr@2
|
54 |
|
williamr@2
|
55 |
|
williamr@2
|
56 |
public: // New functions
|
williamr@2
|
57 |
|
williamr@2
|
58 |
/**
|
williamr@2
|
59 |
* Get the velocity's cartesian settings
|
williamr@2
|
60 |
* @since 3.0
|
williamr@2
|
61 |
* @param aX Velocity in X direction (mm/s)
|
williamr@2
|
62 |
* @param aY Velocity in Y direction (mm/s)
|
williamr@2
|
63 |
* @param aZ Velocity in Z direction (mm/s)
|
williamr@2
|
64 |
*/
|
williamr@2
|
65 |
IMPORT_C void CartesianVelocity( TInt32& aX, TInt32& aY, TInt32& aZ );
|
williamr@2
|
66 |
|
williamr@2
|
67 |
/**
|
williamr@2
|
68 |
* Get the current multiplier factor
|
williamr@2
|
69 |
* @since 3.0
|
williamr@2
|
70 |
* @return multiplier factor
|
williamr@2
|
71 |
*/
|
williamr@2
|
72 |
IMPORT_C TUint32 Factor() const;
|
williamr@2
|
73 |
|
williamr@2
|
74 |
/**
|
williamr@2
|
75 |
* Get the maximum multiplier factor
|
williamr@2
|
76 |
* @since 3.0
|
williamr@2
|
77 |
* @return multiplier factor
|
williamr@2
|
78 |
*/
|
williamr@2
|
79 |
IMPORT_C TUint32 FactorMax() const;
|
williamr@2
|
80 |
|
williamr@2
|
81 |
/**
|
williamr@2
|
82 |
* Sets the velocity in Cartesian coordinates of the sound source with respect to the listener.
|
williamr@2
|
83 |
* @since 3.0
|
williamr@2
|
84 |
* @param aX Velocity in X direction (mm/s)
|
williamr@2
|
85 |
* @param aY Velocity in Y direction (mm/s)
|
williamr@2
|
86 |
* @param aZ Velocity in Z direction (mm/s)
|
williamr@2
|
87 |
* @return -
|
williamr@2
|
88 |
*/
|
williamr@2
|
89 |
IMPORT_C void SetCartesianVelocityL( TInt32 aX, TInt32 aY, TInt32 aZ );
|
williamr@2
|
90 |
|
williamr@2
|
91 |
/**
|
williamr@2
|
92 |
* Sets the multiplier factor.
|
williamr@2
|
93 |
* @since 3.0
|
williamr@2
|
94 |
* @param aFactor Factor value in hundredths that ranges from 0 to FactorMax(),
|
williamr@2
|
95 |
* where 100 corresponds to 1.00, 200 corresponds to 2.00, etc.
|
williamr@2
|
96 |
* @return -
|
williamr@2
|
97 |
*/
|
williamr@2
|
98 |
IMPORT_C void SetFactorL( TUint32 aFactor );
|
williamr@2
|
99 |
|
williamr@2
|
100 |
/**
|
williamr@2
|
101 |
* Sets the velocity in spherical coordinates of the sound source with respect to the listener.
|
williamr@2
|
102 |
* @since 3.0
|
williamr@2
|
103 |
* @param aAzimuth the Azimuth (thousandths of radians)
|
williamr@2
|
104 |
* @param aElevation the elevation (thousandths of radians)
|
williamr@2
|
105 |
* @param aRadius the radius (thousandths of radians)
|
williamr@2
|
106 |
* @return -
|
williamr@2
|
107 |
*/
|
williamr@2
|
108 |
IMPORT_C void SetSphericalVelocityL( TInt32 aAzimuth, TInt32 aElevation, TInt32 aRadius );
|
williamr@2
|
109 |
|
williamr@2
|
110 |
/**
|
williamr@2
|
111 |
* Gets the velocity's spherical coordinates settings.
|
williamr@2
|
112 |
* @since 3.0
|
williamr@2
|
113 |
* @param aAzimuth the Azimuth (thousandths of radians)
|
williamr@2
|
114 |
* @param aElevation the elevation (thousandths of radians)
|
williamr@2
|
115 |
* @param aRadius the radius (thousandths of radians)
|
williamr@2
|
116 |
* @return -
|
williamr@2
|
117 |
*/
|
williamr@2
|
118 |
IMPORT_C void SphericalVelocity( TInt32& aAzimuth, TInt32& aElevation, TInt32& aRadius );
|
williamr@2
|
119 |
|
williamr@2
|
120 |
protected: // Functions from base classes
|
williamr@2
|
121 |
|
williamr@2
|
122 |
/**
|
williamr@2
|
123 |
* From CAudioEffect
|
williamr@2
|
124 |
* Create a package of the effect data
|
williamr@2
|
125 |
* @since 3.0
|
williamr@2
|
126 |
* @return A descriptor containing the effect data.
|
williamr@2
|
127 |
*/
|
williamr@2
|
128 |
IMPORT_C const TDesC8& DoEffectData();
|
williamr@2
|
129 |
|
williamr@2
|
130 |
/**
|
williamr@2
|
131 |
* From CAudioEffect
|
williamr@2
|
132 |
* Internal function to unpack effect data
|
williamr@2
|
133 |
* @since 3.0
|
williamr@2
|
134 |
* @param aEffectDataBuffer Descriptor containing packed effect data
|
williamr@2
|
135 |
* @return -
|
williamr@2
|
136 |
*/
|
williamr@2
|
137 |
IMPORT_C void SetEffectData( const TDesC8& aEffectDataBuffer );
|
williamr@2
|
138 |
|
williamr@2
|
139 |
protected:
|
williamr@2
|
140 |
|
williamr@2
|
141 |
// Doppler data structure
|
williamr@2
|
142 |
TEfDoppler iDopplerData;
|
williamr@2
|
143 |
// Data package sent to server
|
williamr@2
|
144 |
TEfDopplerDataPckg iDataPckgTo;
|
williamr@2
|
145 |
// Data package received from server
|
williamr@2
|
146 |
TEfDopplerDataPckg iDataPckgFrom;
|
williamr@2
|
147 |
|
williamr@2
|
148 |
};
|
williamr@2
|
149 |
|
williamr@2
|
150 |
#endif // of CDOPPLER_H
|
williamr@2
|
151 |
|
williamr@2
|
152 |
// End of File
|