]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
increased minimum developer cvar level for several spammy messages (new engine string...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 11 Mar 2007 23:53:31 +0000 (23:53 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 11 Mar 2007 23:53:31 +0000 (23:53 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6951 d7cf8633-e32d-0410-b094-e92efae38249

prvm_edict.c
snd_coreaudio.c
snd_sdl.c

index f9db9de2206805e44674f7847fb099585c00b4af..81dd581878cfebf89a21f33e5921fd6723f0cca2 100644 (file)
@@ -2089,7 +2089,7 @@ int PRVM_SetEngineString(const char *s)
                if (prog->knownstrings[i] == s)
                        return -1 - i;
        // new unknown engine string
-       if (developer.integer >= 100)
+       if (developer.integer >= 200)
                Con_Printf("new engine string %p\n", s);
        for (i = prog->firstfreeknownstring;i < prog->numknownstrings;i++)
                if (!prog->knownstrings[i])
index 669b82f180adb9ae9257f6ecd195653552124664..ca8da917c921deab31858f7b7cb0f771e9a19008 100644 (file)
@@ -57,7 +57,7 @@ static OSStatus audioDeviceIOProc(AudioDeviceID inDevice,
        outBuffer = (float*)outOutputData->mBuffers[0].mData;
        factor = snd_renderbuffer->format.channels * snd_renderbuffer->format.width;
        frameCount = 0;
-       
+
        // Lock the snd_renderbuffer
        if (SndSys_LockRenderBuffer())
        {
@@ -82,7 +82,7 @@ static OSStatus audioDeviceIOProc(AudioDeviceID inDevice,
                        samples = (const short*)(&snd_renderbuffer->ring[startOffset * factor]);
                        for (sampleIndex = 0; sampleIndex < sampleCount; sampleIndex++)
                                outBuffer[sampleIndex] = samples[sampleIndex] * scale;
-                       
+
                        outBuffer = &outBuffer[sampleCount];
                        sampleCount = frameCount * snd_renderbuffer->format.channels - sampleCount;
                        samples = (const short*)(&snd_renderbuffer->ring[0]);
@@ -107,9 +107,10 @@ static OSStatus audioDeviceIOProc(AudioDeviceID inDevice,
        if (frameCount < submissionChunk)
        {
                unsigned int missingFrames;
-               
+
                missingFrames = submissionChunk - frameCount;
-               Con_DPrintf("audioDeviceIOProc: %u sample frames missing\n", missingFrames);
+               if (developer.integer >= 200)
+                       Con_Printf("audioDeviceIOProc: %u sample frames missing\n", missingFrames);
                memset(&outBuffer[frameCount * snd_renderbuffer->format.channels], 0, missingFrames * sizeof(outBuffer[0]));
        }
 
@@ -136,7 +137,7 @@ qboolean SndSys_Init (const snd_format_t* requested, snd_format_t* suggested)
                return true;
 
        Con_Printf("Initializing CoreAudio...\n");
-       
+
        // We only accept 16-bit samples for the moment
        if (requested->width != 2)
        {
@@ -149,7 +150,7 @@ qboolean SndSys_Init (const snd_format_t* requested, snd_format_t* suggested)
 
                return false;
        }
-       
+
        // Get the output device
        propertySize = sizeof(outputDeviceID);
        status = AudioHardwareGetProperty(kAudioHardwarePropertyDefaultOutputDevice, &propertySize, &outputDeviceID);
@@ -275,7 +276,7 @@ void SndSys_Shutdown(void)
                return;
        }
        s_isRunning = false;
-       
+
        pthread_mutex_destroy(&coreaudio_mutex);
 
        status = AudioDeviceRemoveIOProc(outputDeviceID, audioDeviceIOProc);
index b82a56a4737808ff9ffdcf439a933d94711fdac7..01f1bdcddc3633cd9e1ad12e25ccf88532c67d7d 100644 (file)
--- a/snd_sdl.c
+++ b/snd_sdl.c
@@ -38,7 +38,7 @@ static void Buffer_Callback (void *userdata, Uint8 *stream, int len)
                Sys_Error("SDL sound: invalid buffer length passed to Buffer_Callback (%d bytes)\n", len);
 
        RequestedFrames = (unsigned int)len / factor;
-       
+
        // Transfert up to a chunk of samples from snd_renderbuffer to stream
        MaxFrames = snd_renderbuffer->endframe - snd_renderbuffer->startframe;
        if (MaxFrames > RequestedFrames)
@@ -53,7 +53,7 @@ static void Buffer_Callback (void *userdata, Uint8 *stream, int len)
 
                PartialLength1 = (snd_renderbuffer->maxframes - StartOffset) * factor;
                memcpy(stream, &snd_renderbuffer->ring[StartOffset * factor], PartialLength1);
-               
+
                PartialLength2 = FrameCount * factor - PartialLength1;
                memcpy(&stream[PartialLength1], &snd_renderbuffer->ring[0], PartialLength2);
        }
@@ -62,7 +62,7 @@ static void Buffer_Callback (void *userdata, Uint8 *stream, int len)
 
        snd_renderbuffer->startframe += FrameCount;
 
-       if (FrameCount < RequestedFrames && developer.integer >= 100)
+       if (FrameCount < RequestedFrames && developer.integer >= 200)
                Con_DPrintf("SDL sound: %u sample frames missing\n", RequestedFrames - FrameCount);
 
        sdlaudiotime += RequestedFrames;
@@ -109,7 +109,7 @@ qboolean SndSys_Init (const snd_format_t* requested, snd_format_t* suggested)
                                wantspec.channels, wantspec.format, wantspec.freq, wantspec.samples);
 
        if( SDL_OpenAudio( &wantspec, &obtainspec ) )
-       {       
+       {
                Con_Printf( "Failed to open the audio device! (%s)\n", SDL_GetError() );
                return false;
        }
@@ -144,7 +144,7 @@ qboolean SndSys_Init (const snd_format_t* requested, snd_format_t* suggested)
        if (snd_channellayout.integer == SND_CHANNELLAYOUT_AUTO)
        {
                int newlayout;
-               
+
 #ifdef __linux__
                newlayout = SND_CHANNELLAYOUT_ALSA;
 #else
@@ -155,7 +155,7 @@ qboolean SndSys_Init (const snd_format_t* requested, snd_format_t* suggested)
 
        sdlaudiotime = 0;
        SDL_PauseAudio( false );
-       
+
        return true;
 }