sl@0: // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of the License "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // e32test\multimedia\t_sound2_helper.cpp sl@0: // sl@0: // sl@0: sl@0: #include sl@0: #include sl@0: #include sl@0: #include "t_soundutils.h" sl@0: sl@0: TInt E32Main() sl@0: { sl@0: RTest test(_L("t_sound_api_helper")); sl@0: #ifdef __WINS__ sl@0: // don't use JIT if running on emulator because don't want to halt sl@0: // the test run sl@0: User::SetJustInTime(EFalse); sl@0: #endif sl@0: TInt unit; sl@0: TInt r= User::GetTIntParameter(KSlot, unit); sl@0: test(r==KErrNone); sl@0: sl@0: test.Start(_L("t_sound_api_helper")); sl@0: RSoundSc soundSc; sl@0: r = soundSc.Open(unit); sl@0: test.Printf(_L("RSoundSc::Open --> r=%d\n"), r); sl@0: test(r==KErrNone || r==KErrPermissionDenied); sl@0: if(r==KErrNone) sl@0: soundSc.Close(); sl@0: test.End(); sl@0: test.Close(); sl@0: // Panic with the return code from Open so that t_sound_api sl@0: // can check for the right error code. sl@0: User::Panic(KSoundAPICaps, r); sl@0: sl@0: // unused return value - present to prevent compiler warning sl@0: return KErrNone; sl@0: }