shithub: qk1

Download patch

ref: 7117f132a430e071ba1c77ccc41c5b9e1256a315
parent: 9a09ea8aae69d9a62c3c6fde8ddac80025214ab0
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Sat Dec 23 21:00:03 EST 2023

openal: don't start the sounds too early

--- a/unix/snd_openal.c
+++ b/unix/snd_openal.c
@@ -222,10 +222,15 @@
 
 	if(dev == nil)
 		return;
-	USED(rt);
-	alListenerfv(AL_POSITION, zp); ALERR();
-	alListenerfv(AL_ORIENTATION, fwup); ALERR();
-	alListenerf(AL_GAIN, volume.value); ALERR();
+
+	if(zp == vec3_origin && fw == vec3_origin && rt == vec3_origin){
+		alListenerf(AL_GAIN, 0);
+		ALERR();
+	}else{
+		alListenerfv(AL_POSITION, zp); ALERR();
+		alListenerfv(AL_ORIENTATION, fwup); ALERR();
+		alListenerf(AL_GAIN, volume.value); ALERR();
+	}
 }
 
 void