Skip to content

Commit

Permalink
* Oops. Rename cl_avidemo to cl_aviFrameRate
Browse files Browse the repository at this point in the history
  • Loading branch information
timangus committed Jan 6, 2006
1 parent 70c9c62 commit a166f21
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions code/client/cl_avi.c
Expand Up @@ -332,9 +332,9 @@ qboolean CL_OpenAVIForWriting( const char *fileName )
Com_Memset( &afd, 0, sizeof( aviFileData_t ) );

// Don't start if a framerate has not been chosen
if( cl_avidemo->integer <= 0 )
if( cl_aviFrameRate->integer <= 0 )
{
Com_Printf( S_COLOR_RED "cl_avidemo must be >= 1\n" );
Com_Printf( S_COLOR_RED "cl_aviFrameRate must be >= 1\n" );
return qfalse;
}

Expand All @@ -349,7 +349,7 @@ qboolean CL_OpenAVIForWriting( const char *fileName )

Q_strncpyz( afd.fileName, fileName, MAX_QPATH );

afd.frameRate = cl_avidemo->integer;
afd.frameRate = cl_aviFrameRate->integer;
afd.framePeriod = (int)( 1000000.0f / afd.frameRate );
afd.width = cls.glconfig.vidWidth;
afd.height = cls.glconfig.vidHeight;
Expand All @@ -375,7 +375,7 @@ qboolean CL_OpenAVIForWriting( const char *fileName )
while( ( afd.a.rate % suggestRate ) && suggestRate >= 1 )
suggestRate--;

Com_Printf( S_COLOR_YELLOW "WARNING: cl_avidemo is not a divisor "
Com_Printf( S_COLOR_YELLOW "WARNING: cl_aviFrameRate is not a divisor "
"of the audio rate, suggest %d\n", suggestRate );
}

Expand Down Expand Up @@ -484,7 +484,7 @@ void CL_WriteAVIAudioFrame( const byte *pcmBuffer, int size )
bytesInBuffer += size;

// Only write if we have a frame's worth of audio
if( bytesInBuffer >= (int)ceil( afd.a.rate / cl_avidemo->value ) *
if( bytesInBuffer >= (int)ceil( afd.a.rate / cl_aviFrameRate->value ) *
afd.a.sampleSize )
{
int chunkOffset = afd.fileSize - afd.moviOffset - 8;
Expand Down
8 changes: 4 additions & 4 deletions code/client/cl_main.c
Expand Up @@ -44,7 +44,7 @@ cvar_t *cl_shownet;
cvar_t *cl_showSend;
cvar_t *cl_timedemo;
cvar_t *cl_autoRecordDemo;
cvar_t *cl_avidemo;
cvar_t *cl_aviFrameRate;
cvar_t *cl_aviMotionJpeg;
cvar_t *cl_forceavidemo;

Expand Down Expand Up @@ -2026,13 +2026,13 @@ void CL_Frame ( int msec ) {
}

// if recording an avi, lock to a fixed fps
if ( CL_VideoRecording( ) && cl_avidemo->integer && msec) {
if ( CL_VideoRecording( ) && cl_aviFrameRate->integer && msec) {
// save the current screen
if ( cls.state == CA_ACTIVE || cl_forceavidemo->integer) {
CL_TakeVideoFrame( );

// fixed time for next frame'
msec = (int)ceil( (1000.0f / cl_avidemo->value) * com_timescale->value );
msec = (int)ceil( (1000.0f / cl_aviFrameRate->value) * com_timescale->value );
if (msec == 0) {
msec = 1;
}
Expand Down Expand Up @@ -2414,7 +2414,7 @@ void CL_Init( void ) {

cl_timedemo = Cvar_Get ("timedemo", "0", 0);
cl_autoRecordDemo = Cvar_Get ("cl_autoRecordDemo", "0", CVAR_ARCHIVE);
cl_avidemo = Cvar_Get ("cl_avidemo", "25", CVAR_ARCHIVE);
cl_aviFrameRate = Cvar_Get ("cl_aviFrameRate", "25", CVAR_ARCHIVE);
cl_aviMotionJpeg = Cvar_Get ("cl_aviMotionJpeg", "1", CVAR_ARCHIVE);
cl_forceavidemo = Cvar_Get ("cl_forceavidemo", "0", 0);

Expand Down
2 changes: 1 addition & 1 deletion code/client/client.h
Expand Up @@ -343,7 +343,7 @@ extern cvar_t *m_side;
extern cvar_t *m_filter;

extern cvar_t *cl_timedemo;
extern cvar_t *cl_avidemo;
extern cvar_t *cl_aviFrameRate;
extern cvar_t *cl_aviMotionJpeg;

extern cvar_t *cl_activeAction;
Expand Down
2 changes: 1 addition & 1 deletion code/client/snd_dma.c
Expand Up @@ -1141,7 +1141,7 @@ void S_GetSoundtime(void)

if( CL_VideoRecording( ) )
{
s_soundtime += (int)ceil( dma.speed / cl_avidemo->value );
s_soundtime += (int)ceil( dma.speed / cl_aviFrameRate->value );
return;
}

Expand Down

0 comments on commit a166f21

Please sign in to comment.