Mercurial > hg > sonic-visualiser
comparison audioio/AudioCallbackPlaySource.cpp @ 25:e74f508db18c
* Add setRatio method to the time stretcher, and make it possible to change
the ratio without having to construct and replace the time stretcher. This
means we can do it seamlessly. Add a lot more ratios to the
time stretch control in the main window
author | Chris Cannam |
---|---|
date | Fri, 15 Sep 2006 15:35:06 +0000 |
parents | 80126455d169 |
children | d88d117e0c34 |
comparison
equal
deleted
inserted
replaced
24:ae0731ba8e67 | 25:e74f508db18c |
---|---|
600 existingStretcher->getSharpening() == sharpen) { | 600 existingStretcher->getSharpening() == sharpen) { |
601 return; | 601 return; |
602 } | 602 } |
603 | 603 |
604 if (factor != 1) { | 604 if (factor != 1) { |
605 | |
606 if (existingStretcher && | |
607 existingStretcher->getSharpening() == sharpen) { | |
608 existingStretcher->setRatio(factor); | |
609 return; | |
610 } | |
611 | |
605 PhaseVocoderTimeStretcher *newStretcher = new PhaseVocoderTimeStretcher | 612 PhaseVocoderTimeStretcher *newStretcher = new PhaseVocoderTimeStretcher |
606 (getTargetSampleRate(), | 613 (getTargetSampleRate(), |
607 getTargetChannelCount(), | 614 getTargetChannelCount(), |
608 factor, | 615 factor, |
609 sharpen, | 616 sharpen, |