os/mm/mm_pub/audio_effects_api/inc/EnvironmentalReverbBase.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) 2006 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 Environmental Reverb effect class.
sl@0
    15
*
sl@0
    16
*/
sl@0
    17
sl@0
    18
sl@0
    19
#ifndef CENVIRONMENTALREVERB_H
sl@0
    20
#define CENVIRONMENTALREVERB_H
sl@0
    21
sl@0
    22
// INCLUDES
sl@0
    23
sl@0
    24
#include <e32base.h>
sl@0
    25
#include <AudioEffectBase.h>
sl@0
    26
#include <EnvironmentalReverbData.h>
sl@0
    27
#include <MCustomInterface.h>
sl@0
    28
sl@0
    29
const TUid KUidEnvironmentalReverbEffect = {0x10203837};
sl@0
    30
sl@0
    31
// FORWARD DELCARATION
sl@0
    32
class CMdaAudioConvertUtility;
sl@0
    33
class CMdaAudioPlayerUtility;
sl@0
    34
class CMdaAudioRecorderUtility;
sl@0
    35
class CMdaAudioInputStream;
sl@0
    36
class CMdaAudioOutputStream;
sl@0
    37
class CMdaAudioToneUtility;
sl@0
    38
class CCustomCommandUtility;
sl@0
    39
class CCustomInterfaceUtility;
sl@0
    40
class CMMFDevSound;
sl@0
    41
class CMidiClientUtility;
sl@0
    42
class CDrmPlayerUtility;
sl@0
    43
class CVideoPlayerUtility;
sl@0
    44
sl@0
    45
// CLASS DECLARATION
sl@0
    46
sl@0
    47
/**
sl@0
    48
*  This is the Environmental Reverb effect class for managing reverb settings.
sl@0
    49
*
sl@0
    50
*  @lib EnvironmentalReverbEffect.lib
sl@0
    51
*  @since 3.0
sl@0
    52
*/
sl@0
    53
sl@0
    54
