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

📄 audiopkgappview.cpp

📁 封装了Symbian OS 3rd的音频播放器
💻 CPP
字号:
/*
============================================================================
 Name        : AudioPkgView.cpp
 Author      : 
 Version     :
 Copyright   : Your copyright notice
 Description : Application view
============================================================================
*/

#include <coemain.h>
#include "AudioPkgAppView.h"

_LIT( KwavFile, "\\RPGGame\\mainbg.pcm" );

_LIT( Kmp3File, "\\RPGgame\\dyfz.mp3" );
// ============================ MEMBER FUNCTIONS ===============================

CAudioPkgAppView* CAudioPkgAppView::NewL( const TRect& aRect )
    {
    CAudioPkgAppView* self = CAudioPkgAppView::NewLC( aRect );
    CleanupStack::Pop( self );
    return self;
    }

CAudioPkgAppView* CAudioPkgAppView::NewLC( const TRect& aRect )
    {
    CAudioPkgAppView* self = new ( ELeave ) CAudioPkgAppView;
    CleanupStack::PushL( self );
    self->ConstructL( aRect );
    return self;
    }

void CAudioPkgAppView::ConstructL( const TRect& aRect )
    {
    CreateWindowL();
    SetRect( aRect );
    ActivateL();

	iAudioEng = CAudioEngine::NewL( *this );
    }

CAudioPkgAppView::CAudioPkgAppView()
    {

    }

CAudioPkgAppView::~CAudioPkgAppView()
    {
		delete iAudioEng;
    }

void CAudioPkgAppView::Draw( const TRect& /*aRect*/ ) const
    {
    CWindowGc& gc = SystemGc();
    TRect drawRect( Rect());
    gc.Clear( drawRect );
    }

void CAudioPkgAppView::SizeChanged()
    {  
    DrawNow();
    }

void CAudioPkgAppView::HandlePlayingStopedL()
	{
	}

void CAudioPkgAppView::PlayWavL()
	{
	//iAudioEng->PlayWavL( Kmp3File );
	iAudioEng->PLayStreamL( KwavFile );
	//iAudioEng->PlayToneL( );
	}
// End of File

⌨️ 快捷键说明

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