A Collection of Useful C++ Classes for Signal Processing

DSP, Plugin and Host development discussion.
Post Reply New Topic
RELATED
PRODUCTS

Post

thevinn,

I finally got around to creating a plug-in to test your code. I work on Mac in the Juce framework, so apart from BRP's observation I had to fix about 1000 compile errors. GCC barfed all over the code, in particular:

-
- references to base class member vars such as m_w, which had to be changed to this->m_w
- reference to base class enumerated constants such as passbandHint, which had to be changed to PoleFilter<poles, channels>::passbandHint
- lack of template parameters anywhere template class names are invoked
- __int64 DNE on mac, so I just replaced that typedef with long. this is probably incorrect.
- pole count in instantiations of chebychev filters somehow get doubled, so in Chebychev1 ctor and Chebychev2::SetupCommon I had to change

PoleFilter<poles, channels>::hintPassband;

to

PoleFilter<poles/2, channels>::hintPassband;

There was also this error in a number of places:

Code: Select all

DspFilter.h: In member function 'void Dsp::Biquad<channels>::Setup(const Dsp::CalcT*, const Dsp::CalcT*)':
DspFilter.h:988: error: there are no arguments to 'Reset' that depend on a template parameter, so a declaration of 'Reset' must be available
DspFilter.h:988: error: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
.

setting -fpermissive did work, but GCC seems to warn against that as a fix. I don't particularly want that flag to be set for my entire project, anyway, so maybe this can be fixed in the code?

I'm going to add some of the filter's functionality to the plug in and post the project later in the week, but please diff 0.8.1 with http://adamsomers.com/code/DspFilter_gcc.h and integrate the necessary GCC fixes. If you found some of my changes to be unnecessary, please advise as to how else to avoid these compilation errors.


EDIT: since you will be rewriting the interface, please just keep the GCC issues in mind. Perhaps you can compile using GCC on your system?

Post

asomers wrote:I finally got around to creating a plug-in to test your code.
Thanks!
GCC barfed all over the code
I've noticed this as well, someone is porting my app to the Mac and they are getting problems identical to yours. To be honest, I am baffled. Specifically:
references to base class member vars such as m_w, which had to be changed to this->m_w
I noticed this and I don't understand why it is necessary. Base class member variables are available by default according to the C++ specification. It should not be necessary to prefix them with this->. The following code snippet is valid C++:

Code: Select all

class A
{
  public:
  int m_x;
};

class B : public A
{
  void foo( void )
    { m_x=0; } // legal
};
I'm not denying that you have a problem, but if I am going to fix it and avoid it in the future I need to understand why it is not legal. Is it something to do with templates?
reference to base class enumerated constants such as passbandHint, which had to be changed to PoleFilter<poles, channels>::passbandHint
Wow that is inconvenient! This is the same problem as accessing data members of the base class, except that its an enumerated constant. My rewrite will eliminate the enum but still, why is it illegal?
lack of template parameters anywhere template class names are invoked
Small example?
__int64 DNE on mac, so I just replaced that typedef with long. this is probably incorrect.
What is the typename of the 64 bit integer on mac?
There was also this error in a number of places:

Code: Select all

DspFilter.h: In member function 'void Dsp::Biquad<channels>::Setup(const Dsp::CalcT*, const Dsp::CalcT*)':
DspFilter.h:988: error: there are no arguments to 'Reset' that depend on a template parameter, so a declaration of 'Reset' must be available
DspFilter.h:988: error: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
.
I've been getting this error in other parts of my program from gcc. What does it mean? Why are my calls to Reset() not valid?
EDIT: since you will be rewriting the interface, please just keep the GCC issues in mind. Perhaps you can compile using GCC on your system?
If someone wants to send me a makefile / small project with a simple .cpp file that includes DspFilter.h and calls the test function I provided at the bottom, that works correctly in MinGW I will gladly use it. I think this will be better than just incorporating patches over and over.

Thank you for your effort!

Post

thevinn wrote:I'm not denying that you have a problem, but if I am going to fix it and avoid it in the future I need to understand why it is not legal. Is it something to do with templates?
Yes, it has everything to do with templates. The code snippet you posted is valid, and would work under GCC since A is not a template. if A were a template base class with typename T then B would have to explicitly access m_x though A<T>'s scope or, the cleaner looking version, through this->. The only explanation I can find right now is here: http://stupefydeveloper.blogspot.com/20 ... s-and.html
thevinn wrote:
lack of template parameters anywhere template class names are invoked
Small example?
in PoleFilter::Normalize CascadeStages::Normalize( 1/mag ) needs to be CascadeStages<stages, channels>::Normalize( 1/mag )
thevinn wrote:What is the typename of the 64 bit integer on mac?
MacTypes.h defines "singed long long" SInt64 and "unsinged long long" UInt64. These are incompatible with juce AFAICT. I think this will work:

Code: Select all

typedef long		Int32;	// Must be 32 bits
typedef long long Int64;	// Must be 64 bits

Post

thevinn wrote:What is the typename of the 64 bit integer on mac?
Here is what we use for all posix platforms in libnui:

Code: Select all

#include <sys/types.h>
#include <ctype.h>

typedef int8_t    int8;
typedef int16_t   int16;
typedef int32_t   int32;
typedef int64_t   int64;
typedef u_int8_t  uint8;
typedef u_int16_t uint16;
typedef u_int32_t uint32;
typedef u_int64_t uint64;
Cheers

Post

asomers wrote:
thevinn wrote:What is the typename of the 64 bit integer on mac?
MacTypes.h defines "singed long long" SInt64 and "unsinged long long" UInt64. These are incompatible with juce AFAICT. I think this will work:

Code: Select all

typedef long		Int32;	// Must be 32 bits
typedef long long Int64;	// Must be 64 bits
Int64 is only used for the fastsqrt() variants, I can make that a conditional compilation directive and you can just disable it if you like.

Post

I've died and gone to GUI-less development environment hell! I installed MinGW and played with my PATH environment variable (lovely interface).

Does this look familiar?

Code: Select all

