comparison main/MainWindow.cpp @ 14:085f34c73939

* IntegerTimeStretcher -> PhaseVocoderTimeStretcher (no longer confined to integer multiples)
author Chris Cannam
date Wed, 13 Sep 2006 11:06:28 +0000
parents ee967635c728
children 3715efc38f95
comparison
equal deleted inserted replaced
13:00ed645f4175 14:085f34c73939
2858 }; 2858 };
2859 float factor = factors[speed >= 10 ? speed - 10 : 10 - speed]; 2859 float factor = factors[speed >= 10 ? speed - 10 : 10 - speed];
2860 // int factor = 11 - speed; 2860 // int factor = 11 - speed;
2861 if (speed > 10) factor = 1.0 / factor; 2861 if (speed > 10) factor = 1.0 / factor;
2862 std::cerr << "factor = " << factor << std::endl; 2862 std::cerr << "factor = " << factor << std::endl;
2863 2863 /*
2864 int iinc = 128; 2864 int iinc = 128;
2865 int oinc = lrintf(iinc * factor); 2865 int oinc = lrintf(iinc * factor);
2866 factor = (float(oinc) + 0.01) / iinc; 2866 factor = (float(oinc) + 0.01) / iinc;
2867 std::cerr << "corrected factor = " << factor << std::endl; 2867 std::cerr << "corrected factor = " << factor << std::endl;
2868 2868 */
2869 m_playSpeed->setToolTip(tr("Playback speed: %1") 2869 m_playSpeed->setToolTip(tr("Playback speed: %1")
2870 .arg(factor != 1 ? 2870 .arg(factor != 1 ?
2871 QString("1/%1").arg(factor) : 2871 QString("1/%1").arg(factor) :
2872 tr("Full"))); 2872 tr("Full")));
2873 m_playSource->setSlowdownFactor(factor); 2873 m_playSource->setSlowdownFactor(factor);