From f12614234a02bee3daa118d429bc37e5be4b932c Mon Sep 17 00:00:00 2001 From: Joerg Mueller Date: Wed, 13 Jul 2011 12:16:45 +0000 Subject: 3D Audio GSoC: * Fixed a warning in AUD_DoubleReader.cpp * Removed some unneeded includes * Fixed a bug resulting in a crash when stopping a sound * Fixed a bug where a NaN resulted in a horrible memory error * Fixed a typo bug which caused crackling in audio playback and export * Added memory debugging code (ifdefed) --- intern/audaspace/OpenAL/AUD_OpenALDevice.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'intern/audaspace/OpenAL') diff --git a/intern/audaspace/OpenAL/AUD_OpenALDevice.cpp b/intern/audaspace/OpenAL/AUD_OpenALDevice.cpp index 3b306d89d7b..65b1d3f3b64 100644 --- a/intern/audaspace/OpenAL/AUD_OpenALDevice.cpp +++ b/intern/audaspace/OpenAL/AUD_OpenALDevice.cpp @@ -178,10 +178,14 @@ bool AUD_OpenALDevice::AUD_OpenALHandle::stop() m_device->lock(); + // AUD_XXX Create a reference of our own object so that it doesn't get + // deleted before the end of this function + AUD_Reference This = this; + if(m_status == AUD_STATUS_PLAYING) - m_device->m_playingSounds.remove(this); + m_device->m_playingSounds.remove(This); else - m_device->m_pausedSounds.remove(this); + m_device->m_pausedSounds.remove(This); m_device->unlock(); -- cgit v1.2.3