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