DspFilter.h: In member function 'void Dsp::Biquad<channels>::Setup(const Dsp::CalcT*, const Dsp::CalcT*)':
DspFilter.h:994: error: there are no arguments to 'Reset' that depend on a template parameter, so a declaration of 'Reset' must be available
DspFilter.h:994: error: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
DspFilter.h:997: error: there are no arguments to 'SetAStage' that depend on a template parameter, so a declaration of 'SetAStage' must be available
DspFilter.h:998: error: there are no arguments to 'SetBStage' that depend on a template parameter, so a declaration of 'SetBStage' must be available
DspFilter.h: In member function 'void Dsp::BiquadLowPass<channels>::SetupCommon(Dsp::CalcT, Dsp::CalcT, Dsp::CalcT)':
DspFilter.h:1024: error: there are no arguments to 'SetStage' that depend on a template parameter, so a declaration of 'SetStage' must be available
DspFilter.h: In member function 'void Dsp::BiquadHighPass<channels>::SetupCommon(Dsp::CalcT, Dsp::CalcT, Dsp::CalcT)':
DspFilter.h:1068: error: there are no arguments to 'SetStage' that depend on a template parameter, so a declaration of 'SetStage' must be available
DspFilter.h: In member function 'void Dsp::BiquadBandPass1<channels>::SetupCommon(Dsp::CalcT, Dsp::CalcT, Dsp::CalcT)':
DspFilter.h:1112: error: there are no arguments to 'SetStage' that depend on a template parameter, so a declaration of 'SetStage' must be available
DspFilter.h: In member function 'void Dsp::BiquadBandPass2<channels>::SetupCommon(Dsp::CalcT, Dsp::CalcT, Dsp::CalcT)':
DspFilter.h:1157: error: there are no arguments to 'SetStage' that depend on a template parameter, so a declaration of 'SetStage' must be available
DspFilter.h: In member function 'void Dsp::BiquadBandStop<channels>::SetupCommon(Dsp::CalcT, Dsp::CalcT, Dsp::CalcT)':
DspFilter.h:1199: error: there are no arguments to 'SetStage' that depend on a template parameter, so a declaration of 'SetStage' must be available
DspFilter.h: In member function 'void Dsp::BiquadAllPass<channels>::SetupCommon(Dsp::CalcT, Dsp::CalcT, Dsp::CalcT)':
DspFilter.h:1242: error: there are no arguments to 'SetStage' that depend on a template parameter, so a declaration of 'SetStage' must be available
DspFilter.h: In member function 'void Dsp::BiquadPeakEq<channels>::SetupCommon(Dsp::CalcT, Dsp::CalcT, Dsp::CalcT, Dsp::CalcT)':
DspFilter.h:1290: error: there are no arguments to 'SetStage' that depend on a template parameter, so a declaration of 'SetStage' must be available
DspFilter.h: In member function 'void Dsp::BiquadLowShelf<channels>::SetupCommon(Dsp::CalcT, Dsp::CalcT, Dsp::CalcT)':
DspFilter.h:1343: error: there are no arguments to 'SetStage' that depend on a template parameter, so a declaration of 'SetStage' must be available
DspFilter.h: In member function 'void Dsp::BiquadHighShelf<channels>::SetupCommon(Dsp::CalcT, Dsp::CalcT, Dsp::CalcT)':
DspFilter.h:1399: error: there are no arguments to 'SetStage' that depend on a template parameter, so a declaration of 'SetStage' must be available
DspFilter.h: In member function 'void Dsp::PoleFilter<stages, channels>::Normalize()':
DspFilter.h:1580: error: 'ResponseFunctor' was not declared in this scope
DspFilter.h:1580: error: expected ';' before "f"
DspFilter.h:1581: error: there are no arguments to 'f' that depend on a template parameter, so a declaration of 'f' must be available
DspFilter.h:1582: error: 'template<int stages, int channels> class Dsp::CascadeStages' used without template parameters
DspFilter.h:1588: error: 'ResponseFunctor' was not declared in this scope
DspFilter.h:1588: error: expected ';' before "f"
DspFilter.h:1591: error: 'f' was not declared in this scope
DspFilter.h:1592: error: 'template<int stages, int channels> class Dsp::CascadeStages' used without template parameters
DspFilter.h: In member function 'void Dsp::PoleFilter<stages, channels>::Prepare()':
DspFilter.h:1615: error: there are no arguments to 'Reset' that depend on a template parameter, so a declaration of 'Reset' must be available
DspFilter.h: In constructor 'Dsp::Butterworth<poles, channels>::Butterworth()':
DspFilter.h:1692: error: 'm_hint' was not declared in this scope
DspFilter.h:1692: error: 'hintPassband' was not declared in this scope
DspFilter.h: In member function 'void Dsp::Butterworth<poles, channels>::Setup(Dsp::CalcT)':
DspFilter.h:1698: error: 'm_n' was not declared in this scope
DspFilter.h:1699: error: 'm_wc' was not declared in this scope
DspFilter.h:1700: error: there are no arguments to 'Prepare' that depend on a template parameter, so a declaration of 'Prepare' must be available
DspFilter.h: In member function 'virtual Dsp::Complex Dsp::Butterworth<poles, channels>::GetPole(int)':
DspFilter.h:1718: error: 'm_wc' was not declared in this scope
DspFilter.h: In member function 'Dsp::Complex Dsp::Butterworth<poles, channels>::GetSPole(int, Dsp::CalcT)':
DspFilter.h:1724: error: 'm_n' was not declared in this scope
DspFilter.h: In member function 'void Dsp::ButterBandPass<pairs, channels>::Setup(Dsp::CalcT, Dsp::CalcT)':
DspFilter.h:1810: error: 'm_n' was not declared in this scope
DspFilter.h:1812: error: 'm_wc2' was not declared in this scope
DspFilter.h:1813: error: 'm_wc' was not declared in this scope
DspFilter.h:1814: error: there are no arguments to 'Prepare' that depend on a template parameter, so a declaration of 'Prepare' must be available
DspFilter.h: In member function 'virtual Dsp::Complex Dsp::ButterBandPass<pairs, channels>::GetPole(int)':
DspFilter.h:1832: error: there are no arguments to 'GetBandPassPole' that depend on a template parameter, so a declaration of 'GetBandPassPole' must be available
DspFilter.h: In member function 'virtual Dsp::Complex Dsp::ButterBandPass<pairs, channels>::GetZero(int)':
DspFilter.h:1838: error: there are no arguments to 'GetBandPassZero' that depend on a template parameter, so a declaration of 'GetBandPassZero' must be available
DspFilter.h: In member function 'Dsp::CalcT Dsp::ButterBandPass<pairs, channels>::PassbandHint()':
DspFilter.h:1844: error: 'm_wc' was not declared in this scope
DspFilter.h:1844: error: 'm_wc2' was not declared in this scope
DspFilter.h: In member function 'void Dsp::ButterBandStop<pairs, channels>::Setup(Dsp::CalcT, Dsp::CalcT)':
DspFilter.h:1873: error: 'm_n' was not declared in this scope
DspFilter.h:1875: error: 'm_wc2' was not declared in this scope
DspFilter.h:1876: error: 'm_wc' was not declared in this scope
DspFilter.h:1877: error: there are no arguments to 'Prepare' that depend on a template parameter, so a declaration of 'Prepare' must be available
DspFilter.h: In member function 'virtual Dsp::Complex Dsp::ButterBandStop<pairs, channels>::GetPole(int)':
DspFilter.h:1895: error: there are no arguments to 'GetBandStopPole' that depend on a template parameter, so a declaration of 'GetBandStopPole' must be available
DspFilter.h: In member function 'virtual Dsp::Complex Dsp::ButterBandStop<pairs, channels>::GetZero(int)':
DspFilter.h:1901: error: there are no arguments to 'GetBandStopZero' that depend on a template parameter, so a declaration of 'GetBandStopZero' must be available
DspFilter.h: In member function 'Dsp::CalcT Dsp::ButterBandStop<pairs, channels>::PassbandHint()':
DspFilter.h:1907: error: 'm_wc' was not declared in this scope
DspFilter.h:1907: error: 'm_wc2' was not declared in this scope
DspFilter.h: In constructor 'Dsp::Chebyshev1<poles, channels>::Chebyshev1()':
DspFilter.h:1950: error: 'm_hint' was not declared in this scope
DspFilter.h:1950: error: 'hintBrent' was not declared in this scope
DspFilter.h: In member function 'virtual void Dsp::Chebyshev1<poles, channels>::Setup(Dsp::CalcT, Dsp::CalcT)':
DspFilter.h:1956: error: 'm_n' was not declared in this scope
DspFilter.h:1957: error: 'm_wc' was not declared in this scope
DspFilter.h: In member function 'void Dsp::Chebyshev1<poles, channels>::SetupCommon(Dsp::CalcT)':
DspFilter.h:1965: error: there are no arguments to 'Prepare' that depend on a template parameter, so a declaration of 'Prepare' must be available
DspFilter.h: In member function 'virtual Dsp::Complex Dsp::Chebyshev1<poles, channels>::GetPole(int)':
DspFilter.h:1985: error: 'm_wc' was not declared in this scope
DspFilter.h: In member function 'virtual Dsp::Complex Dsp::Chebyshev1<poles, channels>::GetSPole(int, Dsp::CalcT)':
DspFilter.h:1997: error: 'm_n' was not declared in this scope
DspFilter.h: In constructor 'Dsp::Cheby1LowPass<poles, channels>::Cheby1LowPass()':
DspFilter.h:2029: error: 'm_sgn' was not declared in this scope
DspFilter.h:2030: error: 'm_hint' was not declared in this scope
DspFilter.h:2030: error: 'hintPassband' was not declared in this scope
DspFilter.h: In member function 'void Dsp::Cheby1LowPass<poles, channels>::Setup(Dsp::CalcT, Dsp::CalcT)':
DspFilter.h:2036: error: 'template<int poles, int channels> class Dsp::Chebyshev1' used without template parameters
DspFilter.h:2039: error: 'template<int stages, int channels> class Dsp::CascadeStages' used without template parameters
DspFilter.h:2039: error: there are no arguments to 'Normalize' that depend on a template parameter, so a declaration of 'Normalize' must be available
DspFilter.h: In constructor 'Dsp::Cheby1HighPass<poles, channels>::Cheby1HighPass()':
DspFilter.h:2068: error: 'm_sgn' was not declared in this scope
DspFilter.h:2069: error: 'm_hint' was not declared in this scope
DspFilter.h:2069: error: 'hintPassband' was not declared in this scope
DspFilter.h: In member function 'void Dsp::Cheby1HighPass<poles, channels>::Setup(Dsp::CalcT, Dsp::CalcT)':
DspFilter.h:2075: error: 'template<int poles, int channels> class Dsp::Chebyshev1' used without template parameters
DspFilter.h:2078: error: 'template<int stages, int channels> class Dsp::CascadeStages' used without template parameters
DspFilter.h:2078: error: there are no arguments to 'Normalize' that depend on a template parameter, so a declaration of 'Normalize' must be available
DspFilter.h: In constructor 'Dsp::Cheby1BandPass<pairs, channels>::Cheby1BandPass()':
DspFilter.h:2113: error: 'm_sgn' was not declared in this scope
DspFilter.h:2114: error: 'm_hint' was not declared in this scope
DspFilter.h:2114: error: 'hintBrent' was not declared in this scope
DspFilter.h: In member function 'void Dsp::Cheby1BandPass<pairs, channels>::Setup(Dsp::CalcT, Dsp::CalcT, Dsp::CalcT)':
DspFilter.h:2121: error: 'm_n' was not declared in this scope
DspFilter.h:2123: error: 'm_wc2' was not declared in this scope
DspFilter.h:2124: error: 'm_wc' was not declared in this scope
DspFilter.h:2125: error: there are no arguments to 'SetupCommon' that depend on a template parameter, so a declaration of 'SetupCommon' must be available
DspFilter.h: In member function 'Dsp::Complex Dsp::Cheby1BandPass<pairs, channels>::GetPole(int)':
DspFilter.h:2143: error: there are no arguments to 'GetBandPassPole' that depend on a template parameter, so a declaration of 'GetBandPassPole' must be available
DspFilter.h: In member function 'Dsp::Complex Dsp::Cheby1BandPass<pairs, channels>::GetZero(int)':
DspFilter.h:2149: error: there are no arguments to 'GetBandPassZero' that depend on a template parameter, so a declaration of 'GetBandPassZero' must be available
DspFilter.h: In member function 'void Dsp::Cheby1BandPass<pairs, channels>::BrentHint(Dsp::CalcT*, Dsp::CalcT*)':
DspFilter.h:2155: error: 'm_wc' was not declared in this scope
DspFilter.h:2155: error: 'm_wc2' was not declared in this scope
DspFilter.h: In member function 'Dsp::CalcT Dsp::Cheby1BandPass<pairs, channels>::PassbandHint()':
DspFilter.h:2166: error: 'm_wc' was not declared in this scope
DspFilter.h:2166: error: 'm_wc2' was not declared in this scope
DspFilter.h: In constructor 'Dsp::Cheby1BandStop<pairs, channels>::Cheby1BandStop()':
DspFilter.h:2195: error: 'm_sgn' was not declared in this scope
DspFilter.h:2196: error: 'm_hint' was not declared in this scope
DspFilter.h:2196: error: 'hintPassband' was not declared in this scope
DspFilter.h: In member function 'void Dsp::Cheby1BandStop<pairs, channels>::Setup(Dsp::CalcT, Dsp::CalcT, Dsp::CalcT)':
DspFilter.h:2202: error: 'm_n' was not declared in this scope
DspFilter.h:2204: error: 'm_wc2' was not declared in this scope
DspFilter.h:2205: error: 'm_wc' was not declared in this scope
DspFilter.h:2206: error: there are no arguments to 'SetupCommon' that depend on a template parameter, so a declaration of 'SetupCommon' must be available
DspFilter.h:2209: error: 'template<int stages, int channels> class Dsp::CascadeStages' used without template parameters
DspFilter.h:2209: error: there are no arguments to 'Normalize' that depend on a template parameter, so a declaration of 'Normalize' must be available
DspFilter.h: In member function 'Dsp::Complex Dsp::Cheby1BandStop<pairs, channels>::GetPole(int)':
DspFilter.h:2227: error: there are no arguments to 'GetBandStopPole' that depend on a template parameter, so a declaration of 'GetBandStopPole' must be available
DspFilter.h: In member function 'Dsp::Complex Dsp::Cheby1BandStop<pairs, channels>::GetZero(int)':
DspFilter.h:2233: error: there are no arguments to 'GetBandStopZero' that depend on a template parameter, so a declaration of 'GetBandStopZero' must be available
DspFilter.h: In member function 'void Dsp::Cheby1BandStop<pairs, channels>::BrentHint(Dsp::CalcT*, Dsp::CalcT*)':
DspFilter.h:2239: error: 'm_wc' was not declared in this scope
DspFilter.h:2239: error: 'm_wc2' was not declared in this scope
DspFilter.h: In member function 'Dsp::CalcT Dsp::Cheby1BandStop<pairs, channels>::PassbandHint()':
DspFilter.h:2254: error: 'm_wc' was not declared in this scope
DspFilter.h:2254: error: 'm_wc2' was not declared in this scope
DspFilter.h: In member function 'void Dsp::Chebyshev2<poles, channels>::Setup(Dsp::CalcT, Dsp::CalcT)':
DspFilter.h:2290: error: 'm_n' was not declared in this scope
DspFilter.h:2291: error: 'm_wc' was not declared in this scope
DspFilter.h: In member function 'void Dsp::Chebyshev2<poles, channels>::SetupCommon(Dsp::CalcT)':
DspFilter.h:2298: error: 'm_eps' was not declared in this scope
DspFilter.h:2299: error: 'm_n' was not declared in this scope
DspFilter.h:2300: error: 'm_hint' was not declared in this scope
DspFilter.h:2300: error: 'hintPassband' was not declared in this scope
DspFilter.h:2301: error: there are no arguments to 'Prepare' that depend on a template parameter, so a declaration of 'Prepare' must be available
DspFilter.h: In member function 'Dsp::Complex Dsp::Chebyshev2<poles, channels>::GetSPole(int, Dsp::CalcT)':
DspFilter.h:2319: error: 'template<int poles, int channels> class Dsp::Chebyshev1' used without template parameters
DspFilter.h: In member function 'Dsp::Complex Dsp::Chebyshev2<poles, channels>::GetChebyZero(int, Dsp::CalcT)':
DspFilter.h:2328: error: 'm_n' was not declared in this scope
DspFilter.h: In constructor 'Dsp::Cheby2LowPass<poles, channels>::Cheby2LowPass()':
DspFilter.h:2355: error: 'm_sgn' was not declared in this scope
DspFilter.h: In member function 'virtual Dsp::Complex Dsp::Cheby2LowPass<poles, channels>::GetZero(int)':
DspFilter.h:2361: error: 'm_wc' was not declared in this scope
DspFilter.h:2361: error: there are no arguments to 'GetChebyZero' that depend on a template parameter, so a declaration of 'GetChebyZero' must be available
DspFilter.h: In constructor 'Dsp::Cheby2HighPass<poles, channels>::Cheby2HighPass()':
DspFilter.h:2391: error: 'm_sgn' was not declared in this scope
DspFilter.h: In member function 'Dsp::Complex Dsp::Cheby2HighPass<poles, channels>::GetPole(int)':
DspFilter.h:2397: error: 'm_wc' was not declared in this scope
DspFilter.h:2397: error: there are no arguments to 'GetSPole' that depend on a template parameter, so a declaration of 'GetSPole' must be available
DspFilter.h:2398: error: there are no arguments to 'BilinearTransform' that depend on a template parameter, so a declaration of 'BilinearTransform' must be available
DspFilter.h: In member function 'Dsp::Complex Dsp::Cheby2HighPass<poles, channels>::GetZero(int)':
DspFilter.h:2405: error: 'm_wc' was not declared in this scope
DspFilter.h:2405: error: there are no arguments to 'GetChebyZero' that depend on a template parameter, so a declaration of 'GetChebyZero' must be available
DspFilter.h: In constructor 'Dsp::Cheby2BandPass<pairs, channels>::Cheby2BandPass()':
DspFilter.h:2439: error: 'm_sgn' was not declared in this scope
DspFilter.h: In member function 'void Dsp::Cheby2BandPass<pairs, channels>::Setup(Dsp::CalcT, Dsp::CalcT, Dsp::CalcT)':
DspFilter.h:2445: error: 'm_n' was not declared in this scope
DspFilter.h:2447: error: 'm_wc2' was not declared in this scope
DspFilter.h:2448: error: 'm_wc' was not declared in this scope
DspFilter.h:2449: error: there are no arguments to 'SetupCommon' that depend on a template parameter, so a declaration of 'SetupCommon' must be available
DspFilter.h: In member function 'Dsp::Complex Dsp::Cheby2BandPass<pairs, channels>::GetPole(int)':
DspFilter.h:2467: error: there are no arguments to 'GetBandPassPole' that depend on a template parameter, so a declaration of 'GetBandPassPole' must be available
DspFilter.h: In member function 'Dsp::Complex Dsp::Cheby2BandPass<pairs, channels>::GetZero(int)':
DspFilter.h:2473: error: there are no arguments to 'GetChebyZero' that depend on a template parameter, so a declaration of 'GetChebyZero' must be available
DspFilter.h:2474: error: there are no arguments to 'BandPassTransform' that depend on a template parameter, so a declaration of 'BandPassTransform' must be available
DspFilter.h: In member function 'Dsp::CalcT Dsp::Cheby2BandPass<pairs, channels>::PassbandHint()':
DspFilter.h:2480: error: 'm_wc' was not declared in this scope
DspFilter.h:2480: error: 'm_wc2' was not declared in this scope
DspFilter.h: In constructor 'Dsp::Cheby2BandStop<pairs, channels>::Cheby2BandStop()':
DspFilter.h:2508: error: 'm_sgn' was not declared in this scope
DspFilter.h: In member function 'void Dsp::Cheby2BandStop<pairs, channels>::Setup(Dsp::CalcT, Dsp::CalcT, Dsp::CalcT)':
DspFilter.h:2514: error: 'm_n' was not declared in this scope
DspFilter.h:2516: error: 'm_wc2' was not declared in this scope
DspFilter.h:2517: error: 'm_wc' was not declared in this scope
DspFilter.h:2518: error: there are no arguments to 'SetupCommon' that depend on a template parameter, so a declaration of 'SetupCommon' must be available
DspFilter.h: In member function 'Dsp::Complex Dsp::Cheby2BandStop<pairs, channels>::GetPole(int)':
DspFilter.h:2536: error: there are no arguments to 'GetBandStopPole' that depend on a template parameter, so a declaration of 'GetBandStopPole' must be available
DspFilter.h: In member function 'Dsp::Complex Dsp::Cheby2BandStop<pairs, channels>::GetZero(int)':
DspFilter.h:2542: error: there are no arguments to 'GetChebyZero' that depend on a template parameter, so a declaration of 'GetChebyZero' must be available
DspFilter.h:2543: error: there are no arguments to 'BandStopTransform' that depend on a template parameter, so a declaration of 'BandStopTransform' must be available
DspFilter.h: In member function 'Dsp::CalcT Dsp::Cheby2BandStop<pairs, channels>::PassbandHint()':
DspFilter.h:2549: error: 'm_wc' was not declared in this scope
DspFilter.h:2549: error: 'm_wc2' was not declared in this scope
DspFilter.h: In constructor 'Dsp::Elliptic<poles, channels>::Elliptic()':
DspFilter.h:2629: error: 'm_hint' was not declared in this scope
DspFilter.h:2629: error: 'hintPassband' was not declared in this scope
DspFilter.h: In member function 'void Dsp::Elliptic<poles, channels>::SetupElliptic(Dsp::CalcT, Dsp::CalcT, Dsp::CalcT)':
DspFilter.h:2641: error: 'm_n' was not declared in this scope
DspFilter.h: In member function 'virtual Dsp::Complex Dsp::Elliptic<poles, channels>::GetPole(int)':
DspFilter.h:2711: error: 'm_wc' was not declared in this scope
DspFilter.h: In member function 'virtual Dsp::Complex Dsp::Elliptic<poles, channels>::GetEllipticZero(int, Dsp::CalcT)':
DspFilter.h:2907: error: there are no arguments to 'BilinearTransform' that depend on a template parameter, so a declaration of 'BilinearTransform' must be available
DspFilter.h: In member function 'void Dsp::EllipticLowPass<poles, channels>::Setup(Dsp::CalcT, Dsp::CalcT, Dsp::CalcT)':
DspFilter.h:2929: error: there are no arguments to 'SetupElliptic' that depend on a template parameter, so a declaration of 'SetupElliptic' must be available
DspFilter.h:2930: error: 'm_n' was not declared in this scope
DspFilter.h:2931: error: 'm_wc' was not declared in this scope
DspFilter.h:2932: error: there are no arguments to 'Prepare' that depend on a template parameter, so a declaration of 'Prepare' must be available
DspFilter.h:2934: error: 'template<int stages, int channels> class Dsp::CascadeStages' used without template parameters
DspFilter.h:2934: error: there are no arguments to 'Normalize' that depend on a template parameter, so a declaration of 'Normalize' must be available
DspFilter.h: In member function 'virtual Dsp::Complex Dsp::EllipticLowPass<poles, channels>::GetZero(int)':
DspFilter.h:2940: error: 'm_wc' was not declared in this scope
DspFilter.h:2940: error: there are no arguments to 'GetEllipticZero' that depend on a template parameter, so a declaration of 'GetEllipticZero' must be available
DspFilter.h: In member function 'void Dsp::EllipticHighPass<poles, channels>::Setup(Dsp::CalcT, Dsp::CalcT, Dsp::CalcT)':
DspFilter.h:2969: error: there are no arguments to 'SetupElliptic' that depend on a template parameter, so a declaration of 'SetupElliptic' must be available
DspFilter.h:2970: error: 'm_n' was not declared in this scope
DspFilter.h:2971: error: 'm_wc' was not declared in this scope
DspFilter.h:2972: error: there are no arguments to 'Prepare' that depend on a template parameter, so a declaration of 'Prepare' must be available
DspFilter.h:2974: error: 'template<int stages, int channels> class Dsp::CascadeStages' used without template parameters
DspFilter.h:2974: error: there are no arguments to 'Normalize' that depend on a template parameter, so a declaration of 'Normalize' must be available
DspFilter.h: In member function 'virtual Dsp::Complex Dsp::EllipticHighPass<poles, channels>::GetPole(int)':
DspFilter.h:2980: error: 'm_wc' was not declared in this scope
DspFilter.h:2980: error: there are no arguments to 'GetSPole' that depend on a template parameter, so a declaration of 'GetSPole' must be available
DspFilter.h: In member function 'virtual Dsp::Complex Dsp::EllipticHighPass<poles, channels>::GetZero(int)':
DspFilter.h:2986: error: 'm_wc' was not declared in this scope
DspFilter.h:2986: error: there are no arguments to 'GetEllipticZero' that depend on a template parameter, so a declaration of 'GetEllipticZero' must be available
DspFilter.h: In member function 'void Dsp::EllipticBandPass<pairs, channels>::Setup(Dsp::CalcT, Dsp::CalcT, Dsp::CalcT, Dsp::CalcT)':
DspFilter.h:3019: error: 'm_n' was not declared in this scope
DspFilter.h:3020: error: there are no arguments to 'SetupElliptic' that depend on a template parameter, so a declaration of 'SetupElliptic' must be available
DspFilter.h:3023: error: 'm_wc2' was not declared in this scope
DspFilter.h:3024: error: 'm_wc' was not declared in this scope
DspFilter.h:3025: error: 'm_hint' was not declared in this scope
DspFilter.h:3025: error: 'hintBrent' was not declared in this scope
DspFilter.h:3026: error: there are no arguments to 'Prepare' that depend on a template parameter, so a declaration of 'Prepare' must be available
DspFilter.h: In member function 'virtual Dsp::Complex Dsp::EllipticBandPass<pairs, channels>::GetPole(int)':
DspFilter.h:3046: error: there are no arguments to 'GetBandPassPole' that depend on a template parameter, so a declaration of 'GetBandPassPole' must be available
DspFilter.h: In member function 'virtual Dsp::Complex Dsp::EllipticBandPass<pairs, channels>::GetZero(int)':
DspFilter.h:3052: error: there are no arguments to 'GetEllipticZero' that depend on a template parameter, so a declaration of 'GetEllipticZero' must be available
DspFilter.h: In member function 'void Dsp::EllipticBandPass<pairs, channels>::BrentHint(Dsp::CalcT*, Dsp::CalcT*)':
DspFilter.h:3058: error: 'm_wc' was not declared in this scope
DspFilter.h:3058: error: 'm_wc2' was not declared in this scope
DspFilter.h: In member function 'Dsp::CalcT Dsp::EllipticBandPass<pairs, channels>::PassbandHint()':
DspFilter.h:3067: error: 'm_wc' was not declared in this scope
DspFilter.h:3067: error: 'm_wc2' was not declared in this scope
DspFilter.h: In member function 'void Dsp::EllipticBandStop<pairs, channels>::Setup(Dsp::CalcT, Dsp::CalcT, Dsp::CalcT, Dsp::CalcT)':
DspFilter.h:3094: error: 'm_n' was not declared in this scope
DspFilter.h:3095: error: there are no arguments to 'SetupElliptic' that depend on a template parameter, so a declaration of 'SetupElliptic' must be available
DspFilter.h:3098: error: 'm_wc2' was not declared in this scope
DspFilter.h:3099: error: 'm_wc' was not declared in this scope
DspFilter.h:3100: error: 'm_hint' was not declared in this scope
DspFilter.h:3100: error: 'hintPassband' was not declared in this scope
DspFilter.h:3101: error: there are no arguments to 'Prepare' that depend on a template parameter, so a declaration of 'Prepare' must be available
DspFilter.h:3102: error: 'template<int stages, int channels> class Dsp::CascadeStages' used without template parameters
DspFilter.h:3102: error: there are no arguments to 'Normalize' that depend on a template parameter, so a declaration of 'Normalize' must be available
DspFilter.h: In member function 'virtual Dsp::Complex Dsp::EllipticBandStop<pairs, channels>::GetPole(int)':
DspFilter.h:3120: error: there are no arguments to 'GetBandStopPole' that depend on a template parameter, so a declaration of 'GetBandStopPole' must be available
DspFilter.h: In member function 'virtual Dsp::Complex Dsp::EllipticBandStop<pairs, channels>::GetZero(int)':
DspFilter.h:3126: error: there are no arguments to 'GetEllipticZero' that depend on a template parameter, so a declaration of 'GetEllipticZero' must be available
DspFilter.h: In member function 'void Dsp::EllipticBandStop<pairs, channels>::BrentHint(Dsp::CalcT*, Dsp::CalcT*)':
DspFilter.h:3132: error: 'm_wc' was not declared in this scope
DspFilter.h:3132: error: 'm_wc2' was not declared in this scope
DspFilter.h: In member function 'Dsp::CalcT Dsp::EllipticBandStop<pairs, channels>::PassbandHint()':
DspFilter.h:3147: error: 'm_wc' was not declared in this scope
DspFilter.h:3147: error: 'm_wc2' was not declared in this scope
DspFilter.h: In member function 'void Dsp::PoleFilter<stages, channels>::Normalize() [with int stages = 3, int channels = 2]':
DspFilter.h:1642:   instantiated from 'void Dsp::PoleFilter<stages, channels>::Prepare() [with int stages = 3, int channels = 2]'
DspFilter.h:1700:   instantiated from 'void Dsp::Butterworth<poles, channels>::Setup(Dsp::CalcT) [with int poles = 5, int channels = 2]'
DspFilter.h:3597:   instantiated from here
DspFilter.h:1581: error: 'f' was not declared in this scope
DspFilter.h:1582: error: no matching function for call to 'Dsp::PoleFilter<3, 2>::Normalize(Dsp::CalcT)'
DspFilter.h:1570: note: candidates are: void Dsp::PoleFilter<stages, channels>::Normalize() [with int stages = 3, int channels = 2]
DspFilter.h:1642:   instantiated from 'void Dsp::PoleFilter<stages, channels>::Prepare() [with int stages = 3, int channels = 2]'
DspFilter.h:1700:   instantiated from 'void Dsp::Butterworth<poles, channels>::Setup(Dsp::CalcT) [with int poles = 5, int channels = 2]'
DspFilter.h:3597:   instantiated from here
DspFilter.h:1592: error: no matching function for call to 'Dsp::PoleFilter<3, 2>::Normalize(Dsp::CalcT)'
DspFilter.h:1570: note: candidates are: void Dsp::PoleFilter<stages, channels>::Normalize() [with int stages = 3, int channels = 2]
DspFilter.h: In member function 'void Dsp::PoleFilter<stages, channels>::Normalize() [with int stages = 1, int channels = 1]':
DspFilter.h:1642:   instantiated from 'void Dsp::PoleFilter<stages, channels>::Prepare() [with int stages = 1, int channels = 1]'
DspFilter.h:1700:   instantiated from 'void Dsp::Butterworth<poles, channels>::Setup(Dsp::CalcT) [with int poles = 2, int channels = 1]'
DspFilter.h:3663:   instantiated from here
DspFilter.h:1581: error: 'f' was not declared in this scope
DspFilter.h:1582: error: no matching function for call to 'Dsp::PoleFilter<1, 1>::Normalize(Dsp::CalcT)'
DspFilter.h:1570: note: candidates are: void Dsp::PoleFilter<stages, channels>::Normalize() [with int stages = 1, int channels = 1]
DspFilter.h:1642:   instantiated from 'void Dsp::PoleFilter<stages, channels>::Prepare() [with int stages = 1, int channels = 1]'
DspFilter.h:1700:   instantiated from 'void Dsp::Butterworth<poles, channels>::Setup(Dsp::CalcT) [with int poles = 2, int channels = 1]'
DspFilter.h:3663:   instantiated from here
DspFilter.h:1592: error: no matching function for call to 'Dsp::PoleFilter<1, 1>::Normalize(Dsp::CalcT)'
DspFilter.h:1570: note: candidates are: void Dsp::PoleFilter<stages, channels>::Normalize() [with int stages = 1, int channels = 1]
DspFilter.h: In member function 'void Dsp::PoleFilter<stages, channels>::Normalize() [with int stages = 4, int channels = 1]':
DspFilter.h:1642:   instantiated from 'void Dsp::PoleFilter<stages, channels>::Prepare() [with int stages = 4, int channels = 1]'
DspFilter.h:1965:   instantiated from 'void Dsp::Chebyshev1<poles, channels>::SetupCommon(Dsp::CalcT) [with int poles = 8, int channels = 1]'
DspFilter.h:2125:   instantiated from 'void Dsp::Cheby1BandPass<pairs, channels>::Setup(Dsp::CalcT, Dsp::CalcT, Dsp::CalcT) [with int pairs = 4, int channels = 1]'
DspFilter.h:3630:   instantiated from here
DspFilter.h:1581: error: 'f' was not declared in this scope
DspFilter.h:1582: error: no matching function for call to 'Dsp::PoleFilter<4, 1>::Normalize(Dsp::CalcT)'
DspFilter.h:1570: note: candidates are: void Dsp::PoleFilter<stages, channels>::Normalize() [with int stages = 4, int channels = 1]
DspFilter.h:1642:   instantiated from 'void Dsp::PoleFilter<stages, channels>::Prepare() [with int stages = 4, int channels = 1]'
DspFilter.h:1965:   instantiated from 'void Dsp::Chebyshev1<poles, channels>::SetupCommon(Dsp::CalcT) [with int poles = 8, int channels = 1]'
DspFilter.h:2125:   instantiated from 'void Dsp::Cheby1BandPass<pairs, channels>::Setup(Dsp::CalcT, Dsp::CalcT, Dsp::CalcT) [with int pairs = 4, int channels = 1]'
DspFilter.h:3630:   instantiated from here
DspFilter.h:1592: error: no matching function for call to 'Dsp::PoleFilter<4, 1>::Normalize(Dsp::CalcT)'
DspFilter.h:1570: note: candidates are: void Dsp::PoleFilter<stages, channels>::Normalize() [with int stages = 4, int channels = 1]
DspFilter.h: In member function 'void Dsp::PoleFilter<stages, channels>::Normalize() [with int stages = 2, int channels = 1]':
DspFilter.h:1642:   instantiated from 'void Dsp::PoleFilter<stages, channels>::Prepare() [with int stages = 2, int channels = 1]'
DspFilter.h:2301:   instantiated from 'void Dsp::Chebyshev2<poles, channels>::SetupCommon(Dsp::CalcT) [with int poles = 4, int channels = 1]'
DspFilter.h:2518:   instantiated from 'void Dsp::Cheby2BandStop<pairs, channels>::Setup(Dsp::CalcT, Dsp::CalcT, Dsp::CalcT) [with int pairs = 2, int channels = 1]'
DspFilter.h:3648:   instantiated from here
DspFilter.h:1581: error: 'f' was not declared in this scope
DspFilter.h:1582: error: no matching function for call to 'Dsp::PoleFilter<2, 1>::Normalize(Dsp::CalcT)'
DspFilter.h:1570: note: candidates are: void Dsp::PoleFilter<stages, channels>::Normalize() [with int stages = 2, int channels = 1]
DspFilter.h:1642:   instantiated from 'void Dsp::PoleFilter<stages, channels>::Prepare() [with int stages = 2, int channels = 1]'
DspFilter.h:2301:   instantiated from 'void Dsp::Chebyshev2<poles, channels>::SetupCommon(Dsp::CalcT) [with int poles = 4, int channels = 1]'
DspFilter.h:2518:   instantiated from 'void Dsp::Cheby2BandStop<pairs, channels>::Setup(Dsp::CalcT, Dsp::CalcT, Dsp::CalcT) [with int pairs = 2, int channels = 1]'
DspFilter.h:3648:   instantiated from here
DspFilter.h:1592: error: no matching function for call to 'Dsp::PoleFilter<2, 1>::Normalize(Dsp::CalcT)'
DspFilter.h:1570: note: candidates are: void Dsp::PoleFilter<stages, channels>::Normalize() [with int stages = 2, int channels = 1]

