os/mm/mmlibs/mmfw/tsrc/mmfunittest/DevSoundTest/CIPlugins/src/eaacplusdecodertestdevice.cpp
Update contrib.
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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #include <mmf/server/mmfswcodecwrappercustominterfacesuids.hrh>
18 #include "eaacplusdecodertestdevice.h"
21 /*****************************************************************************/
24 CMMFHwDevice* CEAacPlusDecoderTestDevice::NewL()
26 CEAacPlusDecoderTestDevice* self = new(ELeave) CEAacPlusDecoderTestDevice();
27 CleanupStack::PushL(self);
29 CleanupStack::Pop(self);
33 /*****************************************************************************/
34 CEAacPlusDecoderTestDevice::~CEAacPlusDecoderTestDevice()
38 /*****************************************************************************/
39 CEAacPlusDecoderTestDevice::CEAacPlusDecoderTestDevice()
43 /*****************************************************************************/
44 void CEAacPlusDecoderTestDevice::ConstructL()
48 /*****************************************************************************/
49 TInt CEAacPlusDecoderTestDevice::Start(TDeviceFunc /*aFuncCmd*/, TDeviceFlow /*aFlowCmd*/)
54 /*****************************************************************************/
55 TInt CEAacPlusDecoderTestDevice::Stop()
60 /*****************************************************************************/
61 TInt CEAacPlusDecoderTestDevice::Pause()
66 /*****************************************************************************/
67 TInt CEAacPlusDecoderTestDevice::Init(THwDeviceInitParams& /*aDevInfo*/)
72 /*****************************************************************************/
73 TAny* CEAacPlusDecoderTestDevice::CustomInterface(TUid aInterfaceId)
75 MEAacPlusDecoderIntfc* interface = NULL;
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))
89 /*****************************************************************************/
90 TInt CEAacPlusDecoderTestDevice::ThisHwBufferFilled(CMMFBuffer& /*aFillBufferPtr*/)
95 /*****************************************************************************/
96 TInt CEAacPlusDecoderTestDevice::ThisHwBufferEmptied(CMMFBuffer& /*aEmptyBufferPtr*/)
101 /*****************************************************************************/
102 TInt CEAacPlusDecoderTestDevice::SetConfig(TTaskConfig& /*aConfig*/)
107 /*****************************************************************************/
108 TInt CEAacPlusDecoderTestDevice::StopAndDeleteCodec()
113 /*****************************************************************************/
114 TInt CEAacPlusDecoderTestDevice::DeleteCodec()
119 /*****************************************************************************/
120 CMMFSwCodec& CEAacPlusDecoderTestDevice::Codec()
125 /*****************************************************************************/
127 void CEAacPlusDecoderTestDevice::SetInputSamplingFrequency(TUint aInputSamplingFrequency)
129 iFrequency = aInputSamplingFrequency;
132 void CEAacPlusDecoderTestDevice::SetAudioObjectType(MEAacPlusDecoderIntfc::TAudioObjectType aAudioObjectType)
134 iAudioObjectType = aAudioObjectType;
137 void CEAacPlusDecoderTestDevice::SetNumOfChannels(TUint aNumOfChannels)
139 iNumOfChannels = aNumOfChannels;
142 void CEAacPlusDecoderTestDevice::SetSbr(TBool aSbrEnabled)
144 iSbrEnabled = aSbrEnabled;
147 void CEAacPlusDecoderTestDevice::SetDownSampledMode(TBool aDsmEnabled)
149 iDsmEnabled = aDsmEnabled;
152 TInt CEAacPlusDecoderTestDevice::ApplyConfig()
154 iApplyConfig = ETrue;
158 TInt CEAacPlusDecoderTestDevice::GetInputSamplingFrequency ( TUint& aInputSamplingFrequency )
160 aInputSamplingFrequency = iFrequency;
164 TInt CEAacPlusDecoderTestDevice::GetAudioObjectType(MEAacPlusDecoderIntfc::TAudioObjectType& aAudioObjectType)
166 aAudioObjectType = iAudioObjectType;
170 TInt CEAacPlusDecoderTestDevice::GetNumOfChannels ( TUint& aNumOfChannels )
172 aNumOfChannels = iNumOfChannels;
176 TInt CEAacPlusDecoderTestDevice::GetSbr (TBool& aSbrEnabled)
178 aSbrEnabled = iSbrEnabled;
182 TInt CEAacPlusDecoderTestDevice::GetDownSampledMode (TBool& aDsmEnabled)
184 aDsmEnabled = iDsmEnabled;