Include audio mixer timings in r_speeds 2.

This commit is contained in:
Shpoike 2023-04-17 03:53:35 +01:00
parent 75c6527893
commit 96dd67b3d0
5 changed files with 22 additions and 11 deletions

View File

@ -78,6 +78,7 @@ void RSpeedShow(void)
RSpNames[RSPEED_PROTOCOL] = "Client Protocol"; RSpNames[RSPEED_PROTOCOL] = "Client Protocol";
RSpNames[RSPEED_SERVER] = "Server"; RSpNames[RSPEED_SERVER] = "Server";
RSpNames[RSPEED_AUDIO] = "Audio";
memset(RQntNames, 0, sizeof(RQntNames)); memset(RQntNames, 0, sizeof(RQntNames));
RQntNames[RQUANT_MSECS] = "Microseconds"; RQntNames[RQUANT_MSECS] = "Microseconds";

View File

@ -2811,10 +2811,6 @@ static void PM_Plugin_Source_Finished(void *ctx, vfsfile_t *f)
PM_ListDownloaded(&dl); PM_ListDownloaded(&dl);
} }
} }
else
{
Con_Printf("PM_Plugin_Source_Finished: stale\n");
}
VFS_CLOSE(f); VFS_CLOSE(f);
} }
static void PM_Plugin_Source_CacheFinished(void *ctx, vfsfile_t *f) static void PM_Plugin_Source_CacheFinished(void *ctx, vfsfile_t *f)
@ -2836,10 +2832,6 @@ static void PM_Plugin_Source_CacheFinished(void *ctx, vfsfile_t *f)
PM_ListDownloaded(&dl); PM_ListDownloaded(&dl);
} }
} }
else
{
Con_Printf("PM_Plugin_Source_CacheFinished: stale\n");
}
VFS_CLOSE(f); VFS_CLOSE(f);
} }
#endif #endif

View File

@ -753,6 +753,7 @@ enum {
RSPEED_PALETTEFLASHES, RSPEED_PALETTEFLASHES,
RSPEED_2D, RSPEED_2D,
RSPEED_SERVER, RSPEED_SERVER,
RSPEED_AUDIO,
RSPEED_SETUP, RSPEED_SETUP,
RSPEED_SUBMIT, RSPEED_SUBMIT,
RSPEED_PRESENT, RSPEED_PRESENT,

View File

@ -3889,7 +3889,7 @@ static void S_UpdateCard(soundcardinfo_t *sc)
if (ch->sfx && (ch->vol[0] || ch->vol[1]) ) if (ch->sfx && (ch->vol[0] || ch->vol[1]) )
{ {
if (snd_show.ival > 1) if (snd_show.ival > 1)
Con_Printf ("%i, %i %i %i %i %i %i %s\n", i, ch->vol[0], ch->vol[1], ch->vol[2], ch->vol[3], ch->vol[4], ch->vol[5], ch->sfx->name); Con_Printf ("%i, %i/%i/%i/%i/%i/%i %s\n", i, ch->vol[0], ch->vol[1], ch->vol[2], ch->vol[3], ch->vol[4], ch->vol[5], ch->sfx->name);
active++; active++;
} }
else if (ch->sfx) else if (ch->sfx)
@ -3961,11 +3961,12 @@ int S_GetMixerTime(soundcardinfo_t *sc)
void S_Update (void) void S_Update (void)
{ {
soundcardinfo_t *sc; soundcardinfo_t *sc;
RSpeedMark();
S_LockMixer(); S_LockMixer();
for (sc = sndcardinfo; sc; sc = sc->next) for (sc = sndcardinfo; sc; sc = sc->next)
S_UpdateCard(sc); S_UpdateCard(sc);
S_UnlockMixer(); S_UnlockMixer();
RSpeedEnd(RSPEED_AUDIO);
} }
void S_ExtraUpdate (void) void S_ExtraUpdate (void)

View File

@ -2012,6 +2012,7 @@ static qboolean Shader_LoadPermutations(char *name, program_t *prog, char *scrip
for (end = *name?strchr(name+1, '#'):NULL; end && *end; ) for (end = *name?strchr(name+1, '#'):NULL; end && *end; )
{ {
size_t startoffset=offset;
char *start = end+1; char *start = end+1;
end = strchr(start, '#'); end = strchr(start, '#');
if (!end) if (!end)
@ -2027,11 +2028,26 @@ static qboolean Shader_LoadPermutations(char *name, program_t *prog, char *scrip
{ {
if (*start == '=') if (*start == '=')
{ {
if (offset == startoffset+8)
break;
start++; start++;
prescript[offset++] = ' '; prescript[offset++] = ' ';
break; break;
} }
prescript[offset++] = toupper(*start++); if ((*start >='a'&&*start<='z')||(*start >='A'&&*start<='Z')||*start=='_'||(*start >='0'&&*start<='9'&&offset>startoffset+8))
prescript[offset++] = toupper(*start++);
else
{ ///invalid symbol name...
offset = startoffset+8;
prescript[offset] = 0;
break;
}
}
if (offset == startoffset+8)
{ ///invalid symbol name...
offset = startoffset;
prescript[offset] = 0;
break;
} }
while (offset < sizeof(prescript) && start < end) while (offset < sizeof(prescript) && start < end)
prescript[offset++] = toupper(*start++); prescript[offset++] = toupper(*start++);