Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/algorithms/public/Envelope.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class Envelope
return fast - slow;
}

bool initialized() { return mInitialized; }
bool initialized() const { return mInitialized; }

private:
void initFilters(double cutoff)
Expand Down
4 changes: 2 additions & 2 deletions include/algorithms/public/EnvelopeGate.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ class EnvelopeGate

return result;
}
index getLatency() { return mLatency; }
bool initialized() { return mInitialized; }
index getLatency() const { return mLatency; }
bool initialized() const { return mInitialized; }


private:
Expand Down
2 changes: 1 addition & 1 deletion include/algorithms/public/EnvelopeSegmentation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class EnvelopeSegmentation
return detected;
}

bool initialized() { return mEnvelope.initialized(); }
bool initialized() const { return mEnvelope.initialized(); }

private:
Envelope mEnvelope;
Expand Down
2 changes: 1 addition & 1 deletion include/algorithms/public/HPSS.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ class HPSS
_impl::asEigen<Array>(out).col(2) = buf.col(0) * residualMask.min(1.0);
}

bool initialized() { return mInitialized; }
bool initialized() const { return mInitialized; }

private:
ArrayXMap makeThreshold(index nBins, double x1, double y1, double x2,
Expand Down
2 changes: 1 addition & 1 deletion include/algorithms/public/NMFMorph.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class NMFMorph
mInitialized = true;
}

bool initialized() { return mInitialized; }
bool initialized() const { return mInitialized; }

void processFrame(ComplexVectorView v, double interpolation, Allocator& alloc)
{
Expand Down
2 changes: 1 addition & 1 deletion include/algorithms/public/SineExtraction.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ class SineExtraction

void reset() { mCurrentFrame = 0; }

bool initialized() { return mInitialized; }
bool initialized() const { return mInitialized; }

private:
void computeWindowTransform(index windowSize, index transformSize,
Expand Down
2 changes: 1 addition & 1 deletion include/algorithms/public/SineFeature.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class SineFeature
return maxNumOut;
}

bool initialized() { return mInitialized; }
bool initialized() const { return mInitialized; }

private:
PeakDetection mPeakDetection;
Expand Down
2 changes: 1 addition & 1 deletion include/algorithms/public/TransientExtraction.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ class TransientExtraction
interpolate(transients.data(), residual.data(), alloc);
}

bool initialized() { return mInitialized; }
bool initialized() const { return mInitialized; }

private:
void frame(const double* input, index inSize)
Expand Down
2 changes: 1 addition & 1 deletion include/algorithms/util/MedianFilter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class MedianFilter

index size() { return asSigned(mFilterSize); }

bool initialized() { return mInitialized; }
bool initialized() const { return mInitialized; }

private:
std::size_t mFilterSize{0};
Expand Down
10 changes: 5 additions & 5 deletions include/clients/common/FluidBaseClient.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@ class FluidBaseClient
double sampleRate() const noexcept { return mSampleRate; };
void sampleRate(double sr) { mSampleRate = sr; }

const char* getInputLabel(index i)
const char* getInputLabel(index i) const
{
return i < asSigned(mInputLabels.size()) ? mInputLabels[asUnsigned(i)] : "";
}

const char* getOutputLabel(index i)
const char* getOutputLabel(index i) const
{
return i < asSigned(mOutputLabels.size()) ? mOutputLabels[asUnsigned(i)] : "";
}
Expand Down Expand Up @@ -216,7 +216,7 @@ class ClientWrapper
mParams.template set(std::forward<T>(x), reportage);
}

auto latency() { return mClient.latency(); }
auto latency() const { return mClient.latency(); }

index audioChannelsIn() const noexcept { return mClient.audioChannelsIn(); }
index audioChannelsOut() const noexcept { return mClient.audioChannelsOut(); }
Expand Down Expand Up @@ -254,12 +254,12 @@ class ClientWrapper
mParams = p;
}

const char* getInputLabel(index i)
const char* getInputLabel(index i) const
{
return mClient.getInputLabel(i);
}

const char* getOutputLabel(index i)
const char* getOutputLabel(index i) const
{
return mClient.getOutputLabel(i);
}
Expand Down
14 changes: 7 additions & 7 deletions include/clients/common/ParameterSet.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -305,16 +305,16 @@ class ParameterSetView<
}

template <size_t N>
typename ParamType<N>::type applyConstraintsTo(typename ParamType<N>::type x)
typename ParamType<N>::type applyConstraintsTo(typename ParamType<N>::type x) const
{
const index offset = std::get<N>(std::make_tuple(Os...));
auto& constraints = constraint<N>();
return constrain<offset, N, kAll>(x, constraints, nullptr);
}

