* Oops. Rename cl_avidemo to cl_aviFrameRate

This commit is contained in:
Tim Angus 2006-01-06 22:28:07 +00:00
parent 70c9c62039
commit a166f2173a
4 changed files with 11 additions and 11 deletions

View File

@ -332,9 +332,9 @@ qboolean CL_OpenAVIForWriting( const char *fileName )
Com_Memset( &afd, 0, sizeof( aviFileData_t ) ); Com_Memset( &afd, 0, sizeof( aviFileData_t ) );
// Don't start if a framerate has not been chosen // 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; return qfalse;
} }
@ -349,7 +349,7 @@ qboolean CL_OpenAVIForWriting( const char *fileName )
Q_strncpyz( afd.fileName, fileName, MAX_QPATH ); 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.framePeriod = (int)( 1000000.0f / afd.frameRate );
afd.width = cls.glconfig.vidWidth; afd.width = cls.glconfig.vidWidth;
afd.height = cls.glconfig.vidHeight; afd.height = cls.glconfig.vidHeight;
@ -375,7 +375,7 @@ qboolean CL_OpenAVIForWriting( const char *fileName )
while( ( afd.a.rate % suggestRate ) && suggestRate >= 1 ) while( ( afd.a.rate % suggestRate ) && suggestRate >= 1 )
suggestRate--; 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 ); "of the audio rate, suggest %d\n", suggestRate );
} }
@ -484,7 +484,7 @@ void CL_WriteAVIAudioFrame( const byte *pcmBuffer, int size )
bytesInBuffer += size; bytesInBuffer += size;
// Only write if we have a frame's worth of audio // 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 ) afd.a.sampleSize )
{ {
int chunkOffset = afd.fileSize - afd.moviOffset - 8; int chunkOffset = afd.fileSize - afd.moviOffset - 8;

View File

@ -44,7 +44,7 @@ cvar_t *cl_shownet;
cvar_t *cl_showSend; cvar_t *cl_showSend;
cvar_t *cl_timedemo; cvar_t *cl_timedemo;
cvar_t *cl_autoRecordDemo; cvar_t *cl_autoRecordDemo;
cvar_t *cl_avidemo; cvar_t *cl_aviFrameRate;
cvar_t *cl_aviMotionJpeg; cvar_t *cl_aviMotionJpeg;
cvar_t *cl_forceavidemo; cvar_t *cl_forceavidemo;
@ -2026,13 +2026,13 @@ void CL_Frame ( int msec ) {
} }
// if recording an avi, lock to a fixed fps // 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 // save the current screen
if ( cls.state == CA_ACTIVE || cl_forceavidemo->integer) { if ( cls.state == CA_ACTIVE || cl_forceavidemo->integer) {
CL_TakeVideoFrame( ); CL_TakeVideoFrame( );
// fixed time for next frame' // 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) { if (msec == 0) {
msec = 1; msec = 1;
} }
@ -2414,7 +2414,7 @@ void CL_Init( void ) {
cl_timedemo = Cvar_Get ("timedemo", "0", 0); cl_timedemo = Cvar_Get ("timedemo", "0", 0);
cl_autoRecordDemo = Cvar_Get ("cl_autoRecordDemo", "0", CVAR_ARCHIVE); 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_aviMotionJpeg = Cvar_Get ("cl_aviMotionJpeg", "1", CVAR_ARCHIVE);
cl_forceavidemo = Cvar_Get ("cl_forceavidemo", "0", 0); cl_forceavidemo = Cvar_Get ("cl_forceavidemo", "0", 0);

View File

@ -343,7 +343,7 @@ extern cvar_t *m_side;
extern cvar_t *m_filter; extern cvar_t *m_filter;
extern cvar_t *cl_timedemo; extern cvar_t *cl_timedemo;
extern cvar_t *cl_avidemo; extern cvar_t *cl_aviFrameRate;
extern cvar_t *cl_aviMotionJpeg; extern cvar_t *cl_aviMotionJpeg;
extern cvar_t *cl_activeAction; extern cvar_t *cl_activeAction;

View File

@ -1141,7 +1141,7 @@ void S_GetSoundtime(void)
if( CL_VideoRecording( ) ) if( CL_VideoRecording( ) )
{ {
s_soundtime += (int)ceil( dma.speed / cl_avidemo->value ); s_soundtime += (int)ceil( dma.speed / cl_aviFrameRate->value );
return; return;
} }