arsa  2.7
EffekseerSoundXAudio2.h
Go to the documentation of this file.
1 
2 #ifndef __EFFEKSEERSOUND_BASE_PRE_H__
3 #define __EFFEKSEERSOUND_BASE_PRE_H__
4 
5 //----------------------------------------------------------------------------------
6 // Include
7 //----------------------------------------------------------------------------------
8 #include <Effekseer.h>
9 
10 //----------------------------------------------------------------------------------
11 //
12 //----------------------------------------------------------------------------------
13 namespace EffekseerSound
14 {
15 //----------------------------------------------------------------------------------
16 //
17 //----------------------------------------------------------------------------------
18 class Sound;
19 
20 //----------------------------------------------------------------------------------
21 //
22 //----------------------------------------------------------------------------------
23 }
24 //----------------------------------------------------------------------------------
25 //
26 //----------------------------------------------------------------------------------
27 #endif // __EFFEKSEERSOUND_BASE_PRE_H__
28 
29 #ifndef __EFFEKSEERSOUND_XAUDIO2_H__
30 #define __EFFEKSEERSOUND_XAUDIO2_H__
31 
32 //----------------------------------------------------------------------------------
33 // Include
34 //----------------------------------------------------------------------------------
35 #include <XAudio2.h>
36 
37 //----------------------------------------------------------------------------------
38 // Lib
39 //----------------------------------------------------------------------------------
40 
41 //----------------------------------------------------------------------------------
42 //
43 //----------------------------------------------------------------------------------
44 namespace EffekseerSound
45 {
46 //----------------------------------------------------------------------------------
47 //
48 //----------------------------------------------------------------------------------
49 
53 struct SoundData
54 {
59 
64 
68  XAUDIO2_BUFFER buffer;
69 };
70 
74 class Sound
75 {
76 protected:
77  Sound() {}
78  virtual ~Sound() {}
79 
80 public:
88  static Sound* Create( IXAudio2* xaudio2, int32_t num1chVoices, int32_t num2chVoices );
89 
93  virtual void Destroy() = 0;
94 
98  virtual void SetListener( const ::Effekseer::Vector3D& pos,
99  const ::Effekseer::Vector3D& at, const ::Effekseer::Vector3D& up ) = 0;
100 
104  virtual ::Effekseer::SoundPlayer* CreateSoundPlayer() = 0;
105 
109  virtual ::Effekseer::SoundLoader* CreateSoundLoader( ::Effekseer::FileInterface* fileInterface = NULL ) = 0;
110 
114  virtual void StopAllVoices() = 0;
115 
119  virtual void SetMute( bool mute ) = 0;
120 
121 };
122 
123 //----------------------------------------------------------------------------------
124 //
125 //----------------------------------------------------------------------------------
126 }
127 //----------------------------------------------------------------------------------
128 //
129 //----------------------------------------------------------------------------------
130 #endif // __EFFEKSEERSOUND_XAUDIO2_H__
static Sound * Create(int32_t numVoices)
インスタンスを生成する。
virtual void SetMute(bool mute)=0
ミュート設定
int32_t channels
チャンネル数。
signed int int32_t
factory class for io
Definition: Effekseer.h:1484
virtual void StopAllVoices()=0
全発音を停止
XAUDIO2_BUFFER buffer
XAudio2ソースボイス用バッファ。
virtual ::Effekseer::SoundPlayer * CreateSoundPlayer()=0
サウンドプレイヤを生成する。
virtual void Destroy()=0
このインスタンスを破棄する。
サウンドクラス
#define NULL
Definition: begin_code.h:167
virtual ::Effekseer::SoundLoader * CreateSoundLoader(::Effekseer::FileInterface *fileInterface=NULL)=0
標準のサウンド読込インスタンスを生成する。
virtual void SetListener(const ::Effekseer::Vector3D &pos, const ::Effekseer::Vector3D &at, const ::Effekseer::Vector3D &up)=0
リスナー設定
int32_t sampleRate
サンプリング周波数。