add miniaudio

This commit is contained in:
Nishi 2026-01-27 09:47:09 +09:00
commit 052ee31e9c
Signed by: nishi
GPG key ID: 27EF69B208EB9343
5 changed files with 95849 additions and 7 deletions

View file

@ -19,6 +19,7 @@ add_subdirectory(external/ode)
include_directories(external/stb)
include_directories(external/jar)
include_directories(external/miniaudio)
file(GLOB GearSrc_SRC src/*.c)
@ -28,7 +29,7 @@ target_compile_definitions(GearSrc PRIVATE _GEARSRC)
target_link_libraries(GearSrc PRIVATE ode lz4)
target_link_options(GearSrc PRIVATE -static-libgcc -static-libstdc++)
if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
target_link_libraries(GearSrc PRIVATE m)
target_link_libraries(GearSrc PRIVATE m pthread)
endif()
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
target_link_libraries(GearSrc PRIVATE dl)

2
engine/external/miniaudio/miniaudio.c vendored Normal file
View file

@ -0,0 +1,2 @@
#define MINIAUDIO_IMPLEMENTATION
#include "miniaudio.h"

95844
engine/external/miniaudio/miniaudio.h vendored Normal file

File diff suppressed because it is too large Load diff

1
engine/src/miniaudio.c Normal file
View file

@ -0,0 +1 @@
#include <miniaudio.c>

View file

@ -141,12 +141,6 @@ void GSSkyBoxDraw(GSSkyBox skybox) {
v[3][0] = 1 + s, v[3][1] = -1, v[3][2] = -1 - s;
}
for(j = 0; j < 4; j++) {
for(k = 0; k < 3; k++) {
v[j][k] *= GSGLMaxDistance / 2;
}
}
GSGLTextureSet(gl, tex);
GSGLPolygon(gl, 4, v, t, n);