Update contrib.
1 // Copyright (c) 2002-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 "MdaHwInfo.h"
19 #ifndef SYMBIAN_MDF_SHAREDCHUNK_SOUNDDRIVER
20 _LIT(KPddFileName,"ESDRV.PDD");
21 _LIT(KLddFileName,"ESOUND.LDD");
24 CMdaHwInfo::~CMdaHwInfo()
28 void CMdaHwInfo::ConstructL()
33 CMdaHwInfo* CMdaHwInfo::NewL()
35 CMdaHwInfo* self = new(ELeave)CMdaHwInfo();
36 CleanupStack::PushL(self);
42 CMdaHwInfo::CMdaHwInfo()
46 void CMdaHwInfo::GetHwInfoL()
48 //#ifdef __WINS__ @@@ Sound drivers must be present!!!
49 #ifndef SYMBIAN_MDF_SHAREDCHUNK_SOUNDDRIVER
50 TInt ret = User::LoadPhysicalDevice(KPddFileName);
51 if ((ret!=KErrNone) && (ret!=KErrAlreadyExists))
53 ret = User::LoadLogicalDevice(KLddFileName);
54 if ((ret!=KErrNone) && (ret!=KErrAlreadyExists))
56 #endif//Adapter loads the drivers too.
57 User::LeaveIfError(iDevice.Open());
58 if (!iDevice.Handle())
59 User::Leave(KErrBadHandle);
61 iDevice.PlayFormatsSupported(iPlayFormatsSupported);
62 iDevice.GetPlayFormat(iPlayFormat);
63 iDevice.RecordFormatsSupported(iRecordFormatsSupported);
64 iDevice.GetRecordFormat(iRecordFormat);