OpenTTD Source 20260206-master-g4d4e37dbf1
win32_s.cpp File Reference

Handling of sound for Windows. More...

#include "../stdafx.h"
#include "../openttd.h"
#include "../driver.h"
#include "../mixer.h"
#include "../core/bitmath_func.hpp"
#include "../core/math_func.hpp"
#include "win32_s.h"
#include <windows.h>
#include <mmsystem.h>
#include <versionhelpers.h>
#include "../os/windows/win32.h"
#include "../thread.h"
#include "../safeguards.h"

Go to the source code of this file.

Typedefs

using HeaderDataPair = std::pair<WAVEHDR, std::unique_ptr<CHAR[]>>

Functions

static void PrepareHeader (HeaderDataPair &hdr)
static DWORD WINAPI SoundThread (LPVOID)

Variables

static FSoundDriver_Win32 iFSoundDriver_Win32
static HWAVEOUT _waveout
static HeaderDataPair _wave_hdr [2]
static int _bufsize
static HANDLE _thread
static DWORD _threadId
static HANDLE _event

Detailed Description

Handling of sound for Windows.

Definition in file win32_s.cpp.

Typedef Documentation

◆ HeaderDataPair

using HeaderDataPair = std::pair<WAVEHDR, std::unique_ptr<CHAR[]>>

Definition at line 27 of file win32_s.cpp.

Function Documentation

◆ PrepareHeader()

void PrepareHeader ( HeaderDataPair & hdr)
static

Definition at line 36 of file win32_s.cpp.

◆ SoundThread()

DWORD WINAPI SoundThread ( LPVOID )
static

Definition at line 45 of file win32_s.cpp.

Variable Documentation

◆ _bufsize

int _bufsize
static

Definition at line 31 of file win32_s.cpp.

◆ _event

HANDLE _event
static

Definition at line 34 of file win32_s.cpp.

◆ _thread

HANDLE _thread
static

Definition at line 32 of file win32_s.cpp.

◆ _threadId

DWORD _threadId
static

Definition at line 33 of file win32_s.cpp.

◆ _wave_hdr

HeaderDataPair _wave_hdr[2]
static

Definition at line 30 of file win32_s.cpp.

◆ _waveout

HWAVEOUT _waveout
static

Definition at line 29 of file win32_s.cpp.

◆ iFSoundDriver_Win32

FSoundDriver_Win32 iFSoundDriver_Win32
static

Definition at line 25 of file win32_s.cpp.