revert 27010, sorry but this makes playback of animation unusable & jerky, we can...
authorCampbell Barton <ideasman42@gmail.com>
Thu, 18 Feb 2010 17:00:24 +0000 (17:00 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 18 Feb 2010 17:00:24 +0000 (17:00 +0000)
source/blender/blenkernel/BKE_sound.h
source/blender/blenkernel/intern/sound.c
source/blender/editors/screen/screen_ops.c

index 97a2adb6e6b28b9fca516dc80f47d4873695df79..f44ce47ebccfe8ab7aebe7389881997e012db841 100644 (file)
@@ -86,8 +86,6 @@ void sound_stop_scene(struct Scene *scene);
 
 void sound_seek_scene(struct bContext *C);
 
-float sound_sync_scene(struct Scene *scene);
-
 int sound_read_sound_buffer(struct bSound* sound, float* buffer, int length);
 
 #endif
index 4e08a52d992a0d3526a3ad8b1a528577e2b98a6d..35cedbd2d5337265a134e7392df5be342a2e2dab 100644 (file)
@@ -394,11 +394,6 @@ void sound_seek_scene(struct bContext *C)
        AUD_unlock();
 }
 
-float sound_sync_scene(struct Scene *scene)
-{
-       return AUD_getPosition(scene->sound_scene_handle);
-}
-
 int sound_read_sound_buffer(bSound* sound, float* buffer, int length)
 {
        return AUD_readSound(sound->cache, buffer, length);
index bbab671a889b13dd8590a98e2fe573a885bcb447..728ce622d9b37b3e367365811a2fd3412fdba737 100644 (file)
@@ -2429,17 +2429,13 @@ static int screen_animation_step(bContext *C, wmOperator *op, wmEvent *event)
                else sync= (scene->audio.flag & AUDIO_SYNC);
                
                if(sync) {
+                       /* skip frames */
+                       int step = floor(wt->duration * FPS);
                        if(sad->flag & ANIMPLAY_FLAG_REVERSE) // XXX does this option work with audio?
-                       {                                     // XXX - no
-                               /* skip frames */
-                               int step = floor(wt->duration * FPS);
                                scene->r.cfra -= step;
-                               wt->duration -= ((float)step)/FPS;
-                       }
                        else
-                       {
-                               scene->r.cfra = floor(sound_sync_scene(scene) * FPS);
-                       }
+                               scene->r.cfra += step;
+                       wt->duration -= ((float)step)/FPS;
                }
                else {
                        /* one frame +/- */