This commit is contained in:
John Alanbrook 2022-06-23 18:16:39 +00:00
parent bcecb67685
commit 3842a1a9ff
2 changed files with 78 additions and 74 deletions

View file

@ -1,5 +1,5 @@
#procs != nproc
#MAKEFLAGS = --jobs=$(procs)
procs != nproc
MAKEFLAGS = --jobs=$(procs)
UNAME != uname
@ -75,10 +75,14 @@ edirs += ./source/engine/thirdparty/Chipmunk2D/include ./source/engine/thirdpart
includeflag != $(call prefix,$(edirs) $(eddirs) $(pindirs) $(bsdirs),-I)
COMPINCLUDE = $(edirs) $(eddirs) $(pindirs) $(bsdirs)
#COMPILER_FLAGS specifies the additional compilation options we're using
WARNING_FLAGS = -Wno-everything#-Wall -Wextra -Wwrite-strings -Wno-unused-parameter -Wno-unused-function -Wno-missing-braces -Wno-incompatible-function-pointer-types -Wno-gnu-statement-expression -Wno-complex-component-init -pedantic
#COMPILER_FLAGS = $(includeflag) -g -O0 $(WARNING_FLAGS) -DGLEW_STATIC -D_GLFW_X11 -D_POSIX_C_SOURCE=1993809L -c -MMD -MP $< -o $@
COMPILER_FLAGS = $(includeflag) -I/usr/local/include -g -O0 $(WARNING_FLAGS) -DGLEW_STATIC -D_GLFW_X11 -D_POSIX_C_SOURCE=1993809L -c $< -o $@
COMPILER_FLAGS = $(includeflag) -I/usr/local/include -g -O0 $(WARNING_FLAGS) -MD -c $< -o $@
#-D_POSIX_C_SOURCE=1993809L
LIBPATH = -L./bin -L/usr/local/lib -L/usr/local/lib/tcc
@ -89,8 +93,8 @@ ifeq ($(UNAME), Windows_NT)
CLIBS = glew32
EXT = .exe
else
LINKER_FLAGS = -fPIC -rdynamic
ELIBS = m c engine editor glfw3
LINKER_FLAGS = -fuse-ld=lld #/usr/local/lib/tcc/bcheck.o /usr/local/lib/tcc/bt-exe.o /usr/local/lib/tcc/bt-log.o
ELIBS = m c engine editor glfw3 tcc1
CLIBS =
EXT =
endif
@ -117,22 +121,22 @@ LINK = $(LIBPATH) $(LINKER_FLAGS) $(LELIBS) -o $@
engine: $(yuginec:.%.c=$(objprefix)%.o) $(ENGINE)
@echo Linking engine
@$(CC) $^ $(LINK)
@$(CC) $@ $(LINK)
@echo Finished build
editor: $(yuginec:.%.c=$(objprefix)%.o) $(EDITOR) $(ENGINE)
@echo Linking editor
$(CC) $^ $(LINK)
@$(CC) $^ $(LINK)
@echo Finished build
$(ENGINE): $(eobjects) bin/libglfw3.a
@echo Making library engine.a
@ar -r $(ENGINE) $^
@ar r $(ENGINE) $(eobjects)
@cp -u -r $(ehead) $(INCLUDE)
$(EDITOR): $(edobjects)
@echo Making editor library
@ar -r $(EDITOR) $^
@ar r $(EDITOR) $^
@cp -u -r $(edhead) $(INCLUDE)
xbrainstorm: $(bsobjects) $(ENGINE) $(EDITOR)
@ -147,8 +151,8 @@ pinball: $(ENGINE) $(pinobjects)
bin/libglfw3.a:
@echo Making GLFW
make glfw/build
cp glfw/build/src/libglfw3.a bin/libglfw3.a
@make glfw/build
@cp glfw/build/src/libglfw3.a bin/libglfw3.a
$(objprefix)/%.o:%.c
@mkdir -p $(@D)

View file

@ -2823,10 +2823,10 @@ static const uint8_t PLM_AUDIO_QUANT_LUT_STEP_1[2][16] = {
};
// Quantizer lookup, step 2: bitrate class, sample rate -> B2 table idx, sblimit
static const uint8_t PLM_AUDIO_QUANT_TAB_A = (27 | 64); // Table 3-B.2a: high-rate, sblimit = 27
static const uint8_t PLM_AUDIO_QUANT_TAB_B = (30 | 64); // Table 3-B.2b: high-rate, sblimit = 30
static const uint8_t PLM_AUDIO_QUANT_TAB_C = 8; // Table 3-B.2c: low-rate, sblimit = 8
static const uint8_t PLM_AUDIO_QUANT_TAB_D = 12; // Table 3-B.2d: low-rate, sblimit = 12
#define PLM_AUDIO_QUANT_TAB_A (27 | 64) // Table 3-B.2a: high-rate, sblimit = 27
#define PLM_AUDIO_QUANT_TAB_B (30 | 64) // Table 3-B.2b: high-rate, sblimit = 30
#define PLM_AUDIO_QUANT_TAB_C 8 // Table 3-B.2c: low-rate, sblimit = 8
#define PLM_AUDIO_QUANT_TAB_D 12 // Table 3-B.2d: low-rate, sblimit = 12
static const uint8_t QUANT_LUT_STEP_2[3][3] = {
//44.1 kHz, 48 kHz, 32 kHz