template <size_t N>
auto applyConstraintToMax(index x) -> std::enable_if_t<
std::is_same_v<typename ParamType<N>::type, LongRuntimeMaxParam>, index>
template <size_t N, typename = std::enable_if_t<
std::is_same_v<typename ParamType<N>::type, LongRuntimeMaxParam>, index>>
auto applyConstraintToMax(index x) const
{
const auto constraints = GetIncreasingConstraints(constraint<N>());
if constexpr (std::tuple_size<decltype(constraints)>::value)
Expand Down Expand Up @@ -465,7 +465,7 @@ class ParameterSetView<
{} // no-op for non-shared parameter set?

template <size_t N>
auto descriptorAt()
auto descriptorAt() const
{
return descriptor<N>();
}
Expand Down Expand Up @@ -570,7 +570,7 @@ class ParameterSetView<

template <size_t Offset, size_t N, ConstraintTypes C, typename T,
typename... Constraints>
T constrain(T& thisParam, const std::tuple<Constraints...>& c, Result* r)
T constrain(T& thisParam, const std::tuple<Constraints...>& c, Result* r) const
{
using CT = std::tuple<Constraints...>;
// clang < 3.7: index_sequence_for doesn't work here
Expand All @@ -592,7 +592,7 @@ class ParameterSetView<
template <size_t Offset, size_t N, typename T, typename Constraints,
size_t... Is>
T constrainImpl(T& thisParam, Constraints& c, std::index_sequence<Is...>,
Result* r)
Result* r) const
{
T res = thisParam;
static_cast<void>(r);
Expand Down
4 changes: 2 additions & 2 deletions include/clients/nrt/FluidSharedInstanceAdaptor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,14 +160,14 @@ class ParamAliasAdaptor<NRTClient, std::tuple<Ts...>>
}

template<size_t N>
typename ParamType<N>::type applyConstraintsTo(typename ParamType<N>::type x)
typename ParamType<N>::type applyConstraintsTo(typename ParamType<N>::type x) const
{
return mParams->template applyConstraintsTo<N>(x);
}

template <size_t N>
typename ParamType<N>::type
applyConstraintToMax(typename ParamType<N>::type x)
applyConstraintToMax(typename ParamType<N>::type x) const
{
return mParams->template applyConstraintToMax(x);
}
Expand Down
2 changes: 1 addition & 1 deletion include/clients/nrt/KDTreeClient.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ class KDTreeQuery : public FluidBaseClient, ControlIn, ControlOut
controlChannelsOut({1, 1});
}

index latency() { return 0; }
index latency() const { return 0; }

template <typename T>
void process(std::vector<FluidTensorView<T, 1>>& input,
Expand Down
2 changes: 1 addition & 1 deletion include/clients/nrt/KMeansClient.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ class KMeansQuery : public FluidBaseClient, ControlIn, ControlOut
}
}

index latency() { return 0; }
index latency() const { return 0; }
};


Expand Down
2 changes: 1 addition & 1 deletion include/clients/nrt/KNNClassifierClient.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ class KNNClassifierQuery : public FluidBaseClient, ControlIn, ControlOut
}
}

index latency() { return 0; }
index latency() const { return 0; }
};

} // namespace knnclassifier
Expand Down
2 changes: 1 addition & 1 deletion include/clients/nrt/KNNRegressorClient.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ class KNNRegressorQuery : public FluidBaseClient, ControlIn, ControlOut
}
}

index latency() { return 0; }
index latency() const { return 0; }
};

} // namespace knnregressor
Expand Down
2 changes: 1 addition & 1 deletion include/clients/nrt/MLPClassifierClient.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ class MLPClassifierQuery : public FluidBaseClient, ControlIn, ControlOut
}
}

index latency() { return 0; }
index latency() const { return 0; }
};


Expand Down
2 changes: 1 addition & 1 deletion include/clients/nrt/MLPRegressorClient.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ class MLPRegressorQuery : public FluidBaseClient, ControlIn, ControlOut
}
}

index latency() { return 0; }
index latency() const { return 0; }
};

} // namespace mlpregressor
Expand Down
2 changes: 1 addition & 1 deletion include/clients/nrt/NormalizeClient.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ class NormalizeQuery : public FluidBaseClient, ControlIn, ControlOut
}
}

index latency() { return 0; }
index latency() const { return 0; }
};


Expand Down
2 changes: 1 addition & 1 deletion include/clients/nrt/PCAClient.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ class PCAQuery : public FluidBaseClient, ControlIn, ControlOut
}
}

index latency() { return 0; }
index latency() const { return 0; }
};


Expand Down
2 changes: 1 addition & 1 deletion include/clients/nrt/RobustScaleClient.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ class RobustScaleQuery : public FluidBaseClient, ControlIn, ControlOut
}
}

index latency() { return 0; }
index latency() const { return 0; }
};

} // namespace robustscale
Expand Down
2 changes: 1 addition & 1 deletion include/clients/nrt/SKMeansClient.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ class SKMeansQuery : public FluidBaseClient, ControlIn, ControlOut
}
}

index latency() { return 0; }
index latency() const { return 0; }
};


