Add MemoryBarrier for MinGW; freqPeak is unused
This commit is contained in:
@@ -72,8 +72,6 @@ RubberBandStretcher::Impl::ChannelData::construct(const std::set<size_t> &sizes,
|
|||||||
unwrappedPhase = allocate_and_zero<process_t>(realSize);
|
unwrappedPhase = allocate_and_zero<process_t>(realSize);
|
||||||
envelope = allocate_and_zero<process_t>(realSize);
|
envelope = allocate_and_zero<process_t>(realSize);
|
||||||
|
|
||||||
freqPeak = allocate_and_zero<size_t>(realSize);
|
|
||||||
|
|
||||||
fltbuf = allocate_and_zero<float>(maxSize);
|
fltbuf = allocate_and_zero<float>(maxSize);
|
||||||
dblbuf = allocate_and_zero<process_t>(maxSize);
|
dblbuf = allocate_and_zero<process_t>(maxSize);
|
||||||
|
|
||||||
@@ -144,7 +142,6 @@ RubberBandStretcher::Impl::ChannelData::setSizes(size_t windowSize,
|
|||||||
v_zero(prevPhase, realSize);
|
v_zero(prevPhase, realSize);
|
||||||
v_zero(prevError, realSize);
|
v_zero(prevError, realSize);
|
||||||
v_zero(unwrappedPhase, realSize);
|
v_zero(unwrappedPhase, realSize);
|
||||||
v_zero(freqPeak, realSize);
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -168,7 +165,6 @@ RubberBandStretcher::Impl::ChannelData::setSizes(size_t windowSize,
|
|||||||
prevError = reallocate_and_zero(prevError, oldReal, realSize);
|
prevError = reallocate_and_zero(prevError, oldReal, realSize);
|
||||||
unwrappedPhase = reallocate_and_zero(unwrappedPhase, oldReal, realSize);
|
unwrappedPhase = reallocate_and_zero(unwrappedPhase, oldReal, realSize);
|
||||||
envelope = reallocate_and_zero(envelope, oldReal, realSize);
|
envelope = reallocate_and_zero(envelope, oldReal, realSize);
|
||||||
freqPeak = reallocate_and_zero(freqPeak, oldReal, realSize);
|
|
||||||
fltbuf = reallocate_and_zero(fltbuf, oldMax, maxSize);
|
fltbuf = reallocate_and_zero(fltbuf, oldMax, maxSize);
|
||||||
dblbuf = reallocate_and_zero(dblbuf, oldMax, maxSize);
|
dblbuf = reallocate_and_zero(dblbuf, oldMax, maxSize);
|
||||||
|
|
||||||
@@ -238,7 +234,6 @@ RubberBandStretcher::Impl::ChannelData::~ChannelData()
|
|||||||
deallocate(prevError);
|
deallocate(prevError);
|
||||||
deallocate(unwrappedPhase);
|
deallocate(unwrappedPhase);
|
||||||
deallocate(envelope);
|
deallocate(envelope);
|
||||||
deallocate(freqPeak);
|
|
||||||
deallocate(accumulator);
|
deallocate(accumulator);
|
||||||
deallocate(windowAccumulator);
|
deallocate(windowAccumulator);
|
||||||
deallocate(fltbuf);
|
deallocate(fltbuf);
|
||||||
|
|||||||
@@ -99,8 +99,6 @@ public:
|
|||||||
process_t *prevError;
|
process_t *prevError;
|
||||||
process_t *unwrappedPhase;
|
process_t *unwrappedPhase;
|
||||||
|
|
||||||
size_t *freqPeak;
|
|
||||||
|
|
||||||
float *accumulator;
|
float *accumulator;
|
||||||
size_t accumulatorFill;
|
size_t accumulatorFill;
|
||||||
float *windowAccumulator;
|
float *windowAccumulator;
|
||||||
|
|||||||
@@ -226,7 +226,13 @@ system_get_process_status(int pid)
|
|||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
void system_memorybarrier()
|
void system_memorybarrier()
|
||||||
{
|
{
|
||||||
|
#ifdef MemoryBarrier
|
||||||
MemoryBarrier();
|
MemoryBarrier();
|
||||||
|
#else /* (mingw) */
|
||||||
|
LONG Barrier = 0;
|
||||||
|
__asm__ __volatile__("xchgl %%eax,%0 "
|
||||||
|
: "=r" (Barrier));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#else /* !_WIN32 */
|
#else /* !_WIN32 */
|
||||||
#if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1)
|
#if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1)
|
||||||
|
|||||||
Reference in New Issue
Block a user