Post

Dude, YES, use the GCC compatible code I linked above!

Post

asomers wrote:Dude, YES, use the GCC compatible code I linked above!
Now that I understand what the heck is going on, I am doing a TOTAL rewrite of the entire library. The current interface of virtual functions, and state variables (like m_wc, m_n, m_wc2, etc...) is bulky and cumbersome. It also makes certain types of optimizations impossible. I was going to put off this rewrite for a little while but now that I see these errors in the gcc build, I am just going to do it now. If I incorporate your fixes they will only be temporary anyway.

This rewrite takes a different approach to the use of templates. First there is a lot less use of the templates. Second, I am not going to build a hierachy with templates at each level. Third, it will use a functional programming style with no side effects (I will eliminate the m_wc, m_n, variables COMPLETELY, even the hint for brent and passband, this is better than just band-aiding it).

Here's an example of the style I am using:

Code: Select all

	template<int maxorder>
	struct ButterLp : CascadeStore<maxorder>
	{
		void Setup( const Spec &s )
		{
			assert( s.order<=maxorder );
			// analog prototype
			Butter proto;
			// storage for the roots
			LayoutStore<Butter::CountRoots(maxorder)> l;
			// design the prototype
			proto.Design( s, &l );
			// low-pass digital realization
			LowPass t;
			t.Realize( s, &l );
			// build the cascade
			l.Build( this );
		}
	};
