Fix for [#24051] Scrubbing Timeline in VSE with Jack Audio doesn't scrub just plays...
authorJoerg Mueller <nexyon@gmail.com>
Sat, 2 Oct 2010 15:27:55 +0000 (15:27 +0000)
committerJoerg Mueller <nexyon@gmail.com>
Sat, 2 Oct 2010 15:27:55 +0000 (15:27 +0000)
There were actually two bugs, the one reported and that the Sync Callback never has been called after someone had to add #ifdefs around the call without checking that the build systems are even configured to add the needed definition, am I right Cam? :P

source/blender/blenkernel/CMakeLists.txt
source/blender/blenkernel/SConscript
source/blender/blenkernel/intern/sound.c

index ccead68..39aa370 100644 (file)
@@ -115,6 +115,10 @@ IF(NOT WITH_FLUID)
        ADD_DEFINITIONS(-DDISABLE_ELBEEM)
 ENDIF(NOT WITH_FLUID)
 
+IF(WITH_JACK)
+       ADD_DEFINITIONS(-DWITH_JACK)
+ENDIF(NOT WITH_FLUID)
+
 IF(WITH_LZO)
        LIST(APPEND INC ../../../extern/lzo/minilzo)
        ADD_DEFINITIONS(-DWITH_LZO)
index 1e48f94..bbc66ac 100644 (file)
@@ -53,6 +53,9 @@ if env['WITH_BF_CINEON']:
 if env['WITH_BF_HDR']:
     defs.append('WITH_HDR')
 
+if env['WITH_BF_JACK']:
+    defs.append('WITH_JACK')
+
 if env['WITH_BF_FFMPEG']:
     defs.append('WITH_FFMPEG')
     incs += ' ' + env['BF_FFMPEG_INC']
index 2639213..5e95b19 100644 (file)
@@ -433,9 +433,11 @@ void sound_seek_scene(struct bContext *C)
 
        if(scene->audio.flag & AUDIO_SCRUB && !CTX_wm_screen(C)->animtimer)
        {
-               // AUD_XXX TODO: fix scrubbing, it currently doesn't stop playing
                if(scene->audio.flag & AUDIO_SYNC)
+               {
+                       AUD_seek(scene->sound_scene_handle, CFRA / FPS);
                        AUD_seekSequencer(scene->sound_scene_handle, CFRA / FPS);
+               }
                else
                        AUD_seek(scene->sound_scene_handle, CFRA / FPS);
                AUD_resume(scene->sound_scene_handle);