Project

General

Profile

« Previous | Next » 

Revision 48d0867a

Added by Leszek Koltunski almost 8 years ago

Important bugfix in Dynamic - sometimes it would never stop interpolating and never send a FINISHED message!

View differences:

src/main/java/org/distorted/library/type/Dynamic.java
618 618
      interpolate(buffer,offset,mCount-(int)mCount);
619 619
      return false;
620 620
      }
621
    if( time+step > mDuration*mCount && mCount>0.0f )
622
      {
623
      interpolate(buffer,offset,mCount-(int)mCount);
624
      return true;
625
      }
621 626

  
622 627
    double pos;
623 628

  
......
631 636
      pos = (double)time/mDuration;
632 637
      }
633 638

  
634
    if( pos<=mCount || mCount<=0.0f )
635
      {
636
      interpolate(buffer,offset, (float)(pos-(int)pos) );
637

  
638
      if( time+step > mDuration*mCount && mCount>0.0f )
639
        {
640
        interpolate(buffer,offset,mCount-(int)mCount);
641
        return true;
642
        }
643
      }
644

  
639
    interpolate(buffer,offset, (float)(pos-(int)pos) );
645 640
    return false;
646 641
    }
647 642

  

Also available in: Unified diff