coastline 0.0.4
Loading...
Searching...
No Matches
timer.h
Go to the documentation of this file.
1#ifndef COASTLINE_EAR_TIMER_H
2#define COASTLINE_EAR_TIMER_H
3
4#if TGR_PLATFORM == TGR_PLATFORM_WIN
5#include <windows.h>
6// Multimedia declarations require the core Windows SDK types first.
7#include <mmsystem.h>
8#else
9#include <SDL3/SDL_timer.h>
10
11#include "common/types.h"
12#endif
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
22void __stdcall EarShutDownTimerExportWrapper(void);
23
30void __stdcall EAR_DLL_ShutDownTimer(void);
31
39int __stdcall EAR_DLL_StartTimer(void);
40
46int __stdcall EarStartTimerExportWrapper(void);
47
48#if TGR_PLATFORM == TGR_PLATFORM_WIN
54extern UINT g_uPlaybackTimerId;
55
60extern WORD g_wTimerResolutionMs;
61
66extern TIMECAPS g_earTimerCapabilities;
68#else
74extern SDL_TimerID g_uPlaybackTimerId;
76
83DWORD GetEarTimeMilliseconds(void);
84#endif
85
91extern DWORD g_dwPreviousPlaybackUpdateTimeMs;
92
98extern DWORD g_dwPlaybackUpdateTimeMs;
100
101#ifdef __cplusplus
102}
103#endif
104
105#endif /* COASTLINE_EAR_TIMER_H */
int __stdcall EarStartTimerExportWrapper(void)
Forward periodic timer creation to EAR_DLL_StartTimer().
void __stdcall EarShutDownTimerExportWrapper(void)
Forward timer cancellation to EAR_DLL_ShutDownTimer().
int __stdcall EAR_DLL_StartTimer(void)
Attempt to replace an existing timer and schedule playback updates every 50 milliseconds.
void __stdcall EAR_DLL_ShutDownTimer(void)
Cancel the periodic playback timer if present and clear its identifier on success.
The integer and floating-point types of the console, for headers shared with Windows.
typedef DWORD
typedef UINT
typedef WORD