[Orxonox-commit 1409] r6127 - code/branches/presentation2/src/orxonox/sound
rgrieder at orxonox.net
rgrieder at orxonox.net
Mon Nov 23 21:25:34 CET 2009
Author: rgrieder
Date: 2009-11-23 21:25:34 +0100 (Mon, 23 Nov 2009)
New Revision: 6127
Modified:
code/branches/presentation2/src/orxonox/sound/BaseSound.cc
Log:
Fixed sound problem (annoying cracking) and increased buffers for faster loading (doesn't really make the difference though...).
Modified: code/branches/presentation2/src/orxonox/sound/BaseSound.cc
===================================================================
--- code/branches/presentation2/src/orxonox/sound/BaseSound.cc 2009-11-23 20:03:11 UTC (rev 6126)
+++ code/branches/presentation2/src/orxonox/sound/BaseSound.cc 2009-11-23 20:25:34 UTC (rev 6127)
@@ -217,8 +217,9 @@
ALuint BaseSound::loadOggFile()
{
- char inbuffer[4096];
+ char inbuffer[256*1024];
std::vector<char> outbuffer;
+ outbuffer.reserve(80*1024*1024);
OggVorbis_File vf;
vorbis_info* vorbisInfo;
int eof = false;
@@ -256,7 +257,7 @@
}
else
{
- outbuffer.insert(outbuffer.end(), inbuffer, inbuffer + sizeof(inbuffer));
+ outbuffer.insert(outbuffer.end(), inbuffer, inbuffer + ret);
}
}
More information about the Orxonox-commit
mailing list