mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-30 06:15:32 +00:00
Rename mReferences to mUses
This commit is contained in:
parent
0d4fea896c
commit
04f885d8cc
2 changed files with 7 additions and 7 deletions
|
@ -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)
|
||||
{ }
|
||||
};
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue