X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=snd_mix.c;h=e27b97dd65e89e12fef7eac176ee414139c295ec;hb=d2878a072b9a0399379741b3e19536b7327cb388;hp=a006f68f7fac6ed1dceeb284b8eeb9b3402321eb;hpb=78da49ba852ed63b1079cc1ab8545e82c4abd78e;p=xonotic%2Fdarkplaces.git diff --git a/snd_mix.c b/snd_mix.c index a006f68f..e27b97dd 100644 --- a/snd_mix.c +++ b/snd_mix.c @@ -40,8 +40,7 @@ void S_CaptureAVISound(portable_samplepair_t *buf, int length) { if (cl_avidemo_soundfile == NULL) { - sprintf (filename, "%s/dpavi.wav", com_gamedir); - cl_avidemo_soundfile = fopen(filename, "wb"); + cl_avidemo_soundfile = FS_Open ("dpavi.wav", "wb", false); memset(out, 0, 44); fwrite(out, 1, 44, cl_avidemo_soundfile); // header will be filled out when file is closed @@ -62,7 +61,7 @@ void S_CaptureAVISound(portable_samplepair_t *buf, int length) if (fwrite(out, 4, length, cl_avidemo_soundfile) < length) { Cvar_SetValueQuick(&cl_avidemo, 0); - Con_Printf("avi saving sound failed, out of disk space? stopping avi demo capture.\n"); + Con_Print("avi saving sound failed, out of disk space? stopping avi demo capture.\n"); } } else if (cl_avidemo_soundfile) @@ -314,9 +313,9 @@ void S_PaintChannels(int endtime) // if at end of loop, restart if (ltime >= ch->end) { - if (sc->loopstart >= 0) + if (sc->loopstart >= 0 || ch->forceloop) { - ch->pos = sc->loopstart; + ch->pos = bound(0, sc->loopstart, sc->length - 1); ch->end = ltime + sc->length - ch->pos; } else