mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
Merge branch 'iku'
This commit is contained in:
commit
c4fa87cae1
3 changed files with 18 additions and 13 deletions
|
@ -14,13 +14,14 @@ if test "x$mingw" != xyes -a "x$enable_xmms" == xyes; then
|
|||
fi
|
||||
AC_SUBST(CD_CFLAGS)
|
||||
|
||||
|
||||
CDTYPE=""
|
||||
CD_CFLAGS=""
|
||||
CD_PLUGIN_TARGETS=""
|
||||
if test "x$HAVE_VORBIS" = xyes; then
|
||||
CD_PLUGIN_TARGETS="cd_file.la"
|
||||
else
|
||||
CD_PLUGIN_TARGETS=""
|
||||
CDTYPE=" OGG"
|
||||
CD_PLUGIN_TARGETS="cd_file.la"
|
||||
fi
|
||||
unset CDTYPE
|
||||
|
||||
AC_MSG_CHECKING(for CD audio support)
|
||||
|
||||
|
@ -74,7 +75,7 @@ QF_maGiC_VALUE
|
|||
CDTYPE="$CDTYPE WIN32"
|
||||
CD_PLUGIN_TARGETS="$CD_PLUGIN_TARGETS cd_win.la"
|
||||
)
|
||||
if test "$CDTYPE"; then
|
||||
if test "x$CDTYPE" != "x"; then
|
||||
AC_MSG_RESULT([$CDTYPE])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
|
|
|
@ -95,7 +95,7 @@ VISIBLE int
|
|||
CDAudio_Init (void)
|
||||
{
|
||||
PI_RegisterPlugins (cd_plugin_list);
|
||||
cd_plugin = Cvar_Get ("cd_plugin", "file", CVAR_ROM, NULL,
|
||||
cd_plugin = Cvar_Get ("cd_plugin", "sdl", CVAR_ROM, NULL,
|
||||
"CD Plugin to use");
|
||||
|
||||
if (COM_CheckParm ("-nocdaudio"))
|
||||
|
|
|
@ -75,14 +75,16 @@ static snd_output_funcs_t *snd_output_funcs;
|
|||
static void
|
||||
s_xfer_paint_buffer (int endtime)
|
||||
{
|
||||
int count, out_idx, out_mask, step, val;
|
||||
int count, out_idx, out_max, step, val;
|
||||
float snd_vol;
|
||||
float *p;
|
||||
|
||||
p = (float *) snd_paintbuffer;
|
||||
count = (endtime - snd_paintedtime) * snd_shm->channels;
|
||||
out_mask = (snd_shm->frames * snd_shm->channels) - 1;
|
||||
out_idx = (snd_paintedtime * snd_shm->channels) & out_mask;
|
||||
out_max = (snd_shm->frames * snd_shm->channels) - 1;
|
||||
out_idx = snd_paintedtime * snd_shm->channels;
|
||||
while (out_idx > out_max)
|
||||
out_idx -= out_max + 1;
|
||||
step = 3 - snd_shm->channels;
|
||||
snd_vol = snd_volume->value;
|
||||
|
||||
|
@ -96,8 +98,9 @@ s_xfer_paint_buffer (int endtime)
|
|||
val = 0x7fff;
|
||||
else if (val < -0x8000)
|
||||
val = -0x8000;
|
||||
out[out_idx] = val;
|
||||
out_idx = (out_idx + 1) & out_mask;
|
||||
out[out_idx++] = val;
|
||||
if (out_idx > out_max)
|
||||
out_idx = 0;
|
||||
}
|
||||
} else if (snd_shm->samplebits == 8) {
|
||||
unsigned char *out = (unsigned char *) snd_shm->buffer;
|
||||
|
@ -109,8 +112,9 @@ s_xfer_paint_buffer (int endtime)
|
|||
val = 0x7f;
|
||||
else if (val < -0x80)
|
||||
val = -0x80;
|
||||
out[out_idx] = val + 0x80;
|
||||
out_idx = (out_idx + 1) & out_mask;
|
||||
out[out_idx++] = val + 0x80;
|
||||
if (out_idx > out_max)
|
||||
out_idx = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue