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