There is no hierarchy of templates. The templates are being pushed down into the most derived level. Templatized classes are passed as return value parameters to functional operations that leave behind no side effects.

As I develop this rewrite I will be sure to keep it compiling and functional under gcc at all times.

Its going to take a few days though, I'm working as hard as I can!!

Post

Oh yeah, and along the way this new interface is going to allow for a wealth of additional features:

- Fine-grained class hierarchy allowing more re-use, and doing more in fewer lines

- Faster calculation of the poles and zeroes when modulating filter parameters

- Elimination of the redundant pole/zero computation (the ones with a negative imaginary component)

- More flexibility in the specification of design parameters

- The ability to have a single runtime instance of the filter support a dynamic order (up to a max).

- Reduction in the proliferation of trivial template instantiations due to bad design

- Optimized recalculation of changes to parameter subsets

- Option to discard intermediate calculations to save space for filters whose parameters are never changed

- Better support for other build environments

Post

That's great news. After working with the code for a day I realized some hinderances. I wanted to create an interface though which I could specify the filter type and order. I would think the most straightforward way is a polymorphic filter class that does not use templates for the filter order. Maybe templates could still be useful for precision. i.e.

Code: Select all

DspFilter<float>* filter;  // abstract class
...
filter = new ButterLowPass<float>(order, channels);
...
filter->Process(nFrames, interleavedBuffer);
...
delete filter;
filter = new BiquadHighPass<float>(channels);
...
filter->Process(nFrames, interleavedBuffer);
... etc.
Bottom line, I hope this is being developed to operate in real-time, i.e. not only can the filter settings vary in real time but the filter type and order can be changed with relative ease, as well.

