41 using namespace Nsound;
48 static const char *
THIS_FILE =
"FilterDelay_UnitTest.cc";
67 cout <<
TEST_HEADER <<
"Testing FilterDelay::filter(input) ...";
76 gold <<
"gold/FilterDelay_out1.wav";
83 <<
"Output did not match gold file!"
86 diff.
plot(
"data - gold");
96 data = f.
filter(input, 0.666);
108 <<
"Output did not match gold file!"
111 diff.
plot(
"data - gold");
125 input << 1.0 << 0.0 << 0.0 << 0.0 << 0.0
126 << 0.0 << 0.0 << 0.0 << 0.0 << 0.0;
128 data = f2.
filter(input, 60.0);
140 <<
"Output did not match gold file!"
143 diff.
plot(
"data - gold");
static void show()
Acutally draw the plots to the screen.
static const char * THIS_FILE
AudioStream filter(const AudioStream &x)
float64 getMax() const
Returns the maximum sample value in the Audiostream.
Buffer silence(const float64 &duration) const
This method generates silence.
#define TEST_ERROR_HEADER
void plot(const std::string &title="AudioStream") const
virtual float64 generate(const float64 &frequency)
This is a real-time method for the wavetable oscillator.
A class for filtering audio in the frequecy domain.
static const float64 GAMMA
static void setDefaultSampleSize(uint32 size)
AudioStream getAbs() const
Modifies the AudioStream by making any negative value positive.
void FilterDelay_UnitTest()