r1433 - trunk/code/client

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Sun Aug 3 15:31:43 EDT 2008


Author: tma
Date: 2008-08-03 15:31:42 -0400 (Sun, 03 Aug 2008)
New Revision: 1433

Modified:
   trunk/code/client/cl_main.c
   trunk/code/client/snd_openal.c
Log:
* Restrict OpenAL capture support test hack to OS X, where it is required; this
  fixes a crash on exit with Windows when using OpenAL


Modified: trunk/code/client/cl_main.c
===================================================================
--- trunk/code/client/cl_main.c	2008-07-21 22:16:57 UTC (rev 1432)
+++ trunk/code/client/cl_main.c	2008-08-03 19:31:42 UTC (rev 1433)
@@ -3181,7 +3181,7 @@
 	Com_Printf( "----- CL_Shutdown -----\n" );
 
 	if ( recursive ) {
-		printf ("recursive shutdown\n");
+		Com_Printf( "WARNING: Recursive shutdown\n" );
 		return;
 	}
 	recursive = qtrue;

Modified: trunk/code/client/snd_openal.c
===================================================================
--- trunk/code/client/snd_openal.c	2008-07-21 22:16:57 UTC (rev 1432)
+++ trunk/code/client/snd_openal.c	2008-08-03 19:31:42 UTC (rev 1433)
@@ -2072,22 +2072,33 @@
 	// !!! FIXME: add support for capture device enumeration.
 	// !!! FIXME: add some better error reporting.
 	s_alCapture = Cvar_Get( "s_alCapture", "1", CVAR_ARCHIVE | CVAR_LATCH );
-	if (!s_alCapture->integer) {
+	if (!s_alCapture->integer)
+	{
 		Com_Printf("OpenAL capture support disabled by user ('+set s_alCapture 1' to enable)\n");
+	}
 #if USE_MUMBLE
-	} else if (cl_useMumble->integer) {
+	else if (cl_useMumble->integer)
+	{
 		Com_Printf("OpenAL capture support disabled for Mumble support\n");
+	}
 #endif
-	} else {
+	else
+	{
+#ifdef MACOS_X
 		// !!! FIXME: Apple has a 1.1-compliant OpenAL, which includes
 		// !!! FIXME:  capture support, but they don't list it in the
 		// !!! FIXME:  extension string. We need to check the version string,
 		// !!! FIXME:  then the extension string, but that's too much trouble,
 		// !!! FIXME:  so we'll just check the function pointer for now.
-		//if (qalcIsExtensionPresent(NULL, "ALC_EXT_capture")) {
-		if (qalcCaptureOpenDevice == NULL) {
+		if (qalcCaptureOpenDevice == NULL)
+#else
+		if (!qalcIsExtensionPresent(NULL, "ALC_EXT_capture"))
+#endif
+		{
 			Com_Printf("No ALC_EXT_capture support, can't record audio.\n");
-		} else {
+		}
+		else
+		{
 			// !!! FIXME: 8000Hz is what Speex narrowband mode needs, but we
 			// !!! FIXME:  should probably open the capture device after
 			// !!! FIXME:  initializing Speex so we can change to wideband




More information about the quake3-commits mailing list