williamr@2: /* williamr@2: * Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). williamr@2: * All rights reserved. williamr@2: * This component and the accompanying materials are made available williamr@4: * under the terms of "Eclipse Public License v1.0" williamr@2: * which accompanies this distribution, and is available williamr@4: * at the URL "http://www.eclipse.org/legal/epl-v10.html". williamr@2: * williamr@2: * Initial Contributors: williamr@2: * Nokia Corporation - initial contribution. williamr@2: * williamr@2: * Contributors: williamr@2: * williamr@2: * Description: This is the definition of the doppler effect class. williamr@2: * williamr@2: * williamr@2: */ williamr@2: williamr@2: williamr@2: #ifndef CDOPPLER_H williamr@2: #define CDOPPLER_H williamr@2: williamr@2: // INCLUDES williamr@2: williamr@2: #include williamr@2: #include williamr@2: #include williamr@2: #include williamr@2: williamr@2: // CLASS DECLARATION williamr@2: williamr@2: /** williamr@2: * This is the Doppler effect class for managing doppler settings. williamr@2: * williamr@2: * @lib DopplerEffect.lib williamr@2: * @since 3.0 williamr@2: */ williamr@2: williamr@2: class CDoppler : public CAudioEffect williamr@2: { williamr@2: williamr@2: protected: // Constructor and Destructors williamr@2: williamr@2: /** williamr@2: * williamr@2: * Destructor williamr@2: */ williamr@2: IMPORT_C virtual ~CDoppler(); williamr@2: williamr@2: /** williamr@2: * Private C++ constructor for this class. williamr@2: */ williamr@2: IMPORT_C CDoppler(); williamr@2: williamr@2: williamr@2: public: // New functions williamr@2: williamr@2: /** williamr@2: * Get the velocity's cartesian settings williamr@2: * @since 3.0 williamr@2: * @param aX Velocity in X direction (mm/s) williamr@2: * @param aY Velocity in Y direction (mm/s) williamr@2: * @param aZ Velocity in Z direction (mm/s) williamr@2: */ williamr@2: IMPORT_C void CartesianVelocity( TInt32& aX, TInt32& aY, TInt32& aZ ); williamr@2: williamr@2: /** williamr@2: * Get the current multiplier factor williamr@2: * @since 3.0 williamr@2: * @return multiplier factor williamr@2: */ williamr@2: IMPORT_C TUint32 Factor() const; williamr@2: williamr@2: /** williamr@2: * Get the maximum multiplier factor williamr@2: * @since 3.0 williamr@2: * @return multiplier factor williamr@2: */ williamr@2: IMPORT_C TUint32 FactorMax() const; williamr@2: williamr@2: /** williamr@2: * Sets the velocity in Cartesian coordinates of the sound source with respect to the listener. williamr@2: * @since 3.0 williamr@2: * @param aX Velocity in X direction (mm/s) williamr@2: * @param aY Velocity in Y direction (mm/s) williamr@2: * @param aZ Velocity in Z direction (mm/s) williamr@2: * @return - williamr@2: */ williamr@2: IMPORT_C void SetCartesianVelocityL( TInt32 aX, TInt32 aY, TInt32 aZ ); williamr@2: williamr@2: /** williamr@2: * Sets the multiplier factor. williamr@2: * @since 3.0 williamr@2: * @param aFactor Factor value in hundredths that ranges from 0 to FactorMax(), williamr@2: * where 100 corresponds to 1.00, 200 corresponds to 2.00, etc. williamr@2: * @return - williamr@2: */ williamr@2: IMPORT_C void SetFactorL( TUint32 aFactor ); williamr@2: williamr@2: /** williamr@2: * Sets the velocity in spherical coordinates of the sound source with respect to the listener. williamr@2: * @since 3.0 williamr@2: * @param aAzimuth the Azimuth (thousandths of radians) williamr@2: * @param aElevation the elevation (thousandths of radians) williamr@2: * @param aRadius the radius (thousandths of radians) williamr@2: * @return - williamr@2: */ williamr@2: IMPORT_C void SetSphericalVelocityL( TInt32 aAzimuth, TInt32 aElevation, TInt32 aRadius ); williamr@2: williamr@2: /** williamr@2: * Gets the velocity's spherical coordinates settings. williamr@2: * @since 3.0 williamr@2: * @param aAzimuth the Azimuth (thousandths of radians) williamr@2: * @param aElevation the elevation (thousandths of radians) williamr@2: * @param aRadius the radius (thousandths of radians) williamr@2: * @return - williamr@2: */ williamr@2: IMPORT_C void SphericalVelocity( TInt32& aAzimuth, TInt32& aElevation, TInt32& aRadius ); williamr@2: williamr@2: protected: // Functions from base classes williamr@2: williamr@2: /** williamr@2: * From CAudioEffect williamr@2: * Create a package of the effect data williamr@2: * @since 3.0 williamr@2: * @return A descriptor containing the effect data. williamr@2: */ williamr@2: IMPORT_C const TDesC8& DoEffectData(); williamr@2: williamr@2: /** williamr@2: * From CAudioEffect williamr@2: * Internal function to unpack effect data williamr@2: * @since 3.0 williamr@2: * @param aEffectDataBuffer Descriptor containing packed effect data williamr@2: * @return - williamr@2: */ williamr@2: IMPORT_C void SetEffectData( const TDesC8& aEffectDataBuffer ); williamr@2: williamr@2: protected: williamr@2: williamr@2: // Doppler data structure williamr@2: TEfDoppler iDopplerData; williamr@2: // Data package sent to server williamr@2: TEfDopplerDataPckg iDataPckgTo; williamr@2: // Data package received from server williamr@2: TEfDopplerDataPckg iDataPckgFrom; williamr@2: williamr@2: }; williamr@2: williamr@2: #endif // of CDOPPLER_H williamr@2: williamr@2: // End of File