class CEnvironmentalReverb : public CAudioEffect
sl@0
    55
    {
sl@0
    56
sl@0
    57
    public:     //New Functions
sl@0
    58
sl@0
    59
        /**
sl@0
    60
        * Factory function for creating the audio reverb object.
sl@0
    61
        * @since 3.0
sl@0
    62
        * @return pointer to CEnvironmentalReverb object
sl@0
    63
        */
sl@0
    64
        IMPORT_C static CEnvironmentalReverb* NewL();
sl@0
    65
sl@0
    66
        /**
sl@0
    67
        * Factory function for creating the audio reverb object.
sl@0
    68
        * @since 3.0
sl@0
    69
        * @param aUtility A reference to a convert utility
sl@0
    70
        * @return pointer to CEnvironmentalReverb object
sl@0
    71
        */
sl@0
    72
        IMPORT_C static CEnvironmentalReverb* NewL( CMdaAudioConvertUtility& aUtility );
sl@0
    73
sl@0
    74
        /**
sl@0
    75
        * Factory function for creating the audio reverb object.
sl@0
    76
        * @since 3.0
sl@0
    77
        * @param aUtility A reference to an audio input stream utility
sl@0
    78
        * @return pointer to CEnvironmentalReverb object
sl@0
    79
        */
sl@0
    80
        IMPORT_C static CEnvironmentalReverb* NewL( CMdaAudioInputStream& aUtility );
sl@0
    81
sl@0
    82
        /**
sl@0
    83
        * Factory function for creating the audio reverb object.
sl@0
    84
        * @since 3.0
sl@0
    85
        * @param aUtility A reference to an audio output stream utility
sl@0
    86
        * @return pointer to CEnvironmentalReverb object
sl@0
    87
        */
sl@0
    88
        IMPORT_C static CEnvironmentalReverb* NewL( CMdaAudioOutputStream& aUtility );
sl@0
    89
sl@0
    90
        /**
sl@0
    91
        * Factory function for creating the audio reverb object.
sl@0
    92
        * @since 3.0
sl@0
    93
        * @param aUtility A reference to an audio player utility
sl@0
    94
        * @return pointer to CEnvironmentalReverb object
sl@0
    95
        */
sl@0
    96
        IMPORT_C static CEnvironmentalReverb* NewL( CMdaAudioPlayerUtility& aUtility );
sl@0
    97
sl@0
    98
        /**
sl@0
    99
        * Factory function for creating the audio reverb object.
sl@0
   100
        * @since 3.0
sl@0
   101
        * @param aUtility A reference to an audio record utility
sl@0
   102
        * @param aRecordStream ETrue if the effect is to be applied to the recording,
sl@0
   103
        *                      EFalse if the effect is to be applied only to the playback
sl@0
   104
        * @return pointer to CEnvironmentalReverb object
sl@0
   105
        */
sl@0
   106
        IMPORT_C static CEnvironmentalReverb* NewL( CMdaAudioRecorderUtility& aUtility, TBool aRecordStream );
sl@0
   107
sl@0
   108
        /**
sl@0
   109
        * Factory function for creating the audio reverb object.
sl@0
   110
        * @since 3.0
sl@0
   111
        * @param aUtility A reference to an audio tone utility
sl@0
   112
        * @return pointer to CEnvironmentalReverb object
sl@0
   113
        */
sl@0
   114
        IMPORT_C static CEnvironmentalReverb* NewL( CMdaAudioToneUtility& aUtility );
sl@0
   115
sl@0
   116
        /**
sl@0
   117
        * Factory function for creating the audio reverb object.
sl@0
   118
        * @since 3.0
sl@0
   119
        * @param aDevSound A reference to a DevSound instance
sl@0
   120
        * @return pointer to CEnvironmentalReverb object
sl@0
   121
        */
sl@0
   122
        IMPORT_C static CEnvironmentalReverb* NewL( CMMFDevSound& aDevSound );
sl@0
   123
sl@0
   124
        /**
sl@0
   125
        * Factory function for creating the audio reverb object.
sl@0
   126
        * @since 3.0
sl@0
   127
        * @param aUtility A reference to a custom command utility
sl@0
   128
        * @return pointer to CEnvironmentalReverb object
sl@0
   129
        */
sl@0
   130
        IMPORT_C static CEnvironmentalReverb* NewL( CCustomCommandUtility* aUtility );
sl@0
   131
sl@0
   132
        /**
sl@0
   133
        * Factory function for creating the audio reverb object.
sl@0
   134
        * @since 3.0
sl@0
   135
        * @param aCustomInterface A reference to a custom interface
sl@0
   136
        * @return pointer to CEnvironmentalReverb object
sl@0
   137
        */
sl@0
   138
        IMPORT_C static CEnvironmentalReverb* NewL( MCustomInterface& aCustomInterface );
sl@0
   139
sl@0
   140
        /**
sl@0
   141
        * Factory function for creating the audio reverb object.
sl@0
   142
        * @since 3.0
sl@0
   143
        * @param aUtility A reference to a CMidiClientUtility object
sl@0
   144
        * @return pointer to CEnvironmentalReverb object
sl@0
   145
        */
sl@0
   146
        IMPORT_C static CEnvironmentalReverb* NewL( CMidiClientUtility& aUtility );
sl@0
   147
sl@0
   148
        /**
sl@0
   149
        * Factory function for creating the audio equalizer object.
sl@0
   150
        * @since 3.0
sl@0
   151
        * @param CDrmPlayerUtility A reference to a CDrmPlayerUtility object
sl@0
   152
        * @return pointer to CAudioEqualizer object
sl@0
   153
        */
sl@0
   154
        IMPORT_C static CEnvironmentalReverb* NewL( CDrmPlayerUtility& aUtility );
sl@0
   155
sl@0
   156
        /**
sl@0
   157
        * Factory function for creating the audio equalizer object.
sl@0
   158
        * @since 3.2
sl@0
   159
        * @param CVideoPlayerUtility A reference to a CVideoPlayerUtility object
sl@0
   160
        * @return pointer to CAudioEqualizer object
sl@0
   161
        */
sl@0
   162
        IMPORT_C static CEnvironmentalReverb* NewL( CVideoPlayerUtility& aUtility );
sl@0
   163
sl@0
   164
        /**
sl@0
   165
        *
sl@0
   166
        * Destructor
sl@0
   167
        */
sl@0
   168
        IMPORT_C virtual ~CEnvironmentalReverb();
sl@0
   169
sl@0
   170
        /**
sl@0
   171
        * Gets the decay HF Ratio in hundredths
sl@0
   172
        * @since 3.0
sl@0
   173
        * @return decay HF Ratio
sl@0
   174
        */
sl@0
   175
        IMPORT_C TUint32 DecayHFRatio() const;
sl@0
   176
sl@0
   177
        /**
sl@0
   178
        * Gets the reverb decay HF Ratio minimum and maximum in hundredths.
sl@0
   179
        * @since 3.0
sl@0
   180
        * @param aMin Minimum decay HF Ratio
sl@0
   181
        * @param aMax Maximum decay HF Ratio
sl@0
   182
        */
sl@0
   183
        IMPORT_C void DecayHFRatioRange(TUint32& aMin, TUint32& aMax);
sl@0
   184
sl@0
   185
        /**
sl@0
   186
        * Gets the decay time in milliseconds
sl@0
   187
        * @since 3.0
sl@0
   188
        * @return decay time
sl@0
   189
        */
sl@0
   190
        IMPORT_C TUint32 DecayTime() const;
sl@0
   191
sl@0
   192
        /**
sl@0
   193
        * Gets the allowable reverb decay time range in milliseconds.
sl@0
   194
        * @since 3.0
sl@0
   195
        * @param aMin Minimum decay time in milliseconds
sl@0
   196
        * @param aMax Maximum decay time in milliseconds
sl@0
   197
        */
sl@0
   198
        IMPORT_C void DecayTimeRange(TUint32& aMin, TUint32& aMax);
sl@0
   199
sl@0
   200
        /**
sl@0
   201
        * Gets the density current value as a percentage in hundredths
sl@0
   202
        * @since 3.0
sl@0
   203
        * @return density value
sl@0
   204
        */
sl@0
   205
        IMPORT_C TUint32 Density() const;
sl@0
   206
sl@0
   207
        /**
sl@0
   208
        * Gets the diffusion current value as a percentage in hundredths.
sl@0
   209
        * @since 3.0
sl@0
   210
        * @return diffusion value
sl@0
   211
        */
sl@0
   212
        IMPORT_C TUint32 Diffusion() const;
sl@0
   213
sl@0
   214
        /**
sl@0
   215
        * Gets the reverb reflections delay in ms.
sl@0
   216
        * @since 3.0
sl@0
   217
        * @return reverb reflections delay
sl@0
   218
        */
sl@0
   219
        IMPORT_C TUint32 ReflectionsDelay() const;
sl@0
   220
sl@0
   221
        /**
sl@0
   222
        * Gets the reverb reflections delay maximum in milliseconds.
sl@0
   223
        * @since 3.0
sl@0
   224
        * @return reverb reflections delay maximum
sl@0
   225
        */
sl@0
   226
        IMPORT_C TUint32 ReflectionsDelayMax() const;
sl@0
   227
sl@0
   228
        /**
sl@0
   229
        * Gets the reverb reflections level in mB
sl@0
   230
        * @since 3.0
sl@0
   231
        * @return Reverb reflections level
sl@0
   232
        */
sl@0
   233
        IMPORT_C TInt32 ReflectionsLevel() const;
sl@0
   234
sl@0
   235
        /**
sl@0
   236
        * Gets the reverb reflections level maximum and minimum in mB
sl@0
   237
        * @since 3.0
sl@0
   238
        * @param aMin Minimum reflections level
sl@0
   239
        * @param aMax Maximum reflections level
sl@0
   240
        */
sl@0
   241
        IMPORT_C void ReflectionLevelRange( TInt32& aMin, TInt32& aMax );
sl@0
   242
sl@0
   243
        /**
sl@0
   244
        * Gets the reverb delay in milliseconds
sl@0
   245
        * @since 3.0
sl@0
   246
        * @return reverb delay
sl@0
   247
        */
sl@0
   248
        IMPORT_C TUint32 ReverbDelay() const;
sl@0
   249
sl@0
   250
        /**
sl@0
   251
        * Gets the reverb delay maximum in milliseconds
sl@0
   252
        * @since 3.0
sl@0
   253
        * @return reverb delay maximum
sl@0
   254
        */
sl@0
   255
        IMPORT_C TUint32 ReverbDelayMax() const;
sl@0
   256
sl@0
   257
        /**
sl@0
   258
        * Gets the reverb current level in mB
sl@0
   259
        * @since 3.0
sl@0
   260
        * @return reverb current level
sl@0
   261
        */
sl@0
   262
        IMPORT_C TInt32 ReverbLevel() const;
sl@0
   263
sl@0
   264
        /**
sl@0
   265
        * Gets the reverb current level maximum and minimum in mB
sl@0
   266
        * @since 3.0
sl@0
   267
        * @param aMin Minimum current level
sl@0
   268
        * @param aMax Maximum current level
sl@0
   269
        * @return -
sl@0
   270
        */
sl@0
   271
        IMPORT_C void ReverbLevelRange( TInt32& aMin, TInt32& aMax );
sl@0
   272
sl@0
   273
        /**
sl@0
   274
        * Gets the room HF level current ratio
sl@0
   275
        * @since 3.0
sl@0
   276
        * @return room HF level ratio
sl@0
   277
        */
sl@0
   278
        IMPORT_C TInt32 RoomHFLevel() const;
sl@0
   279
sl@0
   280
        /**
sl@0
   281
        * Gets the room HF level maximum and minimum ratios
sl@0
   282
        * @since 3.0
sl@0
   283
        * @param aMin Minimum current room HF level
sl@0
   284
        * @param aMax Maximum current room HF level
sl@0
   285
        * @return -
sl@0
   286
        */
sl@0
   287
        IMPORT_C void RoomHFLevelRange( TInt32& aMin, TInt32& aMax );
sl@0
   288
sl@0
   289
        /**
sl@0
   290
        * Gets the room level current value in mB
sl@0
   291
        * @since 3.0
sl@0
   292
        * @return room level value
sl@0
   293
        */
sl@0
   294
        IMPORT_C TInt32 RoomLevel() const;
sl@0
   295
sl@0
   296
        /**
sl@0
   297
        * Gets the room level maximum and minimum in mB
sl@0
   298
        * @since 3.0
sl@0
   299
        * @param aMin Minimum current room level
sl@0
   300
        * @param aMax Maximum current room level
sl@0
   301
        * @return -
sl@0
   302
        */
sl@0
   303
        IMPORT_C void RoomLevelRange( TInt32& aMin, TInt32& aMax );
sl@0
   304
sl@0
   305
        /**
sl@0
   306
        * Sets the decay HF Ratio in hundredths
sl@0
   307
        * @since 3.0
sl@0
   308
        * @param aDecayHFRatio The decay high frequence ratio in hundredths
sl@0
   309
        * @return -
sl@0
   310
        */
sl@0
   311
        IMPORT_C void SetDecayHFRatioL( TUint32 aDecayHFRatio );
sl@0
   312
sl@0
   313
        /**
sl@0
   314
        * Sets the decay time in millisecond
sl@0
   315
        * @since 3.0
sl@0
   316
        * @param aDecayTime Decay time in ms
sl@0
   317
        */
sl@0
   318
        IMPORT_C void SetDecayTimeL( TUint32 aDecayTime );
sl@0
   319
sl@0
   320
        /**
sl@0
   321
        * Sets the density value as percentage in hundredths
sl@0
   322
        * @since 3.0
sl@0
   323
        * @param aDensity The density.
sl@0
   324
        */
sl@0
   325
        IMPORT_C void SetDensityL( TUint32 aDensity );
sl@0
   326
sl@0
   327
        /**
sl@0
   328
        * Sets the diffusion value as a percentage in hundredths
sl@0
   329
        * @since 3.0
sl@0
   330
        * @param aDiffusion The diffusion.
sl@0
   331
        */
sl@0
   332
        IMPORT_C void SetDiffusionL( TUint32 aDiffusion );
sl@0
   333
sl@0
   334
        /**
sl@0
   335
        * Sets the reverb reflections delay
sl@0
   336
        * @since 3.0
sl@0
   337
        * @param aRefectionsDelay The reflection delay in ms.
sl@0
   338
        */
sl@0
   339
        IMPORT_C void SetReflectionsDelayL( TUint32 aReflectionsDelay );
sl@0
   340
sl@0
   341
        /**
sl@0
   342
        * Sets the reverb reflections level in milli-dB
sl@0
   343
        * @since 3.0
sl@0
   344
        * @param aRefectionsLevel The reflection level in mB
sl@0
   345
        */
sl@0
   346
        IMPORT_C void SetReflectionsLevelL( TInt32 aReflectionsLevel );
sl@0
   347
sl@0
   348
        /**
sl@0
   349
        * Sets the reverb delay
sl@0
   350
        * @since 3.0
sl@0
   351
        * @param aReverbDelay The reverb delay in ms
sl@0
   352
        */
sl@0
   353
        IMPORT_C void SetReverbDelayL( TUint32 aReverbDelay );
sl@0
   354
sl@0
   355
        /**
sl@0
   356
        * Sets the reverb level
sl@0
   357
        * @since 3.0
sl@0
   358
        * @param aReverbLevel The reverb level in mB
sl@0
   359
        */
sl@0
   360
        IMPORT_C void SetReverbLevelL( TInt32 aReverbLevel );
sl@0
   361
sl@0
   362
        /**
sl@0
   363
        * Sets the room HF level ratio
sl@0
   364
        * @since 3.0
sl@0
   365
        * @param aRoomHFLevel The room high frequency ratio
sl@0
   366
        */
sl@0
   367
        IMPORT_C void SetRoomHFLevelL( TInt32 aRoomHFLevel );
sl@0
   368
sl@0
   369
        /**
sl@0
   370
        * Sets the room level value in milli-dB
sl@0
   371
        * @since 3.0
sl@0
   372
        * @param aRoomLevel The room level
sl@0
   373
        */
sl@0
   374
        IMPORT_C void SetRoomLevelL( TInt32 aRoomLevel );
sl@0
   375
sl@0
   376
        /**
sl@0
   377
        * Gets the total delay maximum in milliseconds
sl@0
   378
        * @since 3.0
sl@0
   379
        * @return reverb delay maximum
sl@0
   380
        */
sl@0
   381
        IMPORT_C TUint32 DelayMax() const;
sl@0
   382
sl@0
   383
    public: // functions from base class
sl@0
   384
sl@0
   385
        /*
sl@0
   386
        * From CAudioEffect
sl@0
   387
        * Get the unique identifier of the audio effect
sl@0
   388
        * @since 3.0
sl@0
   389
        * @return Unique identifier
sl@0
   390
        */
sl@0
   391
        IMPORT_C TUid Uid() const;
sl@0
   392
sl@0
   393
    protected:  // Functions from base classes
sl@0
   394
sl@0
   395
        /**
sl@0
   396
        * From CAudioEffect
sl@0
   397
        * Create a package of the effect data
sl@0
   398
        * @since 3.0
sl@0
   399
        * @return A descriptor containing the effect data.
sl@0
   400
        */
sl@0
   401
        IMPORT_C const TDesC8& DoEffectData();
sl@0
   402
sl@0
   403
        /**
sl@0
   404
        * From CAudioEffect
sl@0
   405
        * Internal function to unpack effect data
sl@0
   406
        * @since 3.0
sl@0
   407
        * @param aEffectDataBuffer Descriptor containing packed effect data
sl@0
   408
        * @return -
sl@0
   409
        */
sl@0
   410
        IMPORT_C void SetEffectData( const TDesC8& aEffectDataBuffer );
sl@0
   411
sl@0
   412
    protected:
sl@0
   413
sl@0
   414
        /**
sl@0
   415
        * Private C++ constructor for this class.
sl@0
   416
        * @since 3.0
sl@0
   417
        * @return   -
sl@0
   418
        */
sl@0
   419
        IMPORT_C CEnvironmentalReverb();
sl@0
   420
sl@0
   421
    protected:
sl@0
   422
sl@0
   423
        // Reverb data structure
sl@0
   424
        TEfEnvironmentalReverb iReverbData;
sl@0
   425
        // Data package sent to server
sl@0
   426
        TEfEnvReverbDataPckg iDataPckgTo;
sl@0
   427
        // Data package received from server
sl@0
   428
        TEfEnvReverbDataPckg iDataPckgFrom;
sl@0
   429
sl@0
   430
    protected:    // Friend classes
sl@0
   431
sl@0
   432
        friend class CEnvironmentalReverbMessageHandler;
sl@0
   433
        friend class CEnvironmentalReverbUtility;
sl@0
   434
sl@0
   435
    };
sl@0
   436
sl@0
   437
#endif  // of CENVIRONMENTALREVERB_H
sl@0
   438
sl@0
   439
// End of File