X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=snd_mix.c;h=03ba042a6a71a027edabf171fa6031aba7bff7e9;hb=2b008eecf18ff82581da5111de80891b6f7a351e;hp=7aef154ee0db5173bccda01ebca71192eb7da54e;hpb=af9b88529d08cdf7a5466c98edc20a0b0b19e72f;p=xonotic%2Fdarkplaces.git diff --git a/snd_mix.c b/snd_mix.c index 7aef154e..03ba042a 100644 --- a/snd_mix.c +++ b/snd_mix.c @@ -32,14 +32,13 @@ typedef struct portable_samplepair_s portable_sampleframe_t paintbuffer[PAINTBUFFER_SIZE]; // FIXME: this desyncs with the video too easily -extern qboolean cl_capturevideo_active; extern void SCR_CaptureVideo_SoundFrame(unsigned char *bufstereo16le, size_t length, int rate); void S_CaptureAVISound(portable_sampleframe_t *buf, size_t length) { int n; size_t i; unsigned char out[PAINTBUFFER_SIZE * 4]; - if (!cl_capturevideo_active) + if (!cls.capturevideo_active) return; // write the sound buffer as little endian 16bit interleaved stereo for(i = 0;i < length;i++) @@ -349,8 +348,6 @@ void S_PaintChannels(int endtime) sfx = ch->sfx; if (!sfx) continue; - if (sfx->fetcher) - j++; for (j = 0;j < SND_LISTENERS;j++) if (ch->listener_volume[j]) break; @@ -460,7 +457,7 @@ qboolean SND_PaintChannel (channel_t *ch, int count) if (ch->flags & CHANNELFLAG_FULLVOLUME) snd_vol = 256; else - snd_vol = volume.value * 256; + snd_vol = (int)(volume.value * 256); for (i = 0;i < SND_LISTENERS;i++) vol[i] = ch->listener_volume[i] * snd_vol;