Hopefully fixed miniaudio backend on Windows
Stupid BOOL type
This commit is contained in:
parent
156c01e672
commit
9af25f7c67
4 changed files with 5 additions and 3 deletions
|
@ -363,7 +363,7 @@ endif()
|
||||||
if(BACKEND_AUDIO MATCHES "SDL2")
|
if(BACKEND_AUDIO MATCHES "SDL2")
|
||||||
target_sources(CSE2 PRIVATE "src/Backends/Audio/SDL2.cpp")
|
target_sources(CSE2 PRIVATE "src/Backends/Audio/SDL2.cpp")
|
||||||
elseif(BACKEND_AUDIO MATCHES "miniaudio")
|
elseif(BACKEND_AUDIO MATCHES "miniaudio")
|
||||||
target_sources(CSE2 PRIVATE "src/Backends/Audio/miniaudio.cpp")
|
target_sources(CSE2 PRIVATE "src/Backends/Audio/miniaudio.cpp" "external/miniaudio.c")
|
||||||
|
|
||||||
# Link libdl, libm, and libpthread
|
# Link libdl, libm, and libpthread
|
||||||
include(CheckLibraryExists)
|
include(CheckLibraryExists)
|
||||||
|
|
2
Makefile
2
Makefile
|
@ -274,7 +274,7 @@ endif
|
||||||
ifeq ($(BACKEND_AUDIO), SDL2)
|
ifeq ($(BACKEND_AUDIO), SDL2)
|
||||||
SOURCES += src/Backends/Audio/SDL2.cpp
|
SOURCES += src/Backends/Audio/SDL2.cpp
|
||||||
else ifeq ($(BACKEND_AUDIO), miniaudio)
|
else ifeq ($(BACKEND_AUDIO), miniaudio)
|
||||||
SOURCES += src/Backends/Audio/miniaudio.cpp
|
SOURCES += src/Backends/Audio/miniaudio.cpp external/miniaudio.c
|
||||||
CSE2_LIBS += -ldl -lm -lpthread
|
CSE2_LIBS += -ldl -lm -lpthread
|
||||||
else
|
else
|
||||||
$(error Invalid BACKEND_AUDIO selected)
|
$(error Invalid BACKEND_AUDIO selected)
|
||||||
|
|
3
external/miniaudio.c
vendored
Normal file
3
external/miniaudio.c
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
#define MINIAUDIO_IMPLEMENTATION
|
||||||
|
#define MA_NO_DECODING
|
||||||
|
#include "miniaudio.h"
|
|
@ -6,7 +6,6 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#define MINIAUDIO_IMPLEMENTATION
|
|
||||||
#define MA_NO_DECODING
|
#define MA_NO_DECODING
|
||||||
#include "miniaudio.h"
|
#include "miniaudio.h"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue