playerapp.h

来自「一个非常好用的MP3音乐播放控件」· C头文件 代码 · 共 124 行

H
124
字号
// PlayerApp.h : main header file for the MFCPLAYER application
//

#if !defined(AFX_PLAYERAPP_H__FCF45C44_7793_11D2_9317_0020AFF7E192__INCLUDED_)
#define AFX_PLAYERAPP_H__FCF45C44_7793_11D2_9317_0020AFF7E192__INCLUDED_

#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000

#ifndef __AFXWIN_H__
	#error include 'stdafx.h' before including this file for PCH
#endif

#include "resource.h"		// main symbols
#include "XaudioPlayer.h"
#include "feedback.h"

// uncomment the following line to use the AAC codec
// you'll also need to uncomment one of the two following
// lines to specify the linkage type for the codec
//#define MODULES_ENABLE_AAC_CODEC

// uncomment this if you want the AAC codec to be linked statically
// (if you choose this option, remember to add the xa_aac_codec.lib
//  static library in the 'link' section of the settings for your
//  project so that the linker can find the codec implementation)
//#define MODULES_CONFIG_AAC_CODEC_LINKAGE_STATIC

// uncomment this if you want the AAC codec to be linked dynamically
// (if you choose this option, remember to put xa_aac_codec.dll
//  where your executable application is being built so that it
//  can be found by the dynamic linker)
//#define MODULES_CONFIG_AAC_CODEC_LINKAGE_DYNAMIC


// uncomment the following lines to use the QDesign codec
// you'll also need to uncomment one of the two following
// lines to specify the linkage type for the codec
//#define MODULES_ENABLE_QDMC_CODEC

// uncomment this if you want the QDesign codec to be linked statically
// (if you choose this option, remember to add the xa_qdmc_codec.lib
//  static library in the 'link' section of the settings for your
//  project so that the linker can find the codec implementation)
//#define MODULES_CONFIG_QDMC_CODEC_LINKAGE_STATIC

// uncomment this if you want the QDesign codec to be linked dynamically
// uncomment this if you want the AAC codec to be linked dynamically
// (if you choose this option, remember to put xa_qdmc_codec.dll
//  where your executable application is being built so that it
//  can be found by the dynamic linker)
//#define MODULES_CONFIG_QDMC_CODEC_LINKAGE_DYNAMIC

/////////////////////////////////////////////////////////////////////////////
// CPlayerApp:
// See PlayerApp.cpp for the implementation of this class
//

class CPlayerApp : public CWinApp
{
public:
	CPlayerApp();

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CPlayerApp)
	public:
	virtual BOOL InitInstance();
	//}}AFX_VIRTUAL

// Implementation

	//{{AFX_MSG(CPlayerApp)
		// NOTE - the ClassWizard will add and remove member functions here.
		//    DO NOT EDIT what you see in these blocks of generated code !
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////
// SamplePlayer:
// This class is a subclass of the generic XaudioPlayer
// It overrides some methods to implement actions triggered
// by notification messages

class SamplePlayer : public XaudioPlayer
{
public:
    // member variables
    BOOL m_Scrolling;
    XA_PlayerState m_State;

    // methods
    SamplePlayer(HINSTANCE instance);
    void OnNotifyReady();
    void OnNotifyNack(XA_NackInfo *info);
    void OnNotifyProgress(XA_ProgressInfo *info);
    void OnNotifyPlayerState(XA_PlayerState state);
    void OnNotifyInputPosition(unsigned long offset, unsigned long range);
    void OnNotifyInputName(const char *name);
    void OnNotifyInputState(XA_InputState state);
    void OnNotifyInputTimecode(XA_TimecodeInfo *info);
    void OnNotifyInputModuleInfo(XA_ModuleInfo *info);
    void OnNotifyOutputState(XA_OutputState state);
    void OnNotifyOutputModuleInfo(XA_ModuleInfo *info);
    void OnNotifyOutputMasterLevel(unsigned char level);
    void OnNotifyOutputPcmLevel(unsigned char level);
    void OnNotifyOutputBalance(unsigned char balance);
    void OnNotifyStreamDuration(unsigned long duration);
    void OnNotifyStreamMimeType(const char *mime_type);
    void OnNotifyStreamProperties(XA_PropertyList *properties);
    void OnNotifyStreamParameters(XA_StreamParameters *parameters);
    void OnNotifyCodecEqualizer(XA_EqualizerInfo *equalizer);
    void OnNotifyCodecModuleInfo(XA_ModuleInfo *info);
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_PLAYERAPP_H__FCF45C44_7793_11D2_9317_0020AFF7E192__INCLUDED_)

⌨️ 快捷键说明

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