diff options
author | Andrew Wiggin <ender79bl@gmail.com> | 2011-10-14 11:41:45 +0400 |
---|---|---|
committer | Andrew Wiggin <ender79bl@gmail.com> | 2011-10-14 11:41:45 +0400 |
commit | eaff9a1c1b420dde7f291c8fb8715f18dd512f64 (patch) | |
tree | 98b2174b93a076e685e9daadf4c4ca66276e64c4 /source/blender | |
parent | 13490b1ac3ee1a98a4e968555df53a4699f23f27 (diff) |
Reverting my windows build fix because it breaks the bug fix committed in r40995
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/BKE_sound.h | 1 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/sound.c | 4 | ||||
-rw-r--r-- | source/blender/editors/screen/screen_ops.c | 2 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_event_system.c | 4 |
4 files changed, 5 insertions, 6 deletions
diff --git a/source/blender/blenkernel/BKE_sound.h b/source/blender/blenkernel/BKE_sound.h index 081fb8dc132..3728dd41089 100644 --- a/source/blender/blenkernel/BKE_sound.h +++ b/source/blender/blenkernel/BKE_sound.h @@ -35,7 +35,6 @@ * \author nzc */ -#define SOUND_ERR_FLT FLT_MIN #define SOUND_WAVE_SAMPLES_PER_SECOND 250 struct PackedFile; diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c index b9a02df423e..649b4f0b724 100644 --- a/source/blender/blenkernel/intern/sound.c +++ b/source/blender/blenkernel/intern/sound.c @@ -630,7 +630,7 @@ float sound_sync_scene(struct Scene *scene) else return AUD_getPosition(scene->sound_scene_handle); } - return SOUND_ERR_FLT; + return .0f/.0f; } int sound_scene_playing(struct Scene *scene) @@ -787,7 +787,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 SOUND_ERR_FLT; } +float sound_sync_scene(struct Scene *UNUSED(scene)) { return .0f/.0f; } 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; } diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index 8d9190ac80c..a2be1e8fa6f 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -2814,7 +2814,7 @@ static int screen_animation_step(bContext *C, wmOperator *UNUSED(op), wmEvent *e else if (sad->flag & ANIMPLAY_FLAG_NO_SYNC) sync= 0; else sync= (scene->flag & SCE_FRAME_DROP); - if((scene->audio.flag & AUDIO_SYNC) && !(sad->flag & ANIMPLAY_FLAG_REVERSE) && ((time = sound_sync_scene(scene)) != SOUND_ERR_FLT)) + if((scene->audio.flag & AUDIO_SYNC) && !(sad->flag & ANIMPLAY_FLAG_REVERSE) && finite(time = sound_sync_scene(scene))) scene->r.cfra = (double)time * FPS + 0.5; else { diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index 4055b6c7d9e..074151c9abe 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -33,6 +33,7 @@ #include <stdlib.h> #include <string.h> +#include <math.h> #include "DNA_listBase.h" #include "DNA_screen_types.h" @@ -46,7 +47,6 @@ #include "BLI_blenlib.h" #include "BLI_utildefines.h" -#include "BLI_math.h" #include "BKE_blender.h" #include "BKE_context.h" @@ -1791,7 +1791,7 @@ void wm_event_do_handlers(bContext *C) if(playing == 0) { float time = sound_sync_scene(scene); - if(time != SOUND_ERR_FLT) { + if(finite(time)) { int ncfra = sound_sync_scene(scene) * (float)FPS + 0.5f; if(ncfra != scene->r.cfra) { scene->r.cfra = ncfra; |