Sound Lib: SoundLib/VoiceCallback.h ソースファイル

Sound Lib

Sound Lib
C/C++Windowsゲーム用音声再生ライブラリ
VoiceCallback.h
1 //----------------------------------------------------------
2 // <filename>VoiceCallback.h</filename>
3 // <author>Masami Sugao</author>
4 // <date>2018/07/16</date>
5 //----------------------------------------------------------
6 #ifndef VOICE_CALLBACK_H
7 #define VOICE_CALLBACK_H
8 
9 #include <xaudio2.h>
10 #include "IVoiceCallbackDelegate.h"
11 
12 
13 namespace SoundLib {
17 class VoiceCallback : public IXAudio2VoiceCallback
18 {
19 public:
20  /* Constructor / Destructor ------------------------------------------------------------------------- */
25  explicit VoiceCallback(IVoiceCallbackDelegate* pDelegate);
26 
31  VoiceCallback(VoiceCallback&& obj) = default;
32 
36  ~VoiceCallback() = default;
37 
38  /* Operator Overloads ------------------------------------------------------------------------------- */
44  VoiceCallback& operator=(VoiceCallback&& obj) = default;
45 
46  /* Functions ---------------------------------------------------------------------------------------- */
51  void STDMETHODCALLTYPE OnStreamEnd();
52 
56  void STDMETHODCALLTYPE OnVoiceProcessingPassEnd() {}
57 
62  void STDMETHODCALLTYPE OnVoiceProcessingPassStart(UINT32 SamplesRequired) {}
63 
69  void STDMETHODCALLTYPE OnBufferEnd(void* pBufferContext);
70 
75  void STDMETHODCALLTYPE OnBufferStart(void* pBufferContext) {}
76 
81  void STDMETHODCALLTYPE OnLoopEnd(void* pBufferContext);
82 
91  void STDMETHODCALLTYPE OnVoiceError(void* pBufferContext, HRESULT Error);
92 
93 private:
94  /* Variables ---------------------------------------------------------------------------------------- */
95  IVoiceCallbackDelegate * pDelegate;
96 
97  /* Constructor / Destructor ------------------------------------------------------------------------- */
98  VoiceCallback() = delete;
99  VoiceCallback(const VoiceCallback&) = delete;
100 
101  /* Operator Overloads ------------------------------------------------------------------------------- */
102  VoiceCallback& operator=(const VoiceCallback&) = delete;
103 };
104 }
105 #endif
IXAudio2VoiceCallback実装クラス
Definition: VoiceCallback.h:17
void STDMETHODCALLTYPE OnLoopEnd(void *pBufferContext)
Called when this voice has just reached the end position of a loop.
Definition: VoiceCallback.cpp:24
void STDMETHODCALLTYPE OnVoiceProcessingPassStart(UINT32 SamplesRequired)
Called just before this voice&#39;s processing pass begins.
Definition: VoiceCallback.h:62
VoiceCallbackのコールバック定義用インターフェース
Definition: IVoiceCallbackDelegate.h:14
VoiceCallback & operator=(VoiceCallback &&obj)=default
ムーブ代入演算子のオーバーロード
~VoiceCallback()=default
デストラクタ
Definition: CompressedAudio.cpp:13
void STDMETHODCALLTYPE OnVoiceError(void *pBufferContext, HRESULT Error)
Called in the event of a critical error during voice processing, such as a failing xAPO or an error f...
Definition: VoiceCallback.cpp:28
void STDMETHODCALLTYPE OnBufferEnd(void *pBufferContext)
Called when this voice has just finished processing a buffer.
Definition: VoiceCallback.cpp:20
void STDMETHODCALLTYPE OnStreamEnd()
Called when this voice has just finished playing a buffer stream (as marked with the XAUDIO2_END_OF_S...
Definition: VoiceCallback.cpp:16
void STDMETHODCALLTYPE OnBufferStart(void *pBufferContext)
Called when this voice is about to start processing a new buffer.
Definition: VoiceCallback.h:75
void STDMETHODCALLTYPE OnVoiceProcessingPassEnd()
Called just after this voice&#39;s processing pass ends.
Definition: VoiceCallback.h:56
構築:   doxygen 1.8.14