1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-26 23:33:49 +01:00

Workaround build breakers. Needs review.

These changes fix a broken build in Windows.
#include <algorithm> needed for min/max to be in std.
decltype(+name) was declaring a const variable, that could not be incremented.  Changed to auto.
This commit is contained in:
James Crook
2016-08-23 21:46:12 +01:00
parent b20a9bacad
commit 781de82d02
10 changed files with 12 additions and 11 deletions

View File

@@ -853,7 +853,7 @@ double VoiceKey::TestEnergy (WaveTrack & t, sampleCount start, sampleCount len)
t.Get((samplePtr)buffer,floatSample, s,block); //grab the block;
//Now, go through the block and calculate energy
for(decltype(+block) i = 0; i< block; i++)
for(auto i = 0; i< block; i++)
{
sum += buffer[i]*buffer[i];
}
@@ -903,7 +903,7 @@ double VoiceKey::TestSignChanges(WaveTrack & t, sampleCount start, sampleCount l
//Now, go through the block and calculate zero crossings
for(decltype(+block) i = 0; i< block; i++)
for(auto i = 0; i< block; i++)
{
if( sgn(buffer[i]) != currentsign)
{
@@ -960,7 +960,7 @@ double VoiceKey::TestDirectionChanges(WaveTrack & t, sampleCount start, sampleCo
//Now, go through the block and calculate zero crossings
for(decltype(+block) i = 0; i< block; i++){
for(auto i = 0; i< block; i++){
if( sgn(buffer[i]-lastval) != lastdirection) {
directionchanges++;