[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [44417] trunk/blender/source/gameengine/ Ketsji/KX_SoundActuator.cpp: Fix for #30336: Couldn' t playback from Python without having played back via logic bricks once.

Joerg Mueller nexyon at gmail.com
Fri Feb 24 20:34:29 CET 2012


Revision: 44417
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=44417
Author:   nexyon
Date:     2012-02-24 19:34:29 +0000 (Fri, 24 Feb 2012)
Log Message:
-----------
Fix for #30336: Couldn't playback from Python without having played back via logic bricks once.

Thanks Colin Nickerson for reporting.

Modified Paths:
--------------
    trunk/blender/source/gameengine/Ketsji/KX_SoundActuator.cpp

Modified: trunk/blender/source/gameengine/Ketsji/KX_SoundActuator.cpp
===================================================================
--- trunk/blender/source/gameengine/Ketsji/KX_SoundActuator.cpp	2012-02-24 18:48:57 UTC (rev 44416)
+++ trunk/blender/source/gameengine/Ketsji/KX_SoundActuator.cpp	2012-02-24 19:34:29 UTC (rev 44417)
@@ -325,18 +325,15 @@
 "startSound()\n"
 "\tStarts the sound.\n")
 {
-	if(!m_handle.isNull())
+	switch(m_handle.isNull() ? AUD_STATUS_INVALID : m_handle->getStatus())
 	{
-		switch(m_handle->getStatus())
-		{
-		case AUD_STATUS_PLAYING:
-			break;
-		case AUD_STATUS_PAUSED:
-			m_handle->resume();
-			break;
-		default:
-			play();
-		}
+	case AUD_STATUS_PLAYING:
+		break;
+	case AUD_STATUS_PAUSED:
+		m_handle->resume();
+		break;
+	default:
+		play();
 	}
 	Py_RETURN_NONE;
 }




More information about the Bf-blender-cvs mailing list