2 * Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: This is the definition of the doppler effect class.
26 #include <AudioEffectBase.h>
27 #include <DopplerData.h>
28 #include <MCustomInterface.h>
33 * This is the Doppler effect class for managing doppler settings.
35 * @lib DopplerEffect.lib
39 class CDoppler : public CAudioEffect
42 protected: // Constructor and Destructors
48 IMPORT_C virtual ~CDoppler();
51 * Private C++ constructor for this class.
56 public: // New functions
59 * Get the velocity's cartesian settings
61 * @param aX Velocity in X direction (mm/s)
62 * @param aY Velocity in Y direction (mm/s)
63 * @param aZ Velocity in Z direction (mm/s)
65 IMPORT_C void CartesianVelocity( TInt32& aX, TInt32& aY, TInt32& aZ );
68 * Get the current multiplier factor
70 * @return multiplier factor
72 IMPORT_C TUint32 Factor() const;
75 * Get the maximum multiplier factor
77 * @return multiplier factor
79 IMPORT_C TUint32 FactorMax() const;
82 * Sets the velocity in Cartesian coordinates of the sound source with respect to the listener.
84 * @param aX Velocity in X direction (mm/s)
85 * @param aY Velocity in Y direction (mm/s)
86 * @param aZ Velocity in Z direction (mm/s)
89 IMPORT_C void SetCartesianVelocityL( TInt32 aX, TInt32 aY, TInt32 aZ );
92 * Sets the multiplier factor.
94 * @param aFactor Factor value in hundredths that ranges from 0 to FactorMax(),
95 * where 100 corresponds to 1.00, 200 corresponds to 2.00, etc.
98 IMPORT_C void SetFactorL( TUint32 aFactor );
101 * Sets the velocity in spherical coordinates of the sound source with respect to the listener.
103 * @param aAzimuth the Azimuth (thousandths of radians)
104 * @param aElevation the elevation (thousandths of radians)
105 * @param aRadius the radius (thousandths of radians)
108 IMPORT_C void SetSphericalVelocityL( TInt32 aAzimuth, TInt32 aElevation, TInt32 aRadius );
111 * Gets the velocity's spherical coordinates settings.
113 * @param aAzimuth the Azimuth (thousandths of radians)
114 * @param aElevation the elevation (thousandths of radians)
115 * @param aRadius the radius (thousandths of radians)
118 IMPORT_C void SphericalVelocity( TInt32& aAzimuth, TInt32& aElevation, TInt32& aRadius );
120 protected: // Functions from base classes
124 * Create a package of the effect data
126 * @return A descriptor containing the effect data.
128 IMPORT_C const TDesC8& DoEffectData();
132 * Internal function to unpack effect data
134 * @param aEffectDataBuffer Descriptor containing packed effect data
137 IMPORT_C void SetEffectData( const TDesC8& aEffectDataBuffer );
141 // Doppler data structure
142 TEfDoppler iDopplerData;
143 // Data package sent to server
144 TEfDopplerDataPckg iDataPckgTo;
145 // Data package received from server
146 TEfDopplerDataPckg iDataPckgFrom;
150 #endif // of CDOPPLER_H