[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [41004] trunk/blender/source/blender/ blenkernel/intern/sound.c: Hopefully fixing windows build problems with this hack now.

Joerg Mueller nexyon at gmail.com
Fri Oct 14 09:56:34 CEST 2011


Revision: 41004
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=41004
Author:   nexyon
Date:     2011-10-14 07:56:33 +0000 (Fri, 14 Oct 2011)
Log Message:
-----------
Hopefully fixing windows build problems with this hack now. :-)

Modified Paths:
--------------
    trunk/blender/source/blender/blenkernel/intern/sound.c

Modified: trunk/blender/source/blender/blenkernel/intern/sound.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/sound.c	2011-10-14 07:41:45 UTC (rev 41003)
+++ trunk/blender/source/blender/blenkernel/intern/sound.c	2011-10-14 07:56:33 UTC (rev 41004)
@@ -63,6 +63,10 @@
 #include "BKE_sequencer.h"
 #include "BKE_scene.h"
 
+// evil quiet NaN definition
+static const int NAN_INT = 0x7FC00000;
+#define NAN_FLT *((float*)(&NAN_INT))
+
 #ifdef WITH_AUDASPACE
 // evil global ;-)
 static int sound_cfra;
@@ -630,7 +634,7 @@
 		else
 			return AUD_getPosition(scene->sound_scene_handle);
 	}
-	return .0f/.0f;
+	return NAN_FLT;
 }
 
 int sound_scene_playing(struct Scene *scene)
@@ -787,7 +791,7 @@
 void sound_play_scene(struct Scene *UNUSED(scene)) {}
 void sound_stop_scene(struct Scene *UNUSED(scene)) {}
 void sound_seek_scene(struct Main *UNUSED(bmain), struct Scene *UNUSED(scene)) {}
-float sound_sync_scene(struct Scene *UNUSED(scene)) { return .0f/.0f; }
+float sound_sync_scene(struct Scene *UNUSED(scene)) { return NAN_FLT; }
 int sound_scene_playing(struct Scene *UNUSED(scene)) { return -1; }
 int sound_read_sound_buffer(struct bSound* UNUSED(sound), float* UNUSED(buffer), int UNUSED(length), float UNUSED(start), float UNUSED(end)) { return 0; }
 void sound_read_waveform(struct bSound* sound) { (void)sound; }




More information about the Bf-blender-cvs mailing list