OpenTTD Source 20241224-master-gee860a5c8e
StreamingVoiceContext Class Reference

Implementation of the IXAudio2VoiceCallback interface. More...

Inheritance diagram for StreamingVoiceContext:

Public Member Functions

 StreamingVoiceContext (int bufferLength)
 
HRESULT SubmitBuffer ()
 
 STDMETHOD_ (void, OnVoiceProcessingPassStart)(UINT32) override
 
 STDMETHOD_ (void, OnVoiceProcessingPassEnd)() override
 
 STDMETHOD_ (void, OnStreamEnd)() override
 
 STDMETHOD_ (void, OnBufferStart)(void *) override
 
 STDMETHOD_ (void, OnBufferEnd)(void *) override
 
 STDMETHOD_ (void, OnLoopEnd)(void *) override
 
 STDMETHOD_ (void, OnVoiceError)(void *
 

Data Fields

IXAudio2SourceVoice * SourceVoice
 

Private Attributes

int bufferLength
 
char * buffer
 

Detailed Description

Implementation of the IXAudio2VoiceCallback interface.

Provides buffered audio to XAudio2 from the OpenTTD mixer.

Definition at line 47 of file xaudio2_s.cpp.

Constructor & Destructor Documentation

◆ StreamingVoiceContext()

StreamingVoiceContext::StreamingVoiceContext ( int  bufferLength)
inline

Definition at line 56 of file xaudio2_s.cpp.

◆ ~StreamingVoiceContext()

virtual StreamingVoiceContext::~StreamingVoiceContext ( )
inlinevirtual

Definition at line 62 of file xaudio2_s.cpp.

Member Function Documentation

◆ STDMETHOD_() [1/6]

StreamingVoiceContext::STDMETHOD_ ( void  ,
OnBufferEnd   
)
inlineoverride

Definition at line 100 of file xaudio2_s.cpp.

◆ STDMETHOD_() [2/6]

StreamingVoiceContext::STDMETHOD_ ( void  ,
OnBufferStart   
)
inlineoverride

Definition at line 96 of file xaudio2_s.cpp.

◆ STDMETHOD_() [3/6]

StreamingVoiceContext::STDMETHOD_ ( void  ,
OnLoopEnd   
)
inlineoverride

Definition at line 105 of file xaudio2_s.cpp.

◆ STDMETHOD_() [4/6]

StreamingVoiceContext::STDMETHOD_ ( void  ,
OnStreamEnd   
)
inlineoverride

Definition at line 92 of file xaudio2_s.cpp.

◆ STDMETHOD_() [5/6]

StreamingVoiceContext::STDMETHOD_ ( void  ,
OnVoiceProcessingPassEnd   
)
inlineoverride

Definition at line 88 of file xaudio2_s.cpp.

◆ STDMETHOD_() [6/6]

StreamingVoiceContext::STDMETHOD_ ( void  ,
OnVoiceProcessingPassStart   
)
inlineoverride

Definition at line 84 of file xaudio2_s.cpp.

◆ SubmitBuffer()

HRESULT StreamingVoiceContext::SubmitBuffer ( )
inline

Definition at line 67 of file xaudio2_s.cpp.

Field Documentation

◆ buffer

char* StreamingVoiceContext::buffer
private

Definition at line 51 of file xaudio2_s.cpp.

◆ bufferLength

int StreamingVoiceContext::bufferLength
private

Definition at line 50 of file xaudio2_s.cpp.

◆ SourceVoice

IXAudio2SourceVoice* StreamingVoiceContext::SourceVoice

Definition at line 54 of file xaudio2_s.cpp.


The documentation for this class was generated from the following file: