epoc32/include/dopplerbase.h
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
child 4 837f303aceeb
permissions -rw-r--r--
Final list of Symbian^2 public API header files
     1 /*
     2 * Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). 
     3 * All rights reserved.
     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".
     8 *
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    11 *
    12 * Contributors:
    13 *
    14 * Description:  This is the definition of the doppler effect class.
    15 *
    16 *
    17 */
    18 
    19 
    20 #ifndef CDOPPLER_H
    21 #define CDOPPLER_H
    22 
    23 // INCLUDES
    24 
    25 #include <e32base.h>
    26 #include <AudioEffectBase.h>
    27 #include <DopplerData.h>
    28 #include <MCustomInterface.h>
    29 
    30 // CLASS DECLARATION
    31 
    32 /**
    33 *  This is the Doppler effect class for managing doppler settings.
    34 *
    35 *  @lib DopplerEffect.lib
    36 *  @since 3.0
    37 */
    38 
    39 class CDoppler : public CAudioEffect
    40 	{
    41 
    42 	protected:		// Constructor and Destructors
    43 
    44 		/**
    45         *
    46         * Destructor
    47         */
    48 		IMPORT_C virtual ~CDoppler();
    49 
    50 		/**
    51 		* Private C++ constructor for this class.
    52 		*/
    53 		IMPORT_C CDoppler();
    54 
    55 
    56     public: // New functions
    57 
    58 		/**
    59         * Get the velocity's cartesian settings
    60         * @since 3.0
    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)
    64         */
    65 		IMPORT_C void CartesianVelocity( TInt32& aX, TInt32& aY, TInt32& aZ );
    66 
    67 		/**
    68         * Get the current multiplier factor
    69         * @since 3.0
    70         * @return multiplier factor
    71         */
    72 		IMPORT_C TUint32 Factor() const;
    73 
    74 		/**
    75         * Get the maximum multiplier factor
    76         * @since 3.0
    77         * @return multiplier factor
    78         */
    79 		IMPORT_C TUint32 FactorMax() const;
    80 
    81 		/**
    82         * Sets the velocity in Cartesian coordinates of the sound source with respect to the listener.
    83         * @since 3.0
    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)
    87         * @return -
    88         */
    89 		IMPORT_C void SetCartesianVelocityL( TInt32 aX, TInt32 aY, TInt32 aZ );
    90 
    91 		/**
    92         * Sets the multiplier factor.
    93         * @since 3.0
    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.
    96         * @return -
    97         */
    98 		IMPORT_C void SetFactorL( TUint32 aFactor );
    99 
   100 		/**
   101         * Sets the velocity in spherical coordinates of the sound source with respect to the listener.
   102         * @since 3.0
   103         * @param aAzimuth the Azimuth (thousandths of radians)
   104         * @param aElevation the elevation (thousandths of radians)
   105         * @param aRadius the radius (thousandths of radians)
   106         * @return -
   107         */
   108 		IMPORT_C void SetSphericalVelocityL( TInt32 aAzimuth, TInt32 aElevation, TInt32 aRadius );
   109 
   110 		/**
   111         * Gets the velocity's spherical coordinates settings.
   112         * @since 3.0
   113         * @param aAzimuth the Azimuth (thousandths of radians)
   114         * @param aElevation the elevation (thousandths of radians)
   115         * @param aRadius the radius (thousandths of radians)
   116         * @return -
   117         */
   118 		IMPORT_C void SphericalVelocity( TInt32& aAzimuth, TInt32& aElevation, TInt32& aRadius );
   119 
   120     protected:  // Functions from base classes
   121 
   122 		/**
   123 		* From CAudioEffect
   124 		* Create a package of the effect data
   125         * @since 3.0
   126         * @return A descriptor containing the effect data.
   127         */
   128 		IMPORT_C const TDesC8& DoEffectData();
   129 
   130 		/**
   131 		* From CAudioEffect
   132 		* Internal function to unpack effect data
   133         * @since 3.0
   134         * @param aEffectDataBuffer Descriptor containing packed effect data
   135         * @return -
   136         */
   137         IMPORT_C void SetEffectData( const TDesC8& aEffectDataBuffer );
   138 
   139 	protected:
   140 
   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;
   147 
   148 	};
   149 
   150 #endif	// of CDOPPLER_H
   151 
   152 // End of File