directshowmusic.h

来自「游戏音频程序设计-Beginning.Game.Audio.Programmin」· C头文件 代码 · 共 46 行

H
46
字号
// DirectShowMusic.h: interface for the CDirectShowMusic class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_DIRECTSHOWMUSIC_H__22D78C2E_5171_4045_9795_8433DADECCE7__INCLUDED_)
#define AFX_DIRECTSHOWMUSIC_H__22D78C2E_5171_4045_9795_8433DADECCE7__INCLUDED_

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

#include <dshow.h>

#include "Sound.h"
#include <vector>

namespace AudioEngine {

class CDirectShowMusic : public CSound  
{
public:
  friend class CAudioManager;
	CDirectShowMusic(CAudioManager *mgr);
	virtual ~CDirectShowMusic();

  // these methods are required by every sound in the game
  virtual bool Play();
  virtual bool Stop();
  virtual bool IsPlaying();

  static void DispatchDirectShowNotifications();
  void ProcessMyDirectShowNotifications();

protected:
  bool m_IsPlaying;
  IGraphBuilder *m_GraphBuilder;
  IMediaControl *m_MediaControl;
  IMediaEventEx *m_MediaEventEx;

  static std::vector<CDirectShowMusic *> m_AllDSMusicObjects;
};

} // namespace

#endif // !defined(AFX_DIRECTSHOWMUSIC_H__22D78C2E_5171_4045_9795_8433DADECCE7__INCLUDED_)

⌨️ 快捷键说明

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