summaryrefslogtreecommitdiff
path: root/indra/llaudio/llaudioengine_openal.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-06-13 12:44:45 +0100
committerTofu Linden <tofu.linden@lindenlab.com>2010-06-13 12:44:45 +0100
commitd3418e5e65f7845f89b5ce2019bd635861573ed3 (patch)
treed56a1e629858cb89775c84c2a34b2282d29b2955 /indra/llaudio/llaudioengine_openal.cpp
parent818e970b3efe65f6e471d071ae5f01603f61da79 (diff)
parentd50a34e6e37c34fb84ad232aad7b3bf2a3b3b408 (diff)
merge
Diffstat (limited to 'indra/llaudio/llaudioengine_openal.cpp')
-rw-r--r--indra/llaudio/llaudioengine_openal.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/indra/llaudio/llaudioengine_openal.cpp b/indra/llaudio/llaudioengine_openal.cpp
index a5982ccbd6..887c791790 100644
--- a/indra/llaudio/llaudioengine_openal.cpp
+++ b/indra/llaudio/llaudioengine_openal.cpp
@@ -370,7 +370,7 @@ U32 LLAudioBufferOpenAL::getLength()
// ------------
-void LLAudioEngine_OpenAL::initWind()
+bool LLAudioEngine_OpenAL::initWind()
{
ALenum error;
llinfos << "LLAudioEngine_OpenAL::initWind() start" << llendl;
@@ -397,10 +397,12 @@ void LLAudioEngine_OpenAL::initWind()
if(mWindBuf==NULL)
{
llerrs << "LLAudioEngine_OpenAL::initWind() Error creating wind memory buffer" << llendl;
- mEnableWind=false;
+ return false;
}
llinfos << "LLAudioEngine_OpenAL::initWind() done" << llendl;
+
+ return true;
}
void LLAudioEngine_OpenAL::cleanupWind()
@@ -508,14 +510,14 @@ void LLAudioEngine_OpenAL::updateWind(LLVector3 wind_vec, F32 camera_altitude)
alGenBuffers(1,&buffer);
if((error=alGetError()) != AL_NO_ERROR)
{
- llwarns << "LLAudioEngine_OpenAL::initWind() Error creating wind buffer: " << error << llendl;
+ llwarns << "LLAudioEngine_OpenAL::updateWind() Error creating wind buffer: " << error << llendl;
break;
}
alBufferData(buffer,
AL_FORMAT_STEREO16,
mWindGen->windGenerate(mWindBuf,
- mWindBufSamples, 2),
+ mWindBufSamples),
mWindBufBytes,
mWindBufFreq);
error = alGetError();