diff options
author | tma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2007-12-01 19:39:03 +0000 |
---|---|---|
committer | tma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2007-12-01 19:39:03 +0000 |
commit | 693420042b8eb5ded19141c544a06003e96fbda0 (patch) | |
tree | 9a3e340b7f745a291f3915cc8e309f25403045da /code/client | |
parent | 7fccfcafc99fe8a81bee1e2cc32e3e383d238dc2 (diff) | |
download | ioquake3-aero-693420042b8eb5ded19141c544a06003e96fbda0.tar.gz ioquake3-aero-693420042b8eb5ded19141c544a06003e96fbda0.zip |
* Fix poppy captured audio when recording videos
git-svn-id: svn://svn.icculus.org/quake3/trunk@1223 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/client')
-rw-r--r-- | code/client/cl_avi.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/code/client/cl_avi.c b/code/client/cl_avi.c index 463f873..12cde11 100644 --- a/code/client/cl_avi.c +++ b/code/client/cl_avi.c @@ -250,14 +250,17 @@ void CL_WriteAVIHeader( void ) 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 @@ qboolean CL_OpenAVIForWriting( const char *fileName ) } else if( Q_stricmp( Cvar_VariableString( "s_backend" ), "OpenAL" ) ) { - if( afd.a.bits == 16 && afd.a.channels == 2 ) - afd.audio = qtrue; + 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 = qfalse; //FIXME: audio not implemented for this case + afd.audio = qtrue; } else { @@ -542,7 +549,7 @@ void CL_WriteAVIAudioFrame( const byte *pcmBuffer, int size ) 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 ); |