miniaudio

- simplify foreign
- enable SUPPORT_SNDIO on OpenBSD
- correct ptr type for SUPPORT_PULSEAUDIO (Linux) and SUPPORT_COREAUDIO (Darwin)
This commit is contained in:
Sébastien Marie
2022-03-02 18:35:13 +00:00
parent 25430333ba
commit 3145935d6b
11 changed files with 79 additions and 32 deletions
+8 -3
View File
@@ -2,8 +2,13 @@ package miniaudio
import "core:c"
when ODIN_OS == .Windows { foreign import lib "lib/miniaudio.lib" }
when ODIN_OS == .Linux { foreign import lib "lib/miniaudio.a" }
when ODIN_OS == .Windows {
foreign import lib "lib/miniaudio.lib"
} else when ODIN_OS == .Linux {
foreign import lib "lib/miniaudio.a"
} else {
foreign import lib "system:miniaudio"
}
waveform_type :: enum c.int {
sine,
@@ -82,4 +87,4 @@ foreign lib {
noise_set_amplitude :: proc(pNoise: ^noise, amplitude: f64) -> result ---
noise_set_seed :: proc(pNoise: ^noise, seed: i32) -> result ---
noise_set_type :: proc(pNoise: ^noise, type: noise_type) -> result ---
}
}