os/mm/mm_pub/audio_effects_api/inc/DopplerBase.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
sl@0
     1
/*
sl@0
     2
* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). 
sl@0
     3
* All rights reserved.
sl@0
     4
* This component and the accompanying materials are made available
sl@0
     5
* under the terms of "Eclipse Public License v1.0"
sl@0
     6
* which accompanies this distribution, and is available
sl@0
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     8
*
sl@0
     9
* Initial Contributors:
sl@0
    10
* Nokia Corporation - initial contribution.
sl@0
    11
*
sl@0
    12
* Contributors:
sl@0
    13
*
sl@0
    14
* Description:  This is the definition of the doppler effect class.
sl@0
    15
*
sl@0
    16
*
sl@0
    17
*/
sl@0
    18
sl@0
    19
sl@0
    20
#ifndef CDOPPLER_H
sl@0
    21
#define CDOPPLER_H
sl@0
    22
sl@0
    23
// INCLUDES
sl@0
    24
sl@0
    25
#include <e32base.h>
sl@0
    26
#include <AudioEffectBase.h>
sl@0
    27
#include <DopplerData.h>
sl@0
    28
#include <MCustomInterface.h>
sl@0
    29
sl@0
    30
// CLASS DECLARATION
sl@0
    31
sl@0
    32
/**
sl@0
    33
*  This is the Doppler effect class for managing doppler settings.
sl@0
    34
*
sl@0
    35
*  @lib DopplerEffect.lib
sl@0
    36
*  @since 3.0
sl@0
    37
*/
sl@0
    38
sl@0
    39
class CDoppler : public CAudioEffect
sl@0
    40
	{
sl@0
    41
sl@0
    42
	protected:		// Constructor and Destructors
sl@0
    43
sl@0
    44
		/**
sl@0
    45
        *
sl@0
    46
        * Destructor
sl@0
    47
        */
sl@0
    48
		IMPORT_C virtual ~CDoppler();
sl@0
    49
sl@0
    50
		/**
sl@0
    51
		* Private C++ constructor for this class.
sl@0
    52
		*/
sl@0
    53
		IMPORT_C CDoppler();
sl@0
    54
sl@0
    55
sl@0
    56
    public: // New functions
sl@0
    57
sl@0
    58
		/**
sl@0
    59
        * Get the velocity's cartesian settings
sl@0
    60
        * @since 3.0
sl@0
    61
        * @param aX Velocity in X direction (mm/s)
sl@0
    62
        * @param aY Velocity in Y direction (mm/s)
sl@0
    63
        * @param aZ Velocity in Z direction (mm/s)
sl@0
    64
        */
sl@0
    65
		IMPORT_C void CartesianVelocity( TInt32& aX, TInt32& aY, TInt32& aZ );
sl@0
    66
sl@0
    67
		/**
sl@0
    68
        * Get the current multiplier factor
sl@0
    69
        * @since 3.0
sl@0
    70
        * @return multiplier factor
sl@0
    71
        */
sl@0
    72
		IMPORT_C TUint32 Factor() const;
sl@0
    73
sl@0
    74
		/**
sl@0
    75
        * Get the maximum multiplier factor
sl@0
    76
        * @since 3.0
sl@0
    77
        * @return multiplier factor
sl@0
    78
        */
sl@0
    79
		IMPORT_C TUint32 FactorMax() const;
sl@0
    80
sl@0
    81
		/**
sl@0
    82
        * Sets the velocity in Cartesian coordinates of the sound source with respect to the listener.
sl@0
    83
        * @since 3.0
sl@0
    84
        * @param aX Velocity in X direction (mm/s)
sl@0
    85
        * @param aY Velocity in Y direction (mm/s)
sl@0
    86
        * @param aZ Velocity in Z direction (mm/s)
sl@0
    87
        * @return -
sl@0
    88
        */
sl@0
    89
		IMPORT_C void SetCartesianVelocityL( TInt32 aX, TInt32 aY, TInt32 aZ );
sl@0
    90
sl@0
    91
		/**
sl@0
    92
        * Sets the multiplier factor.
sl@0
    93
        * @since 3.0
sl@0
    94
        * @param aFactor Factor value in hundredths that ranges from 0 to FactorMax(),
sl@0
    95
        *                where 100 corresponds to 1.00, 200 corresponds to 2.00, etc.
sl@0
    96
        * @return -
sl@0
    97
        */
sl@0
    98
		IMPORT_C void SetFactorL( TUint32 aFactor );
sl@0
    99
sl@0
   100
		/**
sl@0
   101
        * Sets the velocity in spherical coordinates of the sound source with respect to the listener.
sl@0
   102
        * @since 3.0
sl@0
   103
        * @param aAzimuth the Azimuth (thousandths of radians)
sl@0
   104
        * @param aElevation the elevation (thousandths of radians)
sl@0
   105
        * @param aRadius the radius (thousandths of radians)
sl@0
   106
        * @return -
sl@0
   107
        */
sl@0
   108
		IMPORT_C void SetSphericalVelocityL( TInt32 aAzimuth, TInt32 aElevation, TInt32 aRadius );
sl@0
   109
sl@0
   110
		/**
sl@0
   111
        * Gets the velocity's spherical coordinates settings.
sl@0
   112
        * @since 3.0
sl@0
   113
        * @param aAzimuth the Azimuth (thousandths of radians)
sl@0
   114
        * @param aElevation the elevation (thousandths of radians)
sl@0
   115
        * @param aRadius the radius (thousandths of radians)
sl@0
   116
        * @return -
sl@0
   117
        */
sl@0
   118
		IMPORT_C void SphericalVelocity( TInt32& aAzimuth, TInt32& aElevation, TInt32& aRadius );
sl@0
   119
sl@0
   120
    protected:  // Functions from base classes
sl@0
   121
sl@0
   122
		/**
sl@0
   123
		* From CAudioEffect
sl@0
   124
		* Create a package of the effect data
sl@0
   125
        * @since 3.0
sl@0
   126
        * @return A descriptor containing the effect data.
sl@0
   127
        */
sl@0
   128
		IMPORT_C const TDesC8& DoEffectData();
sl@0
   129
sl@0
   130
		/**
sl@0
   131
		* From CAudioEffect
sl@0
   132
		* Internal function to unpack effect data
sl@0
   133
        * @since 3.0
sl@0
   134
        * @param aEffectDataBuffer Descriptor containing packed effect data
sl@0
   135
        * @return -
sl@0
   136
        */
sl@0
   137
        IMPORT_C void SetEffectData( const TDesC8& aEffectDataBuffer );
sl@0
   138
sl@0
   139
	protected:
sl@0
   140
sl@0
   141
		// Doppler data structure
sl@0
   142
		TEfDoppler iDopplerData;
sl@0
   143
		// Data package sent to server
sl@0
   144
		TEfDopplerDataPckg iDataPckgTo;
sl@0
   145
		// Data package received from server
sl@0
   146
		TEfDopplerDataPckg iDataPckgFrom;
sl@0
   147
sl@0
   148
	};
sl@0
   149
sl@0
   150
#endif	// of CDOPPLER_H
sl@0
   151
sl@0
   152
// End of File