From 04f885d8cc72a36deccbdd5f7c3fe9fa12942a58 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Wed, 25 Nov 2015 03:34:44 -0800 Subject: [PATCH] Rename mReferences to mUses --- apps/openmw/mwsound/sound_buffer.hpp | 4 ++-- apps/openmw/mwsound/soundmanagerimp.cpp | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/apps/openmw/mwsound/sound_buffer.hpp b/apps/openmw/mwsound/sound_buffer.hpp index eb67908a2..8f8e43da4 100644 --- a/apps/openmw/mwsound/sound_buffer.hpp +++ b/apps/openmw/mwsound/sound_buffer.hpp @@ -21,10 +21,10 @@ namespace MWSound Sound_Handle mHandle; - size_t mReferences; + size_t mUses; Sound_Buffer(std::string resname, float volume, float mindist, float maxdist) - : mResourceName(resname), mVolume(volume), mMinDist(mindist), mMaxDist(maxdist), mHandle(0), mReferences(0) + : mResourceName(resname), mVolume(volume), mMinDist(mindist), mMaxDist(maxdist), mHandle(0), mUses(0) { } }; } diff --git a/apps/openmw/mwsound/soundmanagerimp.cpp b/apps/openmw/mwsound/soundmanagerimp.cpp index 26ba1e210..c7e504770 100644 --- a/apps/openmw/mwsound/soundmanagerimp.cpp +++ b/apps/openmw/mwsound/soundmanagerimp.cpp @@ -518,7 +518,7 @@ namespace MWSound sound = mOutput->playSound(sfx->mHandle, volume * sfx->mVolume, basevol, pitch, mode|type, offset ); - if(sfx->mReferences++ == 0) + if(sfx->mUses++ == 0) { SoundList::iterator iter = std::find(mUnusedBuffers.begin(), mUnusedBuffers.end(), sfxid); if(iter != mUnusedBuffers.end()) @@ -554,7 +554,7 @@ namespace MWSound sound = mOutput->playSound3D(sfx->mHandle, objpos, volume * sfx->mVolume, basevol, pitch, sfx->mMinDist, sfx->mMaxDist, mode|type, offset ); - if(sfx->mReferences++ == 0) + if(sfx->mUses++ == 0) { SoundList::iterator iter = std::find(mUnusedBuffers.begin(), mUnusedBuffers.end(), sfxid); if(iter != mUnusedBuffers.end()) @@ -585,7 +585,7 @@ namespace MWSound sound = mOutput->playSound3D(sfx->mHandle, initialPos, volume * sfx->mVolume, basevol, pitch, sfx->mMinDist, sfx->mMaxDist, mode|type, offset ); - if(sfx->mReferences++ == 0) + if(sfx->mUses++ == 0) { SoundList::iterator iter = std::find(mUnusedBuffers.begin(), mUnusedBuffers.end(), sfxid); if(iter != mUnusedBuffers.end()) @@ -831,7 +831,7 @@ namespace MWSound if(!updateSound(sndidx->first, snditer->first, duration)) { Sound_Buffer *sfx = &mSoundBuffers[sndidx->second]; - if(sfx->mReferences-- == 1) + if(sfx->mUses-- == 1) mUnusedBuffers.push_front(sndidx->second); sndidx = snditer->second.erase(sndidx); } @@ -1044,7 +1044,7 @@ namespace MWSound { sndidx->first->stop(); Sound_Buffer *sfx = &mSoundBuffers[sndidx->second]; - if(sfx->mReferences-- == 1) + if(sfx->mUses-- == 1) mUnusedBuffers.push_front(sndidx->second); } }