ref: 8e5f152d104f69afa38b12e80439d378a369c71d
parent: 94d0eb470742c70f790de8ffb92f83a7ba88afa0
author: Sigrid Solveig Haflínudóttir <[email protected]>
date: Wed Nov 8 20:30:57 EST 2023
stepsnd: check if there is sound at all before doing anything
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@
BIN=${DESTDIR}${PREFIX}/bin
SDL2_CFLAGS=$$(pkg-config --cflags sdl2)
SDL2_LDFLAGS=$$(pkg-config --libs sdl2)
-CFLAGS?=-O2 -g -Wall -Wextra -Wno-unknown-pragmas -Wno-missing-field-initializers -Wno-implicit-fallthrough
+CFLAGS?=-O2 -ggdb -Wall -Wextra -Wno-unknown-pragmas -Wno-missing-field-initializers -Wno-implicit-fallthrough
CFLAGS+=-fms-extensions -I3rd/parg -Iunix -I. ${SDL2_CFLAGS}
LDFLAGS?=
LDFLAGS+=-lm ${SDL2_LDFLAGS}
--- a/snd.c
+++ b/snd.c
@@ -490,6 +490,8 @@
long ns;
Chan *c, *sum;
+ if(!ainit)
+ return;
VectorCopy(origin, listener_origin);
VectorCopy(forward, listener_forward);
VectorCopy(right, listener_right);