1.1 --- a/epoc32/include/dopplerbase.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/dopplerbase.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,152 @@
1.4 -dopplerbase.h
1.5 +/*
1.6 +* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
1.7 +* All rights reserved.
1.8 +* This component and the accompanying materials are made available
1.9 +* 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
1.10 +* which accompanies this distribution, and is available
1.11 +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.12 +*
1.13 +* Initial Contributors:
1.14 +* Nokia Corporation - initial contribution.
1.15 +*
1.16 +* Contributors:
1.17 +*
1.18 +* Description: This is the definition of the doppler effect class.
1.19 +*
1.20 +*
1.21 +*/
1.22 +
1.23 +
1.24 +#ifndef CDOPPLER_H
1.25 +#define CDOPPLER_H
1.26 +
1.27 +// INCLUDES
1.28 +
1.29 +#include <e32base.h>
1.30 +#include <AudioEffectBase.h>
1.31 +#include <DopplerData.h>
1.32 +#include <MCustomInterface.h>
1.33 +
1.34 +// CLASS DECLARATION
1.35 +
1.36 +/**
1.37 +* This is the Doppler effect class for managing doppler settings.
1.38 +*
1.39 +* @lib DopplerEffect.lib
1.40 +* @since 3.0
1.41 +*/
1.42 +
1.43 +class CDoppler : public CAudioEffect
1.44 + {
1.45 +
1.46 + protected: // Constructor and Destructors
1.47 +
1.48 + /**
1.49 + *
1.50 + * Destructor
1.51 + */
1.52 + IMPORT_C virtual ~CDoppler();
1.53 +
1.54 + /**
1.55 + * Private C++ constructor for this class.
1.56 + */
1.57 + IMPORT_C CDoppler();
1.58 +
1.59 +
1.60 + public: // New functions
1.61 +
1.62 + /**
1.63 + * Get the velocity's cartesian settings
1.64 + * @since 3.0
1.65 + * @param aX Velocity in X direction (mm/s)
1.66 + * @param aY Velocity in Y direction (mm/s)
1.67 + * @param aZ Velocity in Z direction (mm/s)
1.68 + */
1.69 + IMPORT_C void CartesianVelocity( TInt32& aX, TInt32& aY, TInt32& aZ );
1.70 +
1.71 + /**
1.72 + * Get the current multiplier factor
1.73 + * @since 3.0
1.74 + * @return multiplier factor
1.75 + */
1.76 + IMPORT_C TUint32 Factor() const;
1.77 +
1.78 + /**
1.79 + * Get the maximum multiplier factor
1.80 + * @since 3.0
1.81 + * @return multiplier factor
1.82 + */
1.83 + IMPORT_C TUint32 FactorMax() const;
1.84 +
1.85 + /**
1.86 + * Sets the velocity in Cartesian coordinates of the sound source with respect to the listener.
1.87 + * @since 3.0
1.88 + * @param aX Velocity in X direction (mm/s)
1.89 + * @param aY Velocity in Y direction (mm/s)
1.90 + * @param aZ Velocity in Z direction (mm/s)
1.91 + * @return -
1.92 + */
1.93 + IMPORT_C void SetCartesianVelocityL( TInt32 aX, TInt32 aY, TInt32 aZ );
1.94 +
1.95 + /**
1.96 + * Sets the multiplier factor.
1.97 + * @since 3.0
1.98 + * @param aFactor Factor value in hundredths that ranges from 0 to FactorMax(),
1.99 + * where 100 corresponds to 1.00, 200 corresponds to 2.00, etc.
1.100 + * @return -
1.101 + */
1.102 + IMPORT_C void SetFactorL( TUint32 aFactor );
1.103 +
1.104 + /**
1.105 + * Sets the velocity in spherical coordinates of the sound source with respect to the listener.
1.106 + * @since 3.0
1.107 + * @param aAzimuth the Azimuth (thousandths of radians)
1.108 + * @param aElevation the elevation (thousandths of radians)
1.109 + * @param aRadius the radius (thousandths of radians)
1.110 + * @return -
1.111 + */
1.112 + IMPORT_C void SetSphericalVelocityL( TInt32 aAzimuth, TInt32 aElevation, TInt32 aRadius );
1.113 +
1.114 + /**
1.115 + * Gets the velocity's spherical coordinates settings.
1.116 + * @since 3.0
1.117 + * @param aAzimuth the Azimuth (thousandths of radians)
1.118 + * @param aElevation the elevation (thousandths of radians)
1.119 + * @param aRadius the radius (thousandths of radians)
1.120 + * @return -
1.121 + */
1.122 + IMPORT_C void SphericalVelocity( TInt32& aAzimuth, TInt32& aElevation, TInt32& aRadius );
1.123 +
1.124 + protected: // Functions from base classes
1.125 +
1.126 + /**
1.127 + * From CAudioEffect
1.128 + * Create a package of the effect data
1.129 + * @since 3.0
1.130 + * @return A descriptor containing the effect data.
1.131 + */
1.132 + IMPORT_C const TDesC8& DoEffectData();
1.133 +
1.134 + /**
1.135 + * From CAudioEffect
1.136 + * Internal function to unpack effect data
1.137 + * @since 3.0
1.138 + * @param aEffectDataBuffer Descriptor containing packed effect data
1.139 + * @return -
1.140 + */
1.141 + IMPORT_C void SetEffectData( const TDesC8& aEffectDataBuffer );
1.142 +
1.143 + protected:
1.144 +
1.145 + // Doppler data structure
1.146 + TEfDoppler iDopplerData;
1.147 + // Data package sent to server
1.148 + TEfDopplerDataPckg iDataPckgTo;
1.149 + // Data package received from server
1.150 + TEfDopplerDataPckg iDataPckgFrom;
1.151 +
1.152 + };
1.153 +
1.154 +#endif // of CDOPPLER_H
1.155 +
1.156 +// End of File