But regardless, thanks again for this making this open source. I think you've contributed in a huge way to setting a precedent for free software, as well as to audio dsp pedagogy.

Post

asomers wrote:Bottom line, I hope this is being developed to operate in real-time, i.e. not only can the filter settings vary in real time but the filter type and order can be changed with relative ease, as well.
Already one step ahead of you. Order is now a run-time parameter. It still uses templates, but the template parameter specifies the maximum order for which storage will be available. When the filter is set up you can choose the order at runtime from 1..max. I'm going to do the same thing for channels. Separating out the array storage for state from the interface is what allows me to get rid of templates from the base classes.

I didn't think about polymorphism with respect to varying filter types but I will keep an eye out for it and factor as much as I can to make it possible. Don't expect to change filter types on an existing object just by specifying an enumeration though. Of course you can build a wrapper class that does so ( but it will be messy ).
But regardless, thanks again for this making this open source. I think you've contributed in a huge way to setting a precedent for free software, as well as to audio dsp pedagogy.
Thanks! I thrive on praise, and setting a precedent was the goal.

Post

I have a new version of the file but I am getting frustrated to hell with SourceForge, it won't let me upload a new file with the same name...

Post

Okay, I *think* I got SourceForge updated.

There is a new version of DspFilter.h up (0.8.3). I must warn you it is in extremely rough condition, I rewrote almost everything. A lot of filters are missing, because I am still adjusting the class hierarchy and some of the formulas.

