diff options
-rw-r--r-- | source/blender/blenkernel/BKE_sound.h | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/sound.c | 5 | ||||
-rw-r--r-- | source/blender/editors/screen/screen_ops.c | 12 |
3 files changed, 4 insertions, 15 deletions
diff --git a/source/blender/blenkernel/BKE_sound.h b/source/blender/blenkernel/BKE_sound.h index 97a2adb6e6b..f44ce47ebcc 100644 --- a/source/blender/blenkernel/BKE_sound.h +++ b/source/blender/blenkernel/BKE_sound.h @@ -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 diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c index 4e08a52d992..35cedbd2d53 100644 --- a/source/blender/blenkernel/intern/sound.c +++ b/source/blender/blenkernel/intern/sound.c @@ -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); diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index bbab671a889..728ce622d9b 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -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 +/- */ |