From bce9eaaae84bafa85623dcbb1ed0af64144a44ad Mon Sep 17 00:00:00 2001 From: driAn Date: Sun, 27 Jul 2008 17:02:28 +0000 Subject: [PATCH] ogg PCM buffer set to 512kb to survive loading screens git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2225 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/clientgame.cpp | 5 +++++ source/src/main.cpp | 6 ------ source/src/sound.cpp | 5 ++--- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/source/src/clientgame.cpp b/source/src/clientgame.cpp index eec08b23..dbc9b587 100644 --- a/source/src/clientgame.cpp +++ b/source/src/clientgame.cpp @@ -576,6 +576,11 @@ void startmap(const char *name) // called just after a map load intermission = false; minutesremaining = -1; if(*clientmap) conoutf("game mode is \"%s\"", modestr(gamemode, modeacronyms > 0)); + if(firstrun) // runs once + { + execfile("config/firstrun.cfg"); + firstrun = false; + } } void suicide() diff --git a/source/src/main.cpp b/source/src/main.cpp index b4e09533..82090a17 100644 --- a/source/src/main.cpp +++ b/source/src/main.cpp @@ -659,12 +659,6 @@ int main(int argc, char **argv) if(frames>4) SDL_GL_SwapBuffers(); } - if(firstrun && frames>4) // run once - { - execfile("config/firstrun.cfg"); - firstrun = false; - } - #ifdef _DEBUG if(millis>lastflush+60000) { fflush(stdout); lastflush = millis; diff --git a/source/src/sound.cpp b/source/src/sound.cpp index 27719c45..36657fde 100644 --- a/source/src/sound.cpp +++ b/source/src/sound.cpp @@ -366,7 +366,6 @@ struct sourcescheduler // scheduler instance sourcescheduler scheduler; - struct oggstream : sourceowner { OggVorbis_File oggfile; @@ -379,7 +378,7 @@ struct oggstream : sourceowner string name; double totalseconds; - static const int BUFSIZE = (1024 * 16); + static const int BUFSIZE = 1024 * 512; // 512kb buffer; int startmillis, endmillis, startfademillis, endfademillis; float volume, gain; bool looping; @@ -1001,7 +1000,7 @@ void setmusicvol() extern int musicvol; if(gamemusic) gamemusic->setvolume(musicvol > 0 ? musicvol/255.0f : 0); } -VARFP(musicvol, 0, 64, 255, setmusicvol()); +VARFP(musicvol, 0, 128, 255, setmusicvol()); char *musicdonecmd = NULL;