The testing function is commented out since filters are missing.

However, it should compile perfectly on the Macintosh without modification.

The following filters should work:

ButterLowPass
ButterHighPass
ButterBandPass

plus, all the Biquads.

If you want to try a different filter it should be fairly easy to add the missing class by following the example given in the ones that work (like ButterLowPass). The reason I have not done this for all the filter types is because it is mostly busy work, and I will certainly change the class interfaces in the next couple of days to make it all neat. When I have finished redesigning the hiearchy I will do the busy work and put all the filters back.

In the meanwhile, if anyone wants to provide comments and/or constructive criticisms on the new design of classes that would be great. As you can see, I have generalized the formation of high pass, band pass, and band stop filters from their corresponding low pass analog prototype (however, it is failing for chebyshev type II).

Post

I'm trying to move towards a generic functional style, like this:

Code: Select all

template<class Prototype, class Family, int order, int channels>
struct Filter : Cascade<order, channels>
{
	void Setup( Specification &spec )
	{
		Prototype proto;
		Layout layout;
		proto.Design( spec, &layout );
		Family t;
		t.Transform( spec, &layout );
		Realize( layout );
	}
}

Where Prototype is Butter, ChebyI, ChebyI, Elliptic, Bessel, and Family is LowPass, HighPass, BandPass, BandStop, LowShelf, HighShelf, or BandEq.

