coastline 0.0.4
Loading...
Searching...
No Matches
audiooutput.h
Go to the documentation of this file.
1#ifndef COASTLINE_EAR_AUDIOOUTPUT_H
2#define COASTLINE_EAR_AUDIOOUTPUT_H
3
4#if TGR_PLATFORM == TGR_PLATFORM_WIN
5#include <cstdint>
6
7#include <dsound.h>
8#include <windows.h>
9
12public:
31
32private:
33 void FailInitialization(std::uint32_t error);
34
35 IDirectSound *device;
36 IDirectSoundBuffer *primaryBuffer;
37};
38
45extern EarDirectSoundOutput *g_pEarDirectSoundOutput;
47#endif
48
49#ifdef __cplusplus
50extern "C" {
51#endif
52
65#ifdef __cplusplus
66}
67#endif
68
69#endif /* COASTLINE_EAR_AUDIOOUTPUT_H */
int InitializeEarAudioOutput(void)
Create shared Windows output or open the SDL mixer; existing Windows output must be shut down.
void ShutdownEarAudioOutput(void)
Allocated shared Windows output instance, or null before creation or after shutdown.
Windows DirectSound output with a continuously playing 22050 Hz stereo 16-bit primary buffer.
Definition audiooutput.h:11
EarDirectSoundOutput()
Initialise COM, a DirectSound device, and its primary buffer using the assigned game window.
IDirectSound * GetDirectSoundInterface()
~EarDirectSoundOutput()
Stop and release available primary-buffer and device resources, then uninitialise COM.