Expand Down
2 changes: 1 addition & 1 deletion include/clients/nrt/StandardizeClient.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ class StandardizeQuery : public FluidBaseClient, ControlIn, ControlOut
}
}

index latency() { return 0; }
index latency() const { return 0; }
};


Expand Down
2 changes: 1 addition & 1 deletion include/clients/nrt/UMAPClient.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ class UMAPQuery : public FluidBaseClient, ControlIn, ControlOut
}
}

index latency() { return 0; }
index latency() const { return 0; }
};

} // namespace umap
Expand Down
2 changes: 1 addition & 1 deletion include/clients/rt/AmpFeatureClient.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class AmpFeatureClient : public FluidBaseClient, public AudioIn, public AudioOut
get<kFastRampDownTime>(), get<kSlowRampDownTime>(), hiPassFreq));
}
}
index latency() { return 0; }
index latency() const { return 0; }

void reset(FluidContext&)
{
Expand Down
2 changes: 1 addition & 1 deletion include/clients/rt/AmpGateClient.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ class AmpGateClient : public FluidBaseClient, public AudioIn, public AudioOut
get<kMinTimeBelowThreshold>(), get<kDownwardLookupTime>());
}

index latency()
index latency() const
{
return std::max(
get<kMinTimeAboveThreshold>() + get<kUpwardLookupTime>(),
Expand Down
2 changes: 1 addition & 1 deletion include/clients/rt/AmpSliceClient.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class AmpSliceClient : public FluidBaseClient, public AudioIn, public AudioOut
get<kSlowRampDownTime>(), hiPassFreq, get<kDebounce>()));
}
}
index latency() { return 0; }
index latency() const { return 0; }

void reset(FluidContext&)
{
Expand Down
2 changes: 1 addition & 1 deletion include/clients/rt/AudioTransportClient.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class AudioTransportClient : public FluidBaseClient,
if (output[0].data()) output[0] <<= result;
}

index latency() { return get<kFFT>().winSize(); }
index latency() const { return get<kFFT>().winSize(); }
void reset(FluidContext&) { mBufferedProcess.reset(); }

private:
Expand Down
2 changes: 1 addition & 1 deletion include/clients/rt/BaseSTFTClient.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class BaseSTFTClient : public FluidBaseClient, public AudioIn, public AudioOut
audioChannelsOut(1);
}

index latency() { return get<kFFT>().winSize(); }
index latency() const { return get<kFFT>().winSize(); }

void reset(FluidContext&) { mSTFTBufferedProcess.reset(); }

Expand Down
2 changes: 1 addition & 1 deletion include/clients/rt/ChromaClient.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class ChromaClient : public FluidBaseClient, public AudioIn, public ControlOut
output[0](Slice(nChroma, get<kNChroma>().max() - nChroma)).fill(0);
}

index latency() { return get<kFFT>().winSize(); }
index latency() const { return get<kFFT>().winSize(); }

void reset(FluidContext const& c)
{
Expand Down
2 changes: 1 addition & 1 deletion include/clients/rt/GainClient.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class GainClient : public FluidBaseClient, public AudioIn, public AudioOut
audioChannelsOut(1);
}

index latency() { return 0; }
index latency() const { return 0; }
void reset() {}

template <typename T>
Expand Down
2 changes: 1 addition & 1 deletion include/clients/rt/HPSSClient.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class HPSSClient : public FluidBaseClient, public AudioIn, public AudioOut
FluidBaseClient::setOutputLabels({"harmonic component", "percussive component", "residual (in modes 1 & 2)"});
}

index latency()
index latency() const
{
return ((get<kHSize>() - 1) * get<kFFT>().hopSize()) +
get<kFFT>().winSize();
Expand Down
2 changes: 1 addition & 1 deletion include/clients/rt/LoudnessClient.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class LoudnessClient : public FluidBaseClient, public AudioIn, public ControlOut
output[0](Slice(numOuts, mMaxFeatures - numOuts)).fill(0);
}

index latency() { return get<kWindowSize>(); }
index latency() const { return get<kWindowSize>(); }

void reset(FluidContext& c)
{
Expand Down
2 changes: 1 addition & 1 deletion include/clients/rt/MFCCClient.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ class MFCCClient : public FluidBaseClient, public AudioIn, public ControlOut
output[0](Slice(nCoefs, get<kNCoefs>().max() - nCoefs)).fill(0);
}

index latency() { return get<kFFT>().winSize(); }
index latency() const { return get<kFFT>().winSize(); }

void reset(FluidContext& c)
{
Expand Down
2 changes: 1 addition & 1 deletion include/clients/rt/MelBandsClient.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class MelBandsClient : public FluidBaseClient, public AudioIn, public ControlOut
output[0](Slice(nBands, get<kNBands>().max() - nBands)).fill(0);
}

index latency() { return get<kFFT>().winSize(); }
index latency() const { return get<kFFT>().winSize(); }

void reset(FluidContext& c)
{
Expand Down
Loading