From 1783cfd9965c38d60cea3daff172c6657983719b Mon Sep 17 00:00:00 2001 From: Nicholas Tay Date: Thu, 28 Apr 2022 21:39:50 +1000 Subject: Initial working Windows playsound --- clak.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 clak.c (limited to 'clak.c') diff --git a/clak.c b/clak.c new file mode 100644 index 0000000..3a0c5bf --- /dev/null +++ b/clak.c @@ -0,0 +1,17 @@ +#include + +#include + +#include "board/boards.h" + +int main(void) +{ + float volume = 0.05; + DWORD channel_volume = volume * 0xFFFF; + waveOutSetVolume(NULL, (channel_volume << 16) | channel_volume); + while (1) { + PlaySound((const char *) board_mxblue_board_down_wav, NULL, SND_MEMORY | SND_SYNC | SND_NODEFAULT); + Sleep(500); + } + return 0; +} \ No newline at end of file -- cgit