check vid_activewindow in several spammy prints that occur when the client is running...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 6 Apr 2007 11:29:03 +0000 (11:29 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 6 Apr 2007 11:29:03 +0000 (11:29 +0000)
changed cl.time warnings from developer 10 to developer 100 and check vid_activewindow

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7062 d7cf8633-e32d-0410-b094-e92efae38249

cl_parse.c
snd_alsa.c
snd_coreaudio.c
snd_sdl.c

index 3ed6419..76b1f80 100644 (file)
@@ -2773,7 +2773,7 @@ static void CL_NetworkTimeReceived(double newtime)
        {
                cl.mtime[1] = max(cl.mtime[0], newtime - 0.1);
                cl.mtime[0] = newtime;
-               if (developer.integer >= 10)
+               if (developer.integer >= 100 && vid_activewindow)
                {
                        if (cl.time < cl.mtime[1] - (cl.mtime[0] - cl.mtime[1]))
                                Con_Printf("--- cl.time < cl.mtime[1] (%f < %f ... %f)\n", cl.time, cl.mtime[1], cl.mtime[0]);
index 433e885..a1d0c26 100644 (file)
@@ -283,7 +283,7 @@ static snd_pcm_sframes_t SndSys_Write (const unsigned char* buffer, unsigned int
        written = snd_pcm_writei (pcm_handle, buffer, nbframes);
        if (written < 0)
        {
-               if (developer.integer >= 1000)
+               if (developer.integer >= 1000 && vid_activewindow)
                        Con_Printf ("SndSys_Write: audio write returned %ld (%s)!\n",
                                                 written, snd_strerror (written));
 
@@ -361,7 +361,7 @@ unsigned int SndSys_GetSoundTime (void)
        err = snd_pcm_delay (pcm_handle, &delay);
        if (err != 0)
        {
-               if (developer.integer >= 1000)
+               if (developer.integer >= 1000 && vid_activewindow)
                        Con_DPrintf ("SndSys_GetSoundTime: can't get playback delay (%s)\n",
                                                 snd_strerror (err));
 
index c07fba0..fa68470 100644 (file)
@@ -109,7 +109,7 @@ static OSStatus audioDeviceIOProc(AudioDeviceID inDevice,
                unsigned int missingFrames;
 
                missingFrames = submissionChunk - frameCount;
-               if (developer.integer >= 1000)
+               if (developer.integer >= 1000 && vid_activewindow)
                        Con_Printf("audioDeviceIOProc: %u sample frames missing\n", missingFrames);
                memset(&outBuffer[frameCount * snd_renderbuffer->format.channels], 0, missingFrames * sizeof(outBuffer[0]));
        }
index 571f737..bcef10d 100644 (file)
--- a/snd_sdl.c
+++ b/snd_sdl.c
@@ -62,7 +62,7 @@ static void Buffer_Callback (void *userdata, Uint8 *stream, int len)
 
        snd_renderbuffer->startframe += FrameCount;
 
-       if (FrameCount < RequestedFrames && developer.integer >= 1000)
+       if (FrameCount < RequestedFrames && developer.integer >= 1000 && vid_activewindow)
                Con_DPrintf("SDL sound: %u sample frames missing\n", RequestedFrames - FrameCount);
 
        sdlaudiotime += RequestedFrames;