From 9973dfd1c7e8a43853b56de49c11538b08c3413d Mon Sep 17 00:00:00 2001 From: Shyotl Date: Mon, 30 Jan 2012 03:44:20 -0600 Subject: [PATCH] Tweaked stream buffer size used in fmodex. --- indra/llaudio/llstreamingaudio_fmodex.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/indra/llaudio/llstreamingaudio_fmodex.cpp b/indra/llaudio/llstreamingaudio_fmodex.cpp index 2b032e25b..6d97bcc49 100644 --- a/indra/llaudio/llstreamingaudio_fmodex.cpp +++ b/indra/llaudio/llstreamingaudio_fmodex.cpp @@ -74,7 +74,9 @@ LLStreamingAudio_FMODEX::LLStreamingAudio_FMODEX(FMOD::System *system) : { // Number of milliseconds of audio to buffer for the audio card. // Must be larger than the usual Second Life frame stutter time. - mSystem->setStreamBufferSize(200, FMOD_TIMEUNIT_MS); + const U32 buffer_seconds = 5; //sec + const U32 estimated_bitrate = 128; //kbit/sec + mSystem->setStreamBufferSize(estimated_bitrate * buffer_seconds * 128/*bytes/kbit*/, FMOD_TIMEUNIT_RAWBYTES); // Here's where we set the size of the network buffer and some buffering // parameters. In this case we want a network buffer of 16k, we want it