os/mm/mmlibs/mmfw/tsrc/mmfunittest/DevSoundTest/CIPlugins/src/eaacplusdecodertestdevice.cpp
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/mm/mmlibs/mmfw/tsrc/mmfunittest/DevSoundTest/CIPlugins/src/eaacplusdecodertestdevice.cpp	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,186 @@
     1.4 +// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +//
    1.18 +
    1.19 +#include <mmf/server/mmfswcodecwrappercustominterfacesuids.hrh>
    1.20 +
    1.21 +#include "eaacplusdecodertestdevice.h"
    1.22 +
    1.23 +
    1.24 +/*****************************************************************************/
    1.25 +// Implementation
    1.26 +
    1.27 +CMMFHwDevice* CEAacPlusDecoderTestDevice::NewL()
    1.28 +	{
    1.29 +	CEAacPlusDecoderTestDevice* self = new(ELeave) CEAacPlusDecoderTestDevice();
    1.30 +	CleanupStack::PushL(self);
    1.31 +	self->ConstructL();
    1.32 +	CleanupStack::Pop(self);
    1.33 +	return self;
    1.34 +	}
    1.35 +
    1.36 +/*****************************************************************************/
    1.37 +CEAacPlusDecoderTestDevice::~CEAacPlusDecoderTestDevice()
    1.38 +	{
    1.39 +	}
    1.40 +
    1.41 +/*****************************************************************************/
    1.42 +CEAacPlusDecoderTestDevice::CEAacPlusDecoderTestDevice()
    1.43 +	{
    1.44 +	}
    1.45 +
    1.46 +/*****************************************************************************/
    1.47 +void CEAacPlusDecoderTestDevice::ConstructL()
    1.48 +	{
    1.49 +	}
    1.50 +	
    1.51 +/*****************************************************************************/
    1.52 +TInt CEAacPlusDecoderTestDevice::Start(TDeviceFunc /*aFuncCmd*/, TDeviceFlow /*aFlowCmd*/) 
    1.53 +	{
    1.54 +	return 0;
    1.55 +	}
    1.56 +
    1.57 +/*****************************************************************************/
    1.58 +TInt CEAacPlusDecoderTestDevice::Stop()
    1.59 +	{
    1.60 +	return 0;
    1.61 +	}
    1.62 +	
    1.63 +/*****************************************************************************/
    1.64 +TInt CEAacPlusDecoderTestDevice::Pause()
    1.65 +	{
    1.66 +	return 0;
    1.67 +	}
    1.68 +
    1.69 +/*****************************************************************************/		
    1.70 +TInt CEAacPlusDecoderTestDevice::Init(THwDeviceInitParams& /*aDevInfo*/)
    1.71 +	{
    1.72 +	return 0;
    1.73 +	}
    1.74 +	
    1.75 +/*****************************************************************************/
    1.76 +TAny* CEAacPlusDecoderTestDevice::CustomInterface(TUid aInterfaceId)
    1.77 +	{
    1.78 +	MEAacPlusDecoderIntfc* interface = NULL;
    1.79 +	
    1.80 +	// DevSound initialisation requires something to be returned for both of
    1.81 +	// these two uids: KMmfPlaySettingsCustomInterface, KMmfRecordSettingsCustomInterface
    1.82 +	if ((aInterfaceId == KUidEAacPlusDecoderIntfc) || // This interface
    1.83 +		(aInterfaceId.iUid == KMmfPlaySettingsCustomInterface) ||
    1.84 +		(aInterfaceId.iUid == KMmfRecordSettingsCustomInterface))
    1.85 +		{
    1.86 +		interface = this;
    1.87 +		}
    1.88 +	
    1.89 +	return interface;	
    1.90 +	}
    1.91 +
    1.92 +/*****************************************************************************/
    1.93 +TInt CEAacPlusDecoderTestDevice::ThisHwBufferFilled(CMMFBuffer& /*aFillBufferPtr*/)
    1.94 +	{
    1.95 +	return 0;
    1.96 +	}
    1.97 +	
    1.98 +/*****************************************************************************/	
    1.99 +TInt CEAacPlusDecoderTestDevice::ThisHwBufferEmptied(CMMFBuffer& /*aEmptyBufferPtr*/)
   1.100 +	{
   1.101 +	return 0;
   1.102 +	}
   1.103 +	
   1.104 +/*****************************************************************************/	
   1.105 +TInt CEAacPlusDecoderTestDevice::SetConfig(TTaskConfig& /*aConfig*/)
   1.106 +	{
   1.107 +	return 0;
   1.108 +	}
   1.109 +	
   1.110 +/*****************************************************************************/	
   1.111 +TInt CEAacPlusDecoderTestDevice::StopAndDeleteCodec()
   1.112 +	{
   1.113 +	return 0;
   1.114 +	}
   1.115 +	
   1.116 +/*****************************************************************************/	
   1.117 +TInt CEAacPlusDecoderTestDevice::DeleteCodec()
   1.118 +	{
   1.119 +	return 0;
   1.120 +	}
   1.121 +
   1.122 +/*****************************************************************************/
   1.123 +CMMFSwCodec& CEAacPlusDecoderTestDevice::Codec()
   1.124 +	{
   1.125 +	return *iCodec;
   1.126 +	}
   1.127 +
   1.128 +/*****************************************************************************/
   1.129 +
   1.130 +void CEAacPlusDecoderTestDevice::SetInputSamplingFrequency(TUint aInputSamplingFrequency)
   1.131 +	{
   1.132 +	iFrequency = aInputSamplingFrequency;
   1.133 +	}
   1.134 +	
   1.135 +void CEAacPlusDecoderTestDevice::SetAudioObjectType(MEAacPlusDecoderIntfc::TAudioObjectType aAudioObjectType)
   1.136 +	{
   1.137 +	iAudioObjectType = aAudioObjectType;
   1.138 +	}
   1.139 +	
   1.140 +void CEAacPlusDecoderTestDevice::SetNumOfChannels(TUint aNumOfChannels)
   1.141 +	{
   1.142 +	iNumOfChannels = aNumOfChannels;
   1.143 +	}
   1.144 +	
   1.145 +void CEAacPlusDecoderTestDevice::SetSbr(TBool aSbrEnabled)
   1.146 +	{
   1.147 +	iSbrEnabled = aSbrEnabled;
   1.148 +	}
   1.149 +	
   1.150 +void CEAacPlusDecoderTestDevice::SetDownSampledMode(TBool aDsmEnabled)
   1.151 +	{
   1.152 +	iDsmEnabled = aDsmEnabled;
   1.153 +	}
   1.154 +	
   1.155 +TInt CEAacPlusDecoderTestDevice::ApplyConfig()
   1.156 +	{
   1.157 +	iApplyConfig = ETrue;
   1.158 +	return KErrNone;
   1.159 +	}
   1.160 +	
   1.161 +TInt CEAacPlusDecoderTestDevice::GetInputSamplingFrequency ( TUint& aInputSamplingFrequency )
   1.162 +	{
   1.163 +	aInputSamplingFrequency = iFrequency;
   1.164 +	return KErrNone;
   1.165 +	}
   1.166 +	
   1.167 +TInt CEAacPlusDecoderTestDevice::GetAudioObjectType(MEAacPlusDecoderIntfc::TAudioObjectType& aAudioObjectType)
   1.168 +	{
   1.169 +	aAudioObjectType = iAudioObjectType;
   1.170 +	return KErrNone;
   1.171 +	}
   1.172 +	
   1.173 +TInt CEAacPlusDecoderTestDevice::GetNumOfChannels ( TUint& aNumOfChannels )
   1.174 +	{
   1.175 +	aNumOfChannels = iNumOfChannels;
   1.176 +	return KErrNone;
   1.177 +	}
   1.178 +	
   1.179 +TInt CEAacPlusDecoderTestDevice::GetSbr (TBool& aSbrEnabled)
   1.180 +	{
   1.181 +	aSbrEnabled = iSbrEnabled;
   1.182 +	return KErrNone;
   1.183 +	}
   1.184 +	
   1.185 +TInt CEAacPlusDecoderTestDevice::GetDownSampledMode (TBool& aDsmEnabled)
   1.186 +	{
   1.187 +	aDsmEnabled = iDsmEnabled;
   1.188 +	return KErrNone;
   1.189 +	}