[beast/bug-433531] Fix jump loops for channels > 1. See also #433531.



commit 5ec2dd132713366401f890df4fb7fe6d9a426a42
Author: Stefan Westerfeld <stefan space twc de>
Date:   Mon Mar 1 16:55:45 2010 +0100

    Fix jump loops for channels > 1. See also #433531.

 bse/gslwavechunk.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/bse/gslwavechunk.c b/bse/gslwavechunk.c
index 346199f..bec1431 100644
--- a/bse/gslwavechunk.c
+++ b/bse/gslwavechunk.c
@@ -45,6 +45,7 @@ typedef struct {
   GslLong lbound, ubound;	/* PHASE_NORM/_BACKWARD */
 } Iter;
 typedef struct {
+  GslLong one;
   GslLong dir;
   GslLong pos;
   GslLong loop_count;
@@ -81,7 +82,7 @@ wpos_step (GslWaveChunk *wchunk,
 	}
       else
 	{
-	  if (wpos->pos == wchunk->loop_last + wpos->dir && wpos->loop_count)
+	  if (wpos->pos == wchunk->loop_last + wpos->one && wpos->loop_count)
 	    {
 	      wpos->loop_count--;
 	      wpos->pos = wchunk->loop_first;
@@ -103,6 +104,7 @@ fill_block (GslWaveChunk *wchunk,
   GslDataCacheNode *dnode;
   WPos wpos;
   
+  wpos.one = wchunk->n_channels;
   wpos.dir = 1; // wchunk->n_channels;
   if (backward)
     wpos.dir = -wpos.dir;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]