mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-24 01:54:22 +00:00
DSP: Add missing consts in Oversampling
This commit is contained in:
parent
a886495606
commit
a7d5d8dd95
2 changed files with 8 additions and 8 deletions
|
|
@ -39,7 +39,7 @@ struct Oversampling<SampleType>::OversamplingStage
|
|||
virtual ~OversamplingStage() {}
|
||||
|
||||
//==============================================================================
|
||||
virtual SampleType getLatencyInSamples() = 0;
|
||||
virtual SampleType getLatencyInSamples() const = 0;
|
||||
|
||||
virtual void initProcessing (size_t maximumNumberOfSamplesBeforeOversampling)
|
||||
{
|
||||
|
|
@ -78,7 +78,7 @@ struct OversamplingDummy : public Oversampling<SampleType>::OversamplingStage
|
|||
OversamplingDummy (size_t numChans) : ParentType (numChans, 1) {}
|
||||
|
||||
//==============================================================================
|
||||
SampleType getLatencyInSamples() override
|
||||
SampleType getLatencyInSamples() const override
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -139,7 +139,7 @@ struct Oversampling2TimesEquirippleFIR : public Oversampling<SampleType>::Overs
|
|||
}
|
||||
|
||||
//==============================================================================
|
||||
SampleType getLatencyInSamples() override
|
||||
SampleType getLatencyInSamples() const override
|
||||
{
|
||||
return static_cast<SampleType> (coefficientsUp.getFilterOrder() + coefficientsDown.getFilterOrder()) * 0.5f;
|
||||
}
|
||||
|
|
@ -300,7 +300,7 @@ struct Oversampling2TimesPolyphaseIIR : public Oversampling<SampleType>::Oversa
|
|||
}
|
||||
|
||||
//==============================================================================
|
||||
SampleType getLatencyInSamples() override
|
||||
SampleType getLatencyInSamples() const override
|
||||
{
|
||||
return latency;
|
||||
}
|
||||
|
|
@ -629,7 +629,7 @@ void Oversampling<SampleType>::clearOversamplingStages()
|
|||
|
||||
//==============================================================================
|
||||
template <typename SampleType>
|
||||
SampleType Oversampling<SampleType>::getLatencyInSamples() noexcept
|
||||
SampleType Oversampling<SampleType>::getLatencyInSamples() const noexcept
|
||||
{
|
||||
auto latency = static_cast<SampleType> (0);
|
||||
size_t order = 1;
|
||||
|
|
@ -644,7 +644,7 @@ SampleType Oversampling<SampleType>::getLatencyInSamples() noexcept
|
|||
}
|
||||
|
||||
template <typename SampleType>
|
||||
size_t Oversampling<SampleType>::getOversamplingFactor() noexcept
|
||||
size_t Oversampling<SampleType>::getOversamplingFactor() const noexcept
|
||||
{
|
||||
return factorOversampling;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -105,10 +105,10 @@ public:
|
|||
Note: The latency might not be integer, so you might need to round its value
|
||||
or to compensate it properly in your processing code.
|
||||
*/
|
||||
SampleType getLatencyInSamples() noexcept;
|
||||
SampleType getLatencyInSamples() const noexcept;
|
||||
|
||||
/** Returns the current oversampling factor. */
|
||||
size_t getOversamplingFactor() noexcept;
|
||||
size_t getOversamplingFactor() const noexcept;
|
||||
|
||||
//==============================================================================
|
||||
/** Must be called before any processing, to set the buffer sizes of the internal
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue