|
OpenTTD Source 20251117-master-g7398d2e290
|
Implementation of the XAudio2 sound driver. More...
#include <xaudio2_s.h>
Public Member Functions | |
| std::optional< std::string_view > | Start (const StringList ¶m) override |
| Initialises the XAudio2 driver. | |
| void | Stop () override |
| Terminates the XAudio2 driver. | |
| std::string_view | GetName () const override |
| Get the name of this driver. | |
Public Member Functions inherited from SoundDriver | |
| virtual void | MainLoop () |
| Called once every tick. | |
| virtual bool | HasOutput () const |
| Whether the driver has an output from which the user can hear sound. | |
Additional Inherited Members | |
Public Types inherited from Driver | |
| enum | Type : uint8_t { DT_BEGIN = 0 , DT_MUSIC = 0 , DT_SOUND , DT_VIDEO , DT_END } |
| The type of driver. More... | |
Static Public Member Functions inherited from SoundDriver | |
| static SoundDriver * | GetInstance () |
| Get the currently active instance of the sound driver. | |
Implementation of the XAudio2 sound driver.
Definition at line 16 of file xaudio2_s.h.
|
inlineoverridevirtual |
Get the name of this driver.
Implements Driver.
Definition at line 21 of file xaudio2_s.h.
|
overridevirtual |
Initialises the XAudio2 driver.
| parm | Driver parameters. |
Implements Driver.
Definition at line 134 of file xaudio2_s.cpp.
References CreateXAudio(), Debug, GetDriverParamInt(), and Stop().
|
overridevirtual |
Terminates the XAudio2 driver.
Implements Driver.
Definition at line 250 of file xaudio2_s.cpp.
Referenced by Start().