[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [20541] trunk/blender/source/blender/src/ seqaudio.c: == Sequencer ==

Peter Schlaile peter at schlaile.de
Sun May 31 23:14:26 CEST 2009


Revision: 20541
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=20541
Author:   schlaile
Date:     2009-05-31 23:14:25 +0200 (Sun, 31 May 2009)

Log Message:
-----------
== Sequencer ==

This fixes dependency of scrub duration on mixbuffer size.
(start audio with a mixbuffer size of 2048, let it play = initialize,
change mixbuffer to smaller value, you will here 1 second
of audio instead of a scrub)

should hopefully fix
[#18850] 2.49 scrubbing creates an echo

Modified Paths:
--------------
    trunk/blender/source/blender/src/seqaudio.c

Modified: trunk/blender/source/blender/src/seqaudio.c
===================================================================
--- trunk/blender/source/blender/src/seqaudio.c	2009-05-31 17:59:57 UTC (rev 20540)
+++ trunk/blender/source/blender/src/seqaudio.c	2009-05-31 21:14:25 UTC (rev 20541)
@@ -546,9 +546,9 @@
 	}
        
 	audio_pos += len;    
-	if (audio_scrub) { 
-		audio_scrub--;
-		if (!audio_scrub) {
+	if (audio_scrub > 0) { 
+		audio_scrub-= len;
+		if (audio_scrub <= 0) {
 			audiostream_stop();
 		}
 	}
@@ -690,7 +690,7 @@
 
 	/* if audio already is playing, just reseek, otherwise
 	   remember scrub-duration */
-	if (!(audio_playing && !audio_scrub)) {
+	if (!(audio_playing && !(audio_scrub > 0))) {
 		audio_scrub = duration;
 	}
 	if (!mixdown) {
@@ -707,7 +707,7 @@
 
 void audiostream_scrub(int frame)
 {
-	if (U.mixbufsize) audiostream_play(frame, 4096/U.mixbufsize, 0);
+	if (U.mixbufsize) audiostream_play(frame, 4096, 0);
 }
 
 void audiostream_stop(void)





More information about the Bf-blender-cvs mailing list