Update contrib.
1 // Copyright (c) 2005-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 "MdaBtHwInfo.h"
19 _LIT(KPddFileName,"ESDRV.PDD");
20 _LIT(KLddFileName,"ESOUND.LDD");
22 CMdaHwInfo::~CMdaHwInfo()
26 void CMdaHwInfo::ConstructL()
31 CMdaHwInfo* CMdaHwInfo::NewL()
33 CMdaHwInfo* self = new(ELeave)CMdaHwInfo();
34 CleanupStack::PushL(self);
40 CMdaHwInfo::CMdaHwInfo()
44 void CMdaHwInfo::GetHwInfoL()
46 //#ifdef __WINS__ @@@ Sound drivers must be present!!!
48 TInt ret = User::LoadPhysicalDevice(KPddFileName);
49 if ((ret!=KErrNone) && (ret!=KErrAlreadyExists))
51 ret = User::LoadLogicalDevice(KLddFileName);
52 if ((ret!=KErrNone) && (ret!=KErrAlreadyExists))
55 User::LeaveIfError(iDevice.Open());
56 if (!iDevice.Handle())
57 User::Leave(KErrBadHandle);
59 iDevice.PlayFormatsSupported(iPlayFormatsSupported);
60 iDevice.GetPlayFormat(iPlayFormat);
61 iDevice.RecordFormatsSupported(iRecordFormatsSupported);
62 iDevice.GetRecordFormat(iRecordFormat);