More rt entry points

This commit is contained in:
Chris Cannam
2022-06-17 08:26:05 +01:00
parent 06521f0043
commit ea148cb3ca
2 changed files with 17 additions and 6 deletions

View File

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

View File

@@ -384,7 +384,6 @@ R3StretcherImpl::getSamplesRequired() const
} }
} }
RTENTRY__
void void
R3StretcherImpl::process(const float *const *input, size_t samples, bool final) R3StretcherImpl::process(const float *const *input, size_t samples, bool final)
{ {
@@ -430,7 +429,6 @@ R3StretcherImpl::process(const float *const *input, size_t samples, bool final)
consume(); consume();
} }
RTENTRY__
int int
R3StretcherImpl::available() const R3StretcherImpl::available() const
{ {
@@ -442,7 +440,6 @@ R3StretcherImpl::available() const
} }
} }
RTENTRY__
size_t size_t
R3StretcherImpl::retrieve(float *const *output, size_t samples) const R3StretcherImpl::retrieve(float *const *output, size_t samples) const
{ {