📄 soundinstance.h
字号:
// SoundInstance.h: interface for the CSoundInstance class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_SOUNDINSTANCE_H__AC82C068_C016_4367_85C6_99906A7950CC__INCLUDED_)
#define AFX_SOUNDINSTANCE_H__AC82C068_C016_4367_85C6_99906A7950CC__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include <windows.h>
#include <mmreg.h>
#include <dmusicc.h>
#include <dmusici.h>
#include <dsound.h>
#include "dxutil.h"
#include "DirectMusicSegment.h"
namespace AudioEngine {
class CSound;
class CAudioManager;
class CSoundInstance
{
public:
CSoundInstance();
virtual ~CSoundInstance();
void Init(CDirectMusicSegment *seg, IDirectMusicAudioPath8 *path);
void UnInit();
bool IsPlaying();
bool IsValid() { return(m_Valid); }
bool Stop(MUSIC_TIME time = 0, DWORD flags = 0);
void SetVolume(const CVolume &vol, int fadeoverms = 0);
IDirectMusicSegmentState8 *GetSegmentState() { return(m_SegmentState); }
protected:
bool m_Valid;
IDirectMusicSegmentState8 *m_SegmentState;
IDirectMusicAudioPath8 *m_AudioPath;
};
}; // namespace
#endif // !defined(AFX_SOUNDINSTANCE_H__AC82C068_C016_4367_85C6_99906A7950CC__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -