⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sound.cpp

📁 symbian 的lian-liankan
💻 CPP
字号:
// Sound.cpp: implementation of the CPLayer class.
//
//////////////////////////////////////////////////////////////////////

#include "Sound.h"

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CSound::~CSound()
{
	delete iMdaAudioPlayerUtility;
	iMdaAudioPlayerUtility=NULL;
}

CSound* CSound::NewLC(const TDesC& aFile)
{
	CSound* self=new (ELeave)CSound();
	CleanupStack::PushL(self);
	self->ConstructL(aFile);
	return self;
}

CSound* CSound::NewL(const TDesC& aFile)
{
	CSound* self=NewLC(aFile);
	CleanupStack::Pop(self);
	return self;
}

void CSound::ConstructL(const TDesC& aFile)
{
	iState=ENotReady;
	iMdaAudioPlayerUtility=CMdaAudioPlayerUtility::NewFilePlayerL(aFile, *this);
}

void CSound::Play()
{
    iMdaAudioPlayerUtility->Play();
    iState = EPlaying;
}

void CSound::Stop()
{
    iMdaAudioPlayerUtility->Stop();
    iState = EReadyToPlay;
}

void CSound::MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& aDuration)
{
}

void CSound::MapcPlayComplete(TInt aError)
{
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -