diff -r 9d4397b300d1 -r b220a9341636 mmaudio_plat/telephony_audio_routing_client_api/TelephonyAudioRouting_TestApp/console/inc/myplayer.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mmaudio_plat/telephony_audio_routing_client_api/TelephonyAudioRouting_TestApp/console/inc/myplayer.h Tue Nov 02 12:13:59 2010 +0000 @@ -0,0 +1,63 @@ +/* +* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Console Myplayer +* +*/ + +#if 0 +#include + +_LIT(KWavFile, "c:\\sounds\\digital\\sample.wav"); + + +class CMyPlayer : public CBase, MMdaAudioPlayerCallback + { +public: + static CMyPlayer* NewL(); + void ConstructL(); + void Play(); +public: + virtual void MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds &aDuration); + virtual void MapcPlayComplete(TInt aError); + +private: + CMdaAudioPlayerUtility* iPlayer; + }; + + +CMyPlayer* CMyPlayer::NewL() + { + CMyPlayer* self = new(ELeave) CMyPlayer; + CleanupStack::PushL(self); + self->ConstructL(); + CleanupStack::Pop(self); + } +void CMyPlayer::ConstructL() + { + iPlayer = CMdaAudioPlayerUtility::NewL(*this); + iPlayer->OpenFileL(KWavFile); + } +void CMyPlayer::Play() + { + iPlayer->Play(); + } +void CMyPlayer::MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds &aDuration) + { + console->Printf(_L("Init complete with err = %d\n"), aError); + } +void CMyPlayer::MapcPlayComplete(TInt aError) + { + console->Printf(_L("play complete with err = %d\n"), aError); + } +#endif