This commit is contained in:
Chris Cannam
2022-06-17 15:01:39 +01:00
3 changed files with 22 additions and 13 deletions

View File

@@ -84,8 +84,6 @@ double tempo_convert(const char *str)
int main(int argc, char **argv)
{
int c;
double ratio = 1.0;
double duration = 0.0;
double pitchshift = 0.0;
@@ -182,12 +180,12 @@ int main(int argc, char **argv)
{ 0, 0, 0, 0 }
};
c = getopt_long(argc, argv,
"t:p:d:RLPFc:f:T:D:qhHVM:23",
longOpts, &optionIndex);
if (c == -1) break;
int optionChar = getopt_long(argc, argv,
"t:p:d:RLPFc:f:T:D:qhHVM:23",
longOpts, &optionIndex);
if (optionChar == -1) break;
switch (c) {
switch (optionChar) {
case 'h': help = true; break;
case 'H': fullHelp = true; break;
case 'V': version = true; break;

View File

@@ -24,11 +24,8 @@
#include "faster/StretcherImpl.h"
#include "finer/R3StretcherImpl.h"
namespace RubberBand {
//#define FASTER 1
RubberBandStretcher::RubberBandStretcher(size_t sampleRate,
size_t channels,
Options options,
@@ -61,6 +58,7 @@ RubberBandStretcher::reset()
else m_r3d->reset();
}
RTENTRY__
void
RubberBandStretcher::setTimeRatio(double ratio)
{
@@ -68,6 +66,7 @@ RubberBandStretcher::setTimeRatio(double ratio)
else m_r3d->setTimeRatio(ratio);
}
RTENTRY__
void
RubberBandStretcher::setPitchScale(double scale)
{
@@ -75,12 +74,14 @@ RubberBandStretcher::setPitchScale(double scale)
else m_r3d->setPitchScale(scale);
}
RTENTRY__
void
RubberBandStretcher::setFormantScale(double scale)
{
if (m_r3d) m_r3d->setFormantScale(scale);
}
RTENTRY__
double
RubberBandStretcher::getTimeRatio() const
{
@@ -88,6 +89,7 @@ RubberBandStretcher::getTimeRatio() const
else return m_r3d->getTimeRatio();
}
RTENTRY__
double
RubberBandStretcher::getPitchScale() const
{
@@ -95,6 +97,7 @@ RubberBandStretcher::getPitchScale() const
else return m_r3d->getPitchScale();
}
RTENTRY__
double
RubberBandStretcher::getFormantScale() const
{
@@ -102,6 +105,7 @@ RubberBandStretcher::getFormantScale() const
else return m_r3d->getFormantScale();
}
RTENTRY__
size_t
RubberBandStretcher::getLatency() const
{
@@ -111,24 +115,28 @@ RubberBandStretcher::getLatency() const
//!!! review all these
RTENTRY__
void
RubberBandStretcher::setTransientsOption(Options options)
{
if (m_d) m_d->setTransientsOption(options);
}
RTENTRY__
void
RubberBandStretcher::setDetectorOption(Options options)
{
if (m_d) m_d->setDetectorOption(options);
}
RTENTRY__
void
RubberBandStretcher::setPhaseOption(Options options)
{
if (m_d) m_d->setPhaseOption(options);
}
RTENTRY__
void
RubberBandStretcher::setFormantOption(Options options)
{
@@ -136,6 +144,7 @@ RubberBandStretcher::setFormantOption(Options options)
else if (m_r3d) m_r3d->setFormantOption(options);
}
RTENTRY__
void
RubberBandStretcher::setPitchOption(Options options)
{
@@ -161,6 +170,7 @@ RubberBandStretcher::setKeyFrameMap(const std::map<size_t, size_t> &mapping)
else m_r3d->setKeyFrameMap(mapping);
}
RTENTRY__
size_t
RubberBandStretcher::getSamplesRequired() const
{
@@ -176,6 +186,7 @@ RubberBandStretcher::study(const float *const *input, size_t samples,
else m_r3d->study(input, samples, final);
}
RTENTRY__
void
RubberBandStretcher::process(const float *const *input, size_t samples,
bool final)
@@ -184,6 +195,7 @@ RubberBandStretcher::process(const float *const *input, size_t samples,
else m_r3d->process(input, samples, final);
}
RTENTRY__
int
RubberBandStretcher::available() const
{
@@ -191,6 +203,7 @@ RubberBandStretcher::available() const
else return m_r3d->available();
}
RTENTRY__
size_t
RubberBandStretcher::retrieve(float *const *output, size_t samples) const
{
@@ -239,6 +252,7 @@ RubberBandStretcher::getExactTimePoints() const
else return {};
}
RTENTRY__
size_t
RubberBandStretcher::getChannelCount() const
{

View File

@@ -386,7 +386,6 @@ R3StretcherImpl::getSamplesRequired() const
}
}
RTENTRY__
void
R3StretcherImpl::process(const float *const *input, size_t samples, bool final)
{
@@ -432,7 +431,6 @@ R3StretcherImpl::process(const float *const *input, size_t samples, bool final)
consume();
}
RTENTRY__
int
R3StretcherImpl::available() const
{
@@ -444,7 +442,6 @@ R3StretcherImpl::available() const
}
}
RTENTRY__
size_t
R3StretcherImpl::retrieve(float *const *output, size_t samples) const
{