From ac778868497fed29f52f18fbd4dc8f27af2f04a0 Mon Sep 17 00:00:00 2001 From: lmp Date: Mon, 6 Nov 2023 18:42:27 +0100 Subject: [PATCH] all: fix running on Windows, run vfmt over all files --- miniaudio.auto.c.v | 6 ++++-- miniaudio_windows.c.v | 2 +- x/miniaudio.v | 6 +++--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/miniaudio.auto.c.v b/miniaudio.auto.c.v index 695cd90..4a26978 100644 --- a/miniaudio.auto.c.v +++ b/miniaudio.auto.c.v @@ -369,7 +369,8 @@ pub enum ThreadPriority { default = C.ma_thread_priority_default // 0, } -/* See miniaudio_default.c.v and miniaudio_windows.c.v +/* +See miniaudio_default.c.v and miniaudio_windows.c.v [typedef] struct C.ma_event { pub mut: @@ -380,7 +381,8 @@ pub mut: */ pub type Event = C.ma_event -/* See miniaudio_default.c.v and miniaudio_windows.c.v +/* +See miniaudio_default.c.v and miniaudio_windows.c.v [typedef] struct C.ma_semaphore { pub mut: diff --git a/miniaudio_windows.c.v b/miniaudio_windows.c.v index dde7a18..82887f9 100644 --- a/miniaudio_windows.c.v +++ b/miniaudio_windows.c.v @@ -7,7 +7,7 @@ module miniaudio // C typedef aliases used -pub type C.ma_mutex = C.ma_handle +pub type C.ma_mutex = voidptr [typedef] pub struct C.ma_event {} diff --git a/x/miniaudio.v b/x/miniaudio.v index 582c593..5774937 100644 --- a/x/miniaudio.v +++ b/x/miniaudio.v @@ -289,9 +289,9 @@ pub fn (mut d AudioDevice) free() { // C.ma_decoder_uninit(d.decoder) C.ma_context_uninit(d.context) C.ma_mutex_uninit(d.mutex) - d.context = &C.ma_context(unsafe{nil}) - d.mutex = &C.ma_mutex(unsafe{nil}) - d.device = &C.ma_device(unsafe{nil}) + d.context = &C.ma_context(unsafe { nil }) + d.mutex = &C.ma_mutex(unsafe { nil }) + d.device = &C.ma_device(unsafe { nil }) // d.decoder = 0 }