mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-30 17:39:11 +08:00
889fa61c29
* [libsoundio] Add libsoundio port * [libsoundio] Add description and homepage * [libsoundio] WindowsStore not supported * [libsoundio] Fix libsoundio-config.cmake * [libsoundio] Fix CMakeLists for Linux
37 lines
806 B
Diff
37 lines
806 B
Diff
diff --git a/sio_microphone.c b/sio_microphone.c
|
|
index 0fa8cca..5c89656 100644
|
|
--- a/sio_microphone.c
|
|
+++ b/sio_microphone.c
|
|
@@ -45,10 +45,13 @@ static int prioritized_sample_rates[] = {
|
|
0,
|
|
};
|
|
|
|
-
|
|
+#ifdef _MSC_VER
|
|
+__declspec (noreturn)
|
|
+#else
|
|
__attribute__ ((cold))
|
|
__attribute__ ((noreturn))
|
|
__attribute__ ((format (printf, 1, 2)))
|
|
+#endif
|
|
static void panic(const char *format, ...) {
|
|
va_list ap;
|
|
va_start(ap, format);
|
|
diff --git a/sio_record.c b/sio_record.c
|
|
index 61d584d..c33b05e 100644
|
|
--- a/sio_record.c
|
|
+++ b/sio_record.c
|
|
@@ -12,7 +12,12 @@
|
|
#include <string.h>
|
|
#include <math.h>
|
|
#include <errno.h>
|
|
+#ifdef _WIN32
|
|
+#include <windows.h>
|
|
+#define sleep(n) Sleep(n * 1000)
|
|
+#else
|
|
#include <unistd.h>
|
|
+#endif
|
|
|
|
struct RecordContext {
|
|
struct SoundIoRingBuffer *ring_buffer;
|