Commits

Aleksey Kunitskiy  committed 367c099

Remove depracated files

  • Participants
  • Parent commits 3e4e391

Comments (0)

Files changed (1)

File src/jackpipe_test.cpp

-#include <iostream>
-#include <fstream>
-
-#include "Window.h"
-#include "SineGenerator.h"
-#include "FftAnalizer.h"
-
-#include <cpptest.h>
-
-#include "fftw3.h"
-
-#define SG_RAPAMS_RESTORE 0
-
-using namespace JackPipe;
-
-typedef double T;
-
-int main(){
-
-  SineGenerator<T>::SineGeneratorParams p;
-  
-  unsigned int nblocks = 10;
-
-#if SG_RAPAMS_RESTORE == 1
-  std::ifstream params_file("sinegenerator_params.dat", std::ios::in | std::ios::binary);
-  params_file.read(reinterpret_cast<char*>(&p), sizeof(p));
-  params_file.close();
-  SineGenerator<T> sg(p);
-  nblocks = p.u_nblocks;
-
-  std::cout << "Params:" << std::endl;
-  std::cout << "f_base = " << p.f_base << std::endl;
-  std::cout << "f_upperlimit = " << p.f_upperlimit << std::endl;
-  std::cout << "l_srand = " << p.l_srand << std::endl;
-  std::cout << "f_samplefreq = " << p.f_samplefreq << std::endl;
-  std::cout << "c_normfactor = " << p.c_normfactor << std::endl;
-  std::cout << "u_nblocks = " << p.u_nblocks << std::endl;
-  std::cout << "window_type = " << Window<T>::getDescription(p.window_type) << std::endl;
-#elif SG_RAPAMS_RESTORE == 0
-  SineGenerator<T> sg(20.0, 24000.0, 48000.0, nblocks, Window<T>::WINDOW_RECT);
-  sg.save(p);
-  std::cout << "Params:" << std::endl;
-  std::cout << "f_base = " << p.f_base << std::endl;
-  std::cout << "f_upperlimit = " << p.f_upperlimit << std::endl;
-  std::cout << "l_srand = " << p.l_srand << std::endl;
-  std::cout << "f_samplefreq = " << p.f_samplefreq << std::endl;
-  std::cout << "c_normfactor = " << p.c_normfactor << std::endl;
-  std::cout << "u_nblocks = " << p.u_nblocks << std::endl;
-  std::ofstream params_file("sinegenerator_params.dat", std::ios::out | std::ios::binary);
-  params_file.write(reinterpret_cast<char*>(&p), sizeof(p));
-  params_file.close();
-#endif
-
-  std::vector<T> b;
-  std::vector<T> c(10500, 0.0);
-  sg.fillBuffer(b);
-  std::cout << "b.size() = " << b.size() << std::endl;
-  unsigned int s = b.size();
-  b.insert(b.begin(), c.begin(), c.end());
-  b.insert(b.end(), c.begin(), c.end());
-  FftAnalizer<T> a(p.f_base, p.f_samplefreq, sg.getNormFactor() / sg.getWindowDensityFactor(), s, b);
-  a.analize();
-
-  return 0;
-}
-
-// vim:set ts=2 sw=2 expandtab tw=78: