]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
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 3ed64190095e5fa52d9eec27e9d9176a01a58c47..76b1f80626583633db59a30a4da5f8714c792160 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 433e8859cbe16d4561544cf82839e0f72e878bbd..a1d0c26241017091478e190c78ce93aa75c45cea 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 c07fba02e57a76f34313ced8ac6f617835bc4598..fa68470ddcba8c1d58b439bea43cda2fa6e4abb9 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 571f737caafda35dd455818f02aa032e4dc970a7..bcef10da61f624eeed322fc850dbb7be369f6a4d 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;