Fix compiler warnings
This commit is contained in:
@@ -42,7 +42,7 @@ RubberBandStretcher::RubberBandStretcher(size_t sampleRate,
|
||||
m_r3d
|
||||
((options & OptionEngineFiner) ?
|
||||
new R3StretcherImpl(R3StretcherImpl::Parameters
|
||||
(sampleRate, channels, options),
|
||||
(double(sampleRate), channels, options),
|
||||
initialTimeRatio, initialPitchScale)
|
||||
: nullptr)
|
||||
{
|
||||
|
||||
@@ -97,7 +97,7 @@ public:
|
||||
if (m_percentile == fifty) { // exact default value
|
||||
return m_sortspace[n / 2];
|
||||
} else {
|
||||
int index = float(n) * m_percentile / 100.f;
|
||||
int index = int(floorf(float(n) * m_percentile / 100.f));
|
||||
if (index >= m_fill) index = m_fill - 1;
|
||||
return m_sortspace[index];
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ protected:
|
||||
T m_area;
|
||||
|
||||
void encache();
|
||||
void cosinewin(T *, T, T, T, T);
|
||||
void cosinewin(T *, double, double, double, double);
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
@@ -248,14 +248,14 @@ void Window<T>::encache()
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void Window<T>::cosinewin(T *mult, T a0, T a1, T a2, T a3)
|
||||
void Window<T>::cosinewin(T *mult, double a0, double a1, double a2, double a3)
|
||||
{
|
||||
int n = int(m_size);
|
||||
for (int i = 0; i < n; ++i) {
|
||||
mult[i] *= (a0
|
||||
- a1 * cos(2 * M_PI * i / n)
|
||||
+ a2 * cos(4 * M_PI * i / n)
|
||||
- a3 * cos(6 * M_PI * i / n));
|
||||
mult[i] = T(mult[i] * (a0
|
||||
- a1 * cos(2 * M_PI * i / n)
|
||||
+ a2 * cos(4 * M_PI * i / n)
|
||||
- a3 * cos(6 * M_PI * i / n)));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -392,7 +392,7 @@ R3StretcherImpl::process(const float *const *input, size_t samples, bool final)
|
||||
if (!isRealTime() && !m_keyFrameMap.empty()) {
|
||||
if (m_mode == ProcessMode::Studying) {
|
||||
m_totalTargetDuration =
|
||||
round(m_studyInputDuration * getEffectiveRatio());
|
||||
size_t(round(m_studyInputDuration * getEffectiveRatio()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user