From 8868f9455c4a1469b58a454c0ccc9b81a2cb42a2 Mon Sep 17 00:00:00 2001 From: Joerg Mueller Date: Fri, 14 Oct 2011 07:56:33 +0000 Subject: Hopefully fixing windows build problems with this hack now. :-) --- source/blender/blenkernel/intern/sound.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'source/blender/blenkernel/intern/sound.c') diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c index 649b4f0b724..07df12d5468 100644 --- a/source/blender/blenkernel/intern/sound.c +++ b/source/blender/blenkernel/intern/sound.c @@ -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 @@ float sound_sync_scene(struct Scene *scene) 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 @@ static void sound_start_play_scene(struct Scene *UNUSED(scene)) {} 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; } -- cgit v1.2.3