diff --git a/source/SoundStretch/soundstretch.vcproj b/source/SoundStretch/soundstretch.vcproj index 8b58f4d..b1f66be 100644 --- a/source/SoundStretch/soundstretch.vcproj +++ b/source/SoundStretch/soundstretch.vcproj @@ -219,12 +219,6 @@ - - - - diff --git a/source/SoundTouch/FIRFilter.cpp b/source/SoundTouch/FIRFilter.cpp index 991a60a..72607bd 100644 --- a/source/SoundTouch/FIRFilter.cpp +++ b/source/SoundTouch/FIRFilter.cpp @@ -181,7 +181,7 @@ void FIRFilter::setCoefficients(const SAMPLETYPE *coeffs, uint newLength, uint u assert(length == newLength); resultDivFactor = uResultDivFactor; - resultDivider = (SAMPLETYPE)::pow(2, (int)resultDivFactor); + resultDivider = (SAMPLETYPE)::pow(2.0, (int)resultDivFactor); delete[] filterCoeffs; filterCoeffs = new SAMPLETYPE[length]; diff --git a/source/SoundTouch/TDStretch.cpp b/source/SoundTouch/TDStretch.cpp index d845430..adec4ba 100644 --- a/source/SoundTouch/TDStretch.cpp +++ b/source/SoundTouch/TDStretch.cpp @@ -845,7 +845,7 @@ void TDStretch::calculateOverlapLength(int aoverlapMs) overlapDividerBits = _getClosest2Power((sampleRate * aoverlapMs) / 1000.0); if (overlapDividerBits > 9) overlapDividerBits = 9; if (overlapDividerBits < 4) overlapDividerBits = 4; - newOvl = (int)pow(2, overlapDividerBits); + newOvl = (int)pow(2.0, (int)overlapDividerBits); acceptNewOverlapLength(newOvl); diff --git a/source/SoundTouch/cpu_detect_x86_gcc.cpp b/source/SoundTouch/cpu_detect_x86_gcc.cpp index 77b816d..c5c5cc7 100644 --- a/source/SoundTouch/cpu_detect_x86_gcc.cpp +++ b/source/SoundTouch/cpu_detect_x86_gcc.cpp @@ -1,10 +1,9 @@ //////////////////////////////////////////////////////////////////////////////// /// -/// gcc version of the x86 CPU detect routine. +/// Generic version of the x86 CPU extension detection routine. /// -/// This file is to be compiled on any platform with the GNU C compiler. -/// Compiler. Please see 'cpu_detect_x86_win.cpp' for the x86 Windows version -/// of this file. +/// This file is for GNU & other non-Windows compilers, see 'cpu_detect_x86_win.cpp' +/// for the Microsoft compiler version. /// /// Author : Copyright (c) Olli Parviainen /// Author e-mail : oparviai 'at' iki.fi @@ -45,20 +44,16 @@ #include "cpu_detect.h" #include "STTypes.h" -#ifndef __GNUC__ -#error wrong platform - this source code file is for the GNU C compiler. -#endif - using namespace std; #include + ////////////////////////////////////////////////////////////////////////////// // // processor instructions extension detection routines // ////////////////////////////////////////////////////////////////////////////// - // Flag variable indicating whick ISA extensions are disabled (for debugging) static uint _dwDisabledISA = 0x00; // 0xffffffff; //<- use this to disable all extensions @@ -73,7 +68,7 @@ void disableExtensions(uint dwDisableMask) /// Checks which instruction set extensions are supported by the CPU. uint detectCPUextensions(void) { -#ifndef ALLOW_X86_OPTIMIZATIONS +#if (!(ALLOW_X86_OPTIMIZATIONS) || !(__GNUC__)) return 0; // always disable extensions on non-x86 platforms.