Post

hi

i tryed one more time to implement the DSPFilter.h.
now my compiler gets some errors like this:

Code: Select all

1>d:\dokumente\c++\ueb\c++\antialias\src\dspcomponents\dspfilter.h(1194) : error C2784: "_Ty std::abs(const std::complex<_Ty> &)": template-Argument für "const std::complex<_Ty> &" konnte nicht von "double" hergeleitet werden.
1>        c:\program files\microsoft platform sdk\include\crt\xcomplex(141): Siehe Deklaration von 'std::abs'
1>d:\dokumente\c++\ueb\c++\antialias\src\dspcomponents\dspfilter.h(1207) : error C2784: "_Ty std::abs(const std::complex<_Ty> &)": template-Argument für "const std::complex<_Ty> &" konnte nicht von "double" hergeleitet werden.
1>        c:\program files\microsoft platform sdk\include\crt\xcomplex(141): Siehe Deklaration von 'std::abs'
1>d:\dokumente\c++\ueb\c++\antialias\src\dspcomponents\dspfilter.h(2052) : error C2784: "std::complex<_Ty> std::pow(const _Ty &,const std::complex<_Ty> &)": template-Argument für "const std::complex<_Ty> &" konnte nicht von "const Dsp::CalcT" hergeleitet werden.
1>        c:\program files\microsoft platform sdk\include\crt\xcomplex(231): Siehe Deklaration von 'std::pow'
1>d:\dokumente\c++\ueb\c++\antialias\src\dspcomponents\dspfilter.h(2052) : error C2784: "std::complex<_Ty> std::pow(const std::complex<_Ty> &,int)": template-Argument für "const std::complex<_Ty> &" konnte nicht von "double" hergeleitet werden.
1>        c:\program files\microsoft platform sdk\include\crt\xcomplex(225): Siehe Deklaration von 'std::pow'
1>d:\dokumente\c++\ueb\c++\antialias\src\dspcomponents\dspfilter.h(2052) : error C2784: "std::complex<_Ty> std::pow(const std::complex<_Ty> &,const _Ty &)": template-Argument für "const std::complex<_Ty> &" konnte nicht von "double" hergeleitet werden.
1>        c:\program files\microsoft platform sdk\include\crt\xcomplex(219): Siehe Deklaration von 'std::pow'
1>d:\dokumente\c++\ueb\c++\antialias\src\dspcomponents\dspfilter.h(2052) : error C2784: "std::complex<_Ty> std::pow(const std::complex<_Ty> &,const std::complex<_Ty> &)": template-Argument für "const std::complex<_Ty> &" konnte nicht von "double" hergeleitet werden.
1>        c:\program files\microsoft platform sdk\include\crt\xcomplex(210): Siehe Deklaration von 'std::pow'
1>d:\dokumente\c++\ueb\c++\antialias\src\dspcomponents\dspfilter.h(2391) : error C2784: "std::complex<_Ty> std::exp(const std::complex<_Ty> &)": template-Argument für "const std::complex<_Ty> &" konnte nicht von "const Dsp::CalcT" hergeleitet werden.
1>        c:\program files\microsoft platform sdk\include\crt\xcomplex(171): Siehe Deklaration von 'std::exp'
1>d:\dokumente\c++\ueb\c++\antialias\src\dspcomponents\dspfilter.h(2397) : error C2784: "std::complex<_Ty> std::sqrt(const std::complex<_Ty> &)": template-Argument für "const std::complex<_Ty> &" konnte nicht von "Dsp::CalcT" hergeleitet werden.
1>        c:\program files\microsoft platform sdk\include\crt\xcomplex(250): Siehe Deklaration von 'std::sqrt'
1>d:\dokumente\c++\ueb\c++\antialias\src\dspcomponents\dspfilter.h(2411) : error C2666: 'pow': 7 Überladungen haben ähnliche Konvertierungen
1>        c:\program files\microsoft platform sdk\include\crt\math.h(564): kann 'long double pow(long double,int)' sein
1>        c:\program files\microsoft platform sdk\include\crt\math.h(562): oder "long double pow(long double,long double)"
1>        c:\program files\microsoft platform sdk\include\crt\math.h(516): oder "float pow(float,int)"
1>        c:\program files\microsoft platform sdk\include\crt\math.h(514): oder "float pow(float,float)"
1>        c:\program files\microsoft platform sdk\include\crt\math.h(478): oder "double pow(int,int)"
1>        c:\program files\microsoft platform sdk\include\crt\math.h(476): oder "double pow(double,int)"
1>        c:\program files\microsoft platform sdk\include\crt\math.h(174): oder "double pow(double,double)"
1>        bei Anpassung der Argumentliste '(int, const Dsp::CalcT)'
1>d:\dokumente\c++\ueb\c++\antialias\src\dspcomponents\dspfilter.h(2477) : error C2784: "std::complex<_Ty> std::sqrt(const std::complex<_Ty> &)": template-Argument für "const std::complex<_Ty> &" konnte nicht von "double" hergeleitet werden.
1>        c:\program files\microsoft platform sdk\include\crt\xcomplex(250): Siehe Deklaration von 'std::sqrt'
1>d:\dokumente\c++\ueb\c++\antialias\src\dspcomponents\dspfilter.h(2487) : error C2784: "std::complex<_Ty> std::sqrt(const std::complex<_Ty> &)": template-Argument für "const std::complex<_Ty> &" konnte nicht von "Dsp::CalcT" hergeleitet werden.
1>        c:\program files\microsoft platform sdk\include\crt\xcomplex(250): Siehe Deklaration von 'std::sqrt'
1>d:\dokumente\c++\ueb\c++\antialias\src\dspcomponents\dspfilter.h(2506) : error C2784: "std::complex<_Ty> std::sqrt(const std::complex<_Ty> &)": template-Argument für "const std::complex<_Ty> &" konnte nicht von "double" hergeleitet werden.
anyone has any plan what's wrong here? is it maybe something about the version of the platform sdk (guess i have the newest)?? or it's setup? i setted up my msvc express for the juce framework..

cheers pascal

Post Reply

Return to “DSP and Plugin Development”