r1223 - trunk/code/client
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Sat Dec 1 14:39:05 EST 2007
Author: tma
Date: 2007-12-01 14:39:03 -0500 (Sat, 01 Dec 2007)
New Revision: 1223
Modified:
trunk/code/client/cl_avi.c
Log:
* Fix poppy captured audio when recording videos
Modified: trunk/code/client/cl_avi.c
===================================================================
--- trunk/code/client/cl_avi.c 2007-11-30 18:32:52 UTC (rev 1222)
+++ trunk/code/client/cl_avi.c 2007-12-01 19:39:03 UTC (rev 1223)
@@ -250,14 +250,17 @@
WRITE_2BYTES( 1 ); //biPlanes
WRITE_2BYTES( 24 ); //biBitCount
- if( afd.motionJpeg ) { //biCompression
+ if( afd.motionJpeg ) //biCompression
+ {
WRITE_STRING( "MJPG" );
WRITE_4BYTES( afd.width *
- afd.height ); //biSizeImage
- } else {
+ afd.height ); //biSizeImage
+ }
+ else
+ {
WRITE_4BYTES( 0 ); // BI_RGB
WRITE_4BYTES( afd.width *
- afd.height*3 ); //biSizeImage
+ afd.height * 3 ); //biSizeImage
}
WRITE_4BYTES( 0 ); //biXPelsPetMeter
@@ -391,10 +394,14 @@
}
else if( Q_stricmp( Cvar_VariableString( "s_backend" ), "OpenAL" ) )
{
- if( afd.a.bits == 16 && afd.a.channels == 2 )
+ if( afd.a.bits != 16 || afd.a.channels != 2 )
+ {
+ Com_Printf( S_COLOR_YELLOW "WARNING: Audio format of %d bit/%d channels not supported",
+ afd.a.bits, afd.a.channels );
+ afd.audio = qfalse;
+ }
+ else
afd.audio = qtrue;
- else
- afd.audio = qfalse; //FIXME: audio not implemented for this case
}
else
{
@@ -542,7 +549,7 @@
WRITE_4BYTES( bytesInBuffer );
SafeFS_Write( buffer, 8, afd.f );
- SafeFS_Write( pcmBuffer, bytesInBuffer, afd.f );
+ SafeFS_Write( pcmCaptureBuffer, bytesInBuffer, afd.f );
SafeFS_Write( padding, paddingSize, afd.f );
afd.fileSize += ( chunkSize + paddingSize );
More information about the quake3-commits
mailing list