os/mm/mmlibs/mmfw/tsrc/mmfintegrationtest/ACLNT/CapTestServer/src/CapTestStep0012.cpp
Update contrib.
1 // Copyright (c) 2003-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 "CapTestStep0012.h"
18 CAudPlayUtilTS0012* CAudPlayUtilTS0012::NewL()
20 CAudPlayUtilTS0012* self = new (ELeave) CAudPlayUtilTS0012;
21 CleanupStack::PushL(self);
27 void CAudPlayUtilTS0012::ConstructL()
29 // Create the audio player
30 iPlayer = CMdaAudioRecorderUtility::NewL(*this, NULL, EMdaPriorityMax);
34 void CAudPlayUtilTS0012::StartProcessing(TRequestStatus& aStatus)
38 iPlayer->OpenFileL(_L("\\AclntITestData\\8bitmPcm.wav"));
39 CActiveScheduler::Start();
43 TVerdict CAudPlayUtilTS0012::EndProcessingAndReturnResult(TDes8& aMessage)
46 aMessage.Copy(_L("Done"));
50 void CAudPlayUtilTS0012::MoscoStateChangeEvent(CBase* /*aObject*/, TInt aPreviousState, TInt aCurrentState, TInt aErrorCode)
52 if (aErrorCode == KErrNone)
54 if (aPreviousState == CMdaAudioClipUtility::ENotReady && aCurrentState==CMdaAudioClipUtility::EOpen)
58 else if (aPreviousState == CMdaAudioClipUtility::EOpen && aCurrentState==CMdaAudioClipUtility::EPlaying)
60 User::RequestComplete(iStatus, KErrNone);
62 else if (aPreviousState == CMdaAudioClipUtility::EPlaying && aCurrentState==CMdaAudioClipUtility::EOpen)
65 CActiveScheduler::Stop();
71 CActiveScheduler::Stop();
77 CAudPlayUtilTS0012::~CAudPlayUtilTS0012()