devsound/devsoundrefplugin/tsrc/CIPlugins/src/eaacplusdecodertestdevice.cpp
changeset 0 79dd3e2336a0
equal deleted inserted replaced
-1:000000000000 0:79dd3e2336a0
       
     1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #include <mmf/server/mmfswcodecwrappercustominterfacesuids.hrh>
       
    17 
       
    18 #include "eaacplusdecodertestdevice.h"
       
    19 
       
    20 
       
    21 /*****************************************************************************/
       
    22 // Implementation
       
    23 
       
    24 CMMFHwDevice* CEAacPlusDecoderTestDevice::NewL()
       
    25 	{
       
    26 	CEAacPlusDecoderTestDevice* self = new(ELeave) CEAacPlusDecoderTestDevice();
       
    27 	CleanupStack::PushL(self);
       
    28 	self->ConstructL();
       
    29 	CleanupStack::Pop(self);
       
    30 	return self;
       
    31 	}
       
    32 
       
    33 /*****************************************************************************/
       
    34 CEAacPlusDecoderTestDevice::~CEAacPlusDecoderTestDevice()
       
    35 	{
       
    36 	}
       
    37 
       
    38 /*****************************************************************************/
       
    39 CEAacPlusDecoderTestDevice::CEAacPlusDecoderTestDevice()
       
    40 	{
       
    41 	}
       
    42 
       
    43 /*****************************************************************************/
       
    44 void CEAacPlusDecoderTestDevice::ConstructL()
       
    45 	{
       
    46 	}
       
    47 	
       
    48 /*****************************************************************************/
       
    49 TInt CEAacPlusDecoderTestDevice::Start(TDeviceFunc /*aFuncCmd*/, TDeviceFlow /*aFlowCmd*/) 
       
    50 	{
       
    51 	return 0;
       
    52 	}
       
    53 
       
    54 /*****************************************************************************/
       
    55 TInt CEAacPlusDecoderTestDevice::Stop()
       
    56 	{
       
    57 	return 0;
       
    58 	}
       
    59 	
       
    60 /*****************************************************************************/
       
    61 TInt CEAacPlusDecoderTestDevice::Pause()
       
    62 	{
       
    63 	return 0;
       
    64 	}
       
    65 
       
    66 /*****************************************************************************/		
       
    67 TInt CEAacPlusDecoderTestDevice::Init(THwDeviceInitParams& /*aDevInfo*/)
       
    68 	{
       
    69 	return 0;
       
    70 	}
       
    71 	
       
    72 /*****************************************************************************/
       
    73 TAny* CEAacPlusDecoderTestDevice::CustomInterface(TUid aInterfaceId)
       
    74 	{
       
    75 	MEAacPlusDecoderIntfc* interface = NULL;
       
    76 	
       
    77 	// DevSound initialisation requires something to be returned for both of
       
    78 	// these two uids: KMmfPlaySettingsCustomInterface, KMmfRecordSettingsCustomInterface
       
    79 	if ((aInterfaceId == KUidEAacPlusDecoderIntfc) || // This interface
       
    80 		(aInterfaceId.iUid == KMmfPlaySettingsCustomInterface) ||
       
    81 		(aInterfaceId.iUid == KMmfRecordSettingsCustomInterface))
       
    82 		{
       
    83 		interface = this;
       
    84 		}
       
    85 	
       
    86 	return interface;	
       
    87 	}
       
    88 
       
    89 /*****************************************************************************/
       
    90 TInt CEAacPlusDecoderTestDevice::ThisHwBufferFilled(CMMFBuffer& /*aFillBufferPtr*/)
       
    91 	{
       
    92 	return 0;
       
    93 	}
       
    94 	
       
    95 /*****************************************************************************/	
       
    96 TInt CEAacPlusDecoderTestDevice::ThisHwBufferEmptied(CMMFBuffer& /*aEmptyBufferPtr*/)
       
    97 	{
       
    98 	return 0;
       
    99 	}
       
   100 	
       
   101 /*****************************************************************************/	
       
   102 TInt CEAacPlusDecoderTestDevice::SetConfig(TTaskConfig& /*aConfig*/)
       
   103 	{
       
   104 	return 0;
       
   105 	}
       
   106 	
       
   107 /*****************************************************************************/	
       
   108 TInt CEAacPlusDecoderTestDevice::StopAndDeleteCodec()
       
   109 	{
       
   110 	return 0;
       
   111 	}
       
   112 	
       
   113 /*****************************************************************************/	
       
   114 TInt CEAacPlusDecoderTestDevice::DeleteCodec()
       
   115 	{
       
   116 	return 0;
       
   117 	}
       
   118 
       
   119 /*****************************************************************************/
       
   120 CMMFSwCodec& CEAacPlusDecoderTestDevice::Codec()
       
   121 	{
       
   122 	return *iCodec;
       
   123 	}
       
   124 
       
   125 /*****************************************************************************/
       
   126 
       
   127 void CEAacPlusDecoderTestDevice::SetInputSamplingFrequency(TUint aInputSamplingFrequency)
       
   128 	{
       
   129 	iFrequency = aInputSamplingFrequency;
       
   130 	}
       
   131 	
       
   132 void CEAacPlusDecoderTestDevice::SetAudioObjectType(MEAacPlusDecoderIntfc::TAudioObjectType aAudioObjectType)
       
   133 	{
       
   134 	iAudioObjectType = aAudioObjectType;
       
   135 	}
       
   136 	
       
   137 void CEAacPlusDecoderTestDevice::SetNumOfChannels(TUint aNumOfChannels)
       
   138 	{
       
   139 	iNumOfChannels = aNumOfChannels;
       
   140 	}
       
   141 	
       
   142 void CEAacPlusDecoderTestDevice::SetSbr(TBool aSbrEnabled)
       
   143 	{
       
   144 	iSbrEnabled = aSbrEnabled;
       
   145 	}
       
   146 	
       
   147 void CEAacPlusDecoderTestDevice::SetDownSampledMode(TBool aDsmEnabled)
       
   148 	{
       
   149 	iDsmEnabled = aDsmEnabled;
       
   150 	}
       
   151 	
       
   152 TInt CEAacPlusDecoderTestDevice::ApplyConfig()
       
   153 	{
       
   154 	iApplyConfig = ETrue;
       
   155 	return KErrNone;
       
   156 	}
       
   157 	
       
   158 TInt CEAacPlusDecoderTestDevice::GetInputSamplingFrequency ( TUint& aInputSamplingFrequency )
       
   159 	{
       
   160 	aInputSamplingFrequency = iFrequency;
       
   161 	return KErrNone;
       
   162 	}
       
   163 	
       
   164 TInt CEAacPlusDecoderTestDevice::GetAudioObjectType(MEAacPlusDecoderIntfc::TAudioObjectType& aAudioObjectType)
       
   165 	{
       
   166 	aAudioObjectType = iAudioObjectType;
       
   167 	return KErrNone;
       
   168 	}
       
   169 	
       
   170 TInt CEAacPlusDecoderTestDevice::GetNumOfChannels ( TUint& aNumOfChannels )
       
   171 	{
       
   172 	aNumOfChannels = iNumOfChannels;
       
   173 	return KErrNone;
       
   174 	}
       
   175 	
       
   176 TInt CEAacPlusDecoderTestDevice::GetSbr (TBool& aSbrEnabled)
       
   177 	{
       
   178 	aSbrEnabled = iSbrEnabled;
       
   179 	return KErrNone;
       
   180 	}
       
   181 	
       
   182 TInt CEAacPlusDecoderTestDevice::GetDownSampledMode (TBool& aDsmEnabled)
       
   183 	{
       
   184 	aDsmEnabled = iDsmEnabled;
       
   185 	return KErrNone;
       
   186 	}