diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-06-08 20:48:57 +0100 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-06-08 20:48:57 +0100 |
commit | f5ae54f8c3fe954a08faa9b2de695c0326f2aeac (patch) | |
tree | 4c019dd25b0999d3136c5918b89385c365176856 /indra/llaudio/llaudioengine_openal.h | |
parent | 9fd216e874b3937ae53bdd827d8120b42558a06f (diff) |
DEV-11516 FIXED VWR-5308: Current wind noise generation is CPU intensive.
Minor optimizations to wind generation. Patch by gigs and aimee, reviewed by merov.
Diffstat (limited to 'indra/llaudio/llaudioengine_openal.h')
-rw-r--r-- | indra/llaudio/llaudioengine_openal.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/indra/llaudio/llaudioengine_openal.h b/indra/llaudio/llaudioengine_openal.h index 5aca03e195..16125b2476 100644 --- a/indra/llaudio/llaudioengine_openal.h +++ b/indra/llaudio/llaudioengine_openal.h @@ -57,23 +57,23 @@ class LLAudioEngine_OpenAL : public LLAudioEngine LLAudioBuffer* createBuffer(); LLAudioChannel* createChannel(); - /*virtual*/ void initWind(); + /*virtual*/ bool initWind(); /*virtual*/ void cleanupWind(); /*virtual*/ void updateWind(LLVector3 direction, F32 camera_altitude); private: void * windDSP(void *newbuffer, int length); - typedef S16 WIND_SAMPLE_T; - LLWindGen<WIND_SAMPLE_T> *mWindGen; - S16 *mWindBuf; - U32 mWindBufFreq; - U32 mWindBufSamples; - U32 mWindBufBytes; - ALuint mWindSource; - int mNumEmptyWindALBuffers; - - static const int MAX_NUM_WIND_BUFFERS = 80; - static const float WIND_BUFFER_SIZE_SEC = 0.05f; // 1/20th sec + typedef S16 WIND_SAMPLE_T; + LLWindGen<WIND_SAMPLE_T> *mWindGen; + S16 *mWindBuf; + U32 mWindBufFreq; + U32 mWindBufSamples; + U32 mWindBufBytes; + ALuint mWindSource; + int mNumEmptyWindALBuffers; + + static const int MAX_NUM_WIND_BUFFERS = 80; + static const float WIND_BUFFER_SIZE_SEC = 0.05f; // 1/20th sec }; class LLAudioChannelOpenAL : public LLAudioChannel |