r102 - in trunk/code: client unix

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Fri Sep 23 21:26:51 EDT 2005


Author: tma
Date: 2005-09-23 21:26:51 -0400 (Fri, 23 Sep 2005)
New Revision: 102

Modified:
   trunk/code/client/snd_dma.c
   trunk/code/unix/sdl_snd.c
Log:
* Removed the redundant "sound system is muted" message
* Moved printing of desired audiospec to before SDL_OpenAudio
* When the computed value for samples is not a power of 2, now pick the smallest power of 2 greater rather than the largest power of 2 smaller


Modified: trunk/code/client/snd_dma.c
===================================================================
--- trunk/code/client/snd_dma.c	2005-09-23 17:39:14 UTC (rev 101)
+++ trunk/code/client/snd_dma.c	2005-09-24 01:26:51 UTC (rev 102)
@@ -109,10 +109,6 @@
 	if (!s_soundStarted) {
 		Com_Printf ("sound system not started\n");
 	} else {
-		if ( s_soundMuted ) {
-			Com_Printf ("sound system is muted\n");
-		}
-
 		Com_Printf("%5d stereo\n", dma.channels - 1);
 		Com_Printf("%5d samples\n", dma.samples);
 		Com_Printf("%5d samplebits\n", dma.samplebits);

Modified: trunk/code/unix/sdl_snd.c
===================================================================
--- trunk/code/unix/sdl_snd.c	2005-09-23 17:39:14 UTC (rev 101)
+++ trunk/code/unix/sdl_snd.c	2005-09-24 01:26:51 UTC (rev 102)
@@ -213,6 +213,8 @@
     desired.channels = (int) sndchannels->value;
     desired.callback = sdl_audio_callback;
 
+    print_audiospec("Format we requested from SDL audio device", &desired);
+
     if (SDL_OpenAudio(&desired, &obtained) == -1)
     {
         Com_Printf("SDL_OpenAudio() failed: %s\n", SDL_GetError());
@@ -220,7 +222,6 @@
         return qfalse;
     } // if
 
-    print_audiospec("Format we requested from SDL audio device", &desired);
     print_audiospec("Format we actually got", &obtained);
 
     // dma.samples needs to be big, or id's mixer will just refuse to
@@ -240,7 +241,6 @@
         while (val < tmp)
             val <<= 1;
 
-        val >>= 1;
         Com_Printf("WARNING: sdlmixsamps wasn't a power of two (%d),"
                    " so we made it one (%d).\n", tmp, val);
         tmp = val;




More information about the quake3-commits mailing list