aboutsummaryrefslogtreecommitdiff
path: root/core/sys
diff options
context:
space:
mode:
authorThomas la Cour <tlc@hyrtwol.dk>2024-03-01 16:36:18 +0100
committerThomas la Cour <tlc@hyrtwol.dk>2024-03-03 19:53:33 +0100
commita783d4ce5b02fd36749eb80def54bbc1e53152e5 (patch)
tree03cb24e4204c7886a5f15df10ef143e44325c2c3 /core/sys
parenta7b09a24b7c36f7e0b929cbf5a4a7c4e24e49333 (diff)
Callback types
Diffstat (limited to 'core/sys')
-rw-r--r--core/sys/windows/winmm.odin16
1 files changed, 12 insertions, 4 deletions
diff --git a/core/sys/windows/winmm.odin b/core/sys/windows/winmm.odin
index 141c6fe0c..8ddef29c0 100644
--- a/core/sys/windows/winmm.odin
+++ b/core/sys/windows/winmm.odin
@@ -268,10 +268,6 @@ HWAVEOUT :: distinct HANDLE
LPHWAVEIN :: ^HWAVEIN
LPHWAVEOUT :: ^HWAVEOUT
-//typedef void (CALLBACK DRVCALLBACK)(HDRVR hdrvr, UINT uMsg, DWORD_PTR dwUser, DWORD_PTR dw1, DWORD_PTR dw2);
-//WAVECALLBACK :: DRVCALLBACK
-//LPWAVECALLBACK :: ^WAVECALLBACK
-
// https://learn.microsoft.com/en-us/windows/win32/multimedia/multimedia-timer-structures
MMTIME :: struct {
wType: UINT,
@@ -300,6 +296,9 @@ MAXPNAMELEN :: 32
MAXERRORLENGTH :: 256
MMVERSION :: UINT
+/* flags for wFormatTag field of WAVEFORMAT */
+WAVE_FORMAT_PCM :: 1
+
WAVEFORMATEX :: struct {
wFormatTag: WORD,
nChannels: WORD,
@@ -366,3 +365,12 @@ SND_APPLICATION :: 0x0080 /* look for application specific association */
SND_SENTRY :: 0x00080000 /* Generate a SoundSentry event with this sound */
SND_RING :: 0x00100000 /* Treat this as a "ring" from a communications app - don't duck me */
SND_SYSTEM :: 0x00200000 /* Treat this as a system sound */
+
+
+CALLBACK_TYPEMASK :: 0x00070000 /* callback type mask */
+CALLBACK_NULL :: 0x00000000 /* no callback */
+CALLBACK_WINDOW :: 0x00010000 /* dwCallback is a HWND */
+CALLBACK_TASK :: 0x00020000 /* dwCallback is a HTASK */
+CALLBACK_FUNCTION :: 0x00030000 /* dwCallback is a FARPROC */
+CALLBACK_THREAD :: CALLBACK_TASK /* thread ID replaces 16 bit task */
+CALLBACK_EVENT :: 0x00050000 /* dwCallback is an EVENT Handle */