]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - snd_mix.c
Revert "Revert "Build in subdirs"", as the issues seem to be ironed out now.
[xonotic/darkplaces.git] / snd_mix.c
index 2274f353ea5cdf6dc40915721de98d4a05d3b245..2299e3bf4770309a8e5f77794c2ab71361b9bf43 100644 (file)
--- a/snd_mix.c
+++ b/snd_mix.c
@@ -28,6 +28,7 @@ static portable_sampleframe_t paintbuffer_unswapped[PAINTBUFFER_SIZE];
 
 extern speakerlayout_t snd_speakerlayout; // for querying the listeners
 
+#ifdef CONFIG_CAPTURE_VIDEO
 static void S_CaptureAVISound(const portable_sampleframe_t *paintbuffer, size_t length)
 {
        size_t i;
@@ -46,6 +47,7 @@ static void S_CaptureAVISound(const portable_sampleframe_t *paintbuffer, size_t
 
        SCR_CaptureVideo_SoundFrame(paintbuffer_unswapped, length);
 }
+#endif
 
 extern cvar_t snd_softclip;
 
@@ -520,8 +522,10 @@ void S_MixToBuffer(void *stream, unsigned int bufferframes)
 
                S_SoftClipPaintBuffer(paintbuffer, totalmixframes, snd_renderbuffer->format.width, snd_renderbuffer->format.channels);
 
+#ifdef CONFIG_CAPTURE_VIDEO
                if (!snd_usethreadedmixing)
                        S_CaptureAVISound(paintbuffer, totalmixframes);
+#endif
 
                S_ConvertPaintBuffer(paintbuffer, outbytes, totalmixframes, snd_renderbuffer->format.width, snd_renderbuffer->format.channels);