X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=snd_sdl.c;h=b82a56a4737808ff9ffdcf439a933d94711fdac7;hb=1a473289e63fa85c6edce042060fd2a4ac1ed4bc;hp=90b53129c10947a239375d9e0a59ff007a84cb29;hpb=5a62228b228e2a329d2ba7fef9dacd12de4d9033;p=xonotic%2Fdarkplaces.git diff --git a/snd_sdl.c b/snd_sdl.c index 90b53129..b82a56a4 100644 --- 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) + if (FrameCount < RequestedFrames && developer.integer >= 100) Con_DPrintf("SDL sound: %u sample frames missing\n", RequestedFrames - FrameCount); sdlaudiotime += RequestedFrames; @@ -141,12 +141,17 @@ qboolean SndSys_Init (const snd_format_t* requested, snd_format_t* suggested) } snd_renderbuffer = Snd_CreateRingBuffer(requested, 0, NULL); - + if (snd_channellayout.integer == SND_CHANNELLAYOUT_AUTO) + { + int newlayout; + #ifdef __linux__ - alsaspeakerlayout = true; + newlayout = SND_CHANNELLAYOUT_ALSA; #else - alsaspeakerlayout = false; + newlayout = SND_CHANNELLAYOUT_STANDARD; #endif + Cvar_SetValueQuick (&snd_channellayout, newlayout); + } sdlaudiotime = 0; SDL_PauseAudio( false );