audiostubs/devsoundextensions_stubs/audioeffectscistubs/environmentalreverbcistub/src/EnvironmentalReverbCIStub.cpp
changeset 46 e1758cbb96ac
parent 0 0ce1b5ce9557
child 9 f935d51494d1
equal deleted inserted replaced
43:e71858845f73 46:e1758cbb96ac
       
     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 "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: Audio Stubs -  Implementation of the EnvironmentalReverb effect Custom Interface class
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifdef _DEBUG
       
    20 #include <e32svr.h>
       
    21 #endif
       
    22 #include "EnvironmentalReverbCI.h"
       
    23 
       
    24 
       
    25 EXPORT_C CEnvironmentalReverbCI* CEnvironmentalReverbCI::NewL(
       
    26 	CMMFDevSound& aDevSound )
       
    27 	{
       
    28 	CEnvironmentalReverbCI* self = new(ELeave) CEnvironmentalReverbCI(aDevSound);
       
    29 	return self;
       
    30 	}
       
    31 
       
    32 CEnvironmentalReverbCI::CEnvironmentalReverbCI(
       
    33 	CMMFDevSound& aDevSound )
       
    34 	:	iDevSound(&aDevSound )
       
    35 	{
       
    36 	iReverbData.iDecayHFRatio = 0;
       
    37 	iReverbData.iDecayHFRatioMin = 0;
       
    38 	iReverbData.iDecayHFRatioMax = 10000;
       
    39 	iReverbData.iDecayTime = 0;
       
    40 	iReverbData.iDecayTimeMin = 0;
       
    41 	iReverbData.iDecayTimeMax = 100000;
       
    42 	iReverbData.iDensity = 0;
       
    43 	iReverbData.iDiffusion = 0;
       
    44 	iReverbData.iReflectionsLevel = 0;
       
    45 	iReverbData.iReflectionLevelMin = 0;
       
    46 	iReverbData.iReflectionLevelMax = 1000;
       
    47 	iReverbData.iReflectionsDelay = 0;
       
    48 	iReverbData.iReflectionsDelayMax = 10000;
       
    49 	iReverbData.iReverbDelay = 0;
       
    50 	iReverbData.iReverbDelayMax = 100000;
       
    51 	iReverbData.iReverbLevel = 0;
       
    52 	iReverbData.iReverbLevelMin = 0;
       
    53 	iReverbData.iReverbLevelMax = 1000;
       
    54 	iReverbData.iRoomHFLevel = 0;
       
    55 	iReverbData.iRoomHFLevelMin = 0;
       
    56 	iReverbData.iRoomHFLevelMax = 1000;
       
    57 	iReverbData.iRoomLevel = 0;
       
    58 	iReverbData.iRoomLevelMin = 0;
       
    59 	iReverbData.iRoomLevelMax = 1000;
       
    60 	iReverbData.iDelayMax = 110000;
       
    61 	iReverbData.iEnvironmentalReverbId = 54;
       
    62 	}
       
    63 
       
    64 EXPORT_C CEnvironmentalReverbCI* CEnvironmentalReverbCI::NewL()
       
    65 	{
       
    66 	CEnvironmentalReverbCI* self = new(ELeave) CEnvironmentalReverbCI();
       
    67 	return self;
       
    68 	}
       
    69 
       
    70 CEnvironmentalReverbCI::CEnvironmentalReverbCI()
       
    71 	{
       
    72 	iReverbData.iDecayHFRatio = 0;
       
    73 	iReverbData.iDecayHFRatioMin = 0;
       
    74 	iReverbData.iDecayHFRatioMax = 10000;
       
    75 	iReverbData.iDecayTime = 0;
       
    76 	iReverbData.iDecayTimeMin = 0;
       
    77 	iReverbData.iDecayTimeMax = 100000;
       
    78 	iReverbData.iDensity = 0;
       
    79 	iReverbData.iDiffusion = 0;
       
    80 	iReverbData.iReflectionsLevel = 0;
       
    81 	iReverbData.iReflectionLevelMin = 0;
       
    82 	iReverbData.iReflectionLevelMax = 1000;
       
    83 	iReverbData.iReflectionsDelay = 0;
       
    84 	iReverbData.iReflectionsDelayMax = 10000;
       
    85 	iReverbData.iReverbDelay = 0;
       
    86 	iReverbData.iReverbDelayMax = 100000;
       
    87 	iReverbData.iReverbLevel = 0;
       
    88 	iReverbData.iReverbLevelMin = 0;
       
    89 	iReverbData.iReverbLevelMax = 1000;
       
    90 	iReverbData.iRoomHFLevel = 0;
       
    91 	iReverbData.iRoomHFLevelMin = 0;
       
    92 	iReverbData.iRoomHFLevelMax = 1000;
       
    93 	iReverbData.iRoomLevel = 0;
       
    94 	iReverbData.iRoomLevelMin = 0;
       
    95 	iReverbData.iRoomLevelMax = 1000;
       
    96 	iReverbData.iDelayMax = 110000;
       
    97 	iReverbData.iEnvironmentalReverbId = 54;
       
    98 	}
       
    99 
       
   100 CEnvironmentalReverbCI::~CEnvironmentalReverbCI()
       
   101 	{
       
   102 	}
       
   103 
       
   104 void CEnvironmentalReverbCI::ApplyL()
       
   105 	{
       
   106 #ifdef _DEBUG
       
   107     RDebug::Print(_L("CEnvironmentalReverbCI::ApplyL"));
       
   108 #endif
       
   109 
       
   110 	if (iObservers.Count() > 0)
       
   111 		{
       
   112 		iReverbData.iEnabled = ETrue;
       
   113 		iObservers[0]->EffectChanged(this, (TUint8)MAudioEffectObserver::KEnabled);
       
   114 
       
   115 		}
       
   116 	}
       
   117 
       
   118 
       
   119 // ========================== OTHER EXPORTED FUNCTIONS =========================
       
   120 
       
   121 
       
   122 
       
   123 // End of File