mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-30 15:15:31 +00:00
parent
b085c09f86
commit
a69e751089
2 changed files with 6 additions and 7 deletions
|
@ -104,10 +104,9 @@ namespace MWSound
|
|||
SoundBufferList::iterator sfxiter = mSoundBuffers.begin();
|
||||
for(;sfxiter != mSoundBuffers.end();++sfxiter)
|
||||
{
|
||||
if((*sfxiter)->mHandle)
|
||||
mOutput->unloadSound((*sfxiter)->mHandle);
|
||||
(*sfxiter)->mHandle = 0;
|
||||
delete (*sfxiter);
|
||||
if(sfxiter->mHandle)
|
||||
mOutput->unloadSound(sfxiter->mHandle);
|
||||
sfxiter->mHandle = 0;
|
||||
}
|
||||
mUnusedBuffers.clear();
|
||||
}
|
||||
|
@ -146,8 +145,8 @@ namespace MWSound
|
|||
min = std::max(min, 1.0f);
|
||||
max = std::max(min, max);
|
||||
|
||||
Sound_Buffer *sfx = *mSoundBuffers.insert(mSoundBuffers.end(),
|
||||
new Sound_Buffer("Sound/"+sound->mSound, volume, min, max)
|
||||
Sound_Buffer *sfx = &*mSoundBuffers.insert(mSoundBuffers.end(),
|
||||
Sound_Buffer("Sound/"+sound->mSound, volume, min, max)
|
||||
);
|
||||
mVFS->normalizeFilename(sfx->mResourceName);
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ namespace MWSound
|
|||
float mVoiceVolume;
|
||||
float mFootstepsVolume;
|
||||
|
||||
typedef std::deque<Sound_Buffer*> SoundBufferList;
|
||||
typedef std::deque<Sound_Buffer> SoundBufferList;
|
||||
// List of sound buffers, grown as needed. New enties are added to the
|
||||
// back, allowing existing Sound_Buffer references/pointers to remain
|
||||
// valid.
|
||||
|
|
Loading…
Reference in a new issue