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 ccead684a889f92d9ebd19b9b274712002c46e4b..39aa3701a1a049513d8b1ebe851392e3198834a6 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 1e48f94f14df2d4fc4074aa61b7b012d5e47398a..bbc66ac14ea41473839476a28772a9d9b81251a4 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 26392132038f25e533dbb8807ca71718e0ff9faf..5e95b19b64f9f5e4f86d4dd2bdcc940829cfb451 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);