Skip to content
Snippets Groups Projects
Commit ef1ec3cd authored by Joseph Larralde's avatar Joseph Larralde
Browse files

minor changes to rapidPiPoTools test

parent 9871e7d7
Branches
Tags
No related merge requests found
...@@ -15,11 +15,9 @@ ...@@ -15,11 +15,9 @@
#include "catch.hpp" #include "catch.hpp"
#include "signalProcessing.h" #include "signalProcessing.h"
#define MAX_PATH_SIZE 256 //#define MAX_PATH_SIZE 256
//static //=============================== ONSEG TEST =================================//
//================================== GMM =====================================//
SCENARIO("Test rapidPiPoHost", "[signalProcessing]") SCENARIO("Test rapidPiPoHost", "[signalProcessing]")
{ {
...@@ -41,7 +39,7 @@ SCENARIO("Test rapidPiPoHost", "[signalProcessing]") ...@@ -41,7 +39,7 @@ SCENARIO("Test rapidPiPoHost", "[signalProcessing]")
//====================================================================// //====================================================================//
// instantiate PiPo related classes here : // instantiate PiPo related classes here :
rapidPiPoHost host; // -> this class is located in rapidPiPoTools rapidmix::pipoHost host; // -> this class is located in rapidPiPoTools
// if we want to add some custom PiPos to our collection : // if we want to add some custom PiPos to our collection :
// #include "myCustomPiPo.h" // #include "myCustomPiPo.h"
...@@ -49,7 +47,7 @@ SCENARIO("Test rapidPiPoHost", "[signalProcessing]") ...@@ -49,7 +47,7 @@ SCENARIO("Test rapidPiPoHost", "[signalProcessing]")
// now we can write : // now we can write :
// pipoHost.setChain("myCustomPiPo"); // pipoHost.setChain("myCustomPiPo");
//#include "PiPoMaximChroma.h" // #include "PiPoMaximChroma.h"
// this one is not part of the default collection : // this one is not part of the default collection :
// PiPoCollection::addToCollection("chroma", new PiPoCreator<PiPoMaximChroma>); // PiPoCollection::addToCollection("chroma", new PiPoCreator<PiPoMaximChroma>);
...@@ -75,12 +73,26 @@ SCENARIO("Test rapidPiPoHost", "[signalProcessing]") ...@@ -75,12 +73,26 @@ SCENARIO("Test rapidPiPoHost", "[signalProcessing]")
host.setAttr("onseg.threshold", 9.); host.setAttr("onseg.threshold", 9.);
host.setAttr("onseg.offthresh", -120.); host.setAttr("onseg.offthresh", -120.);
std::cout << "onseg threshold : ";
std::cout << host.getDoubleAttr("onseg.threshold") << std::endl;
std::cout << "fft mode : ";
std::cout << host.getEnumAttr("fft.mode") << std::endl;
std::cout << "param names : " << std::endl;
std::vector<std::string> attrs = host.getAttrNames();
for (int i = 0; i < attrs.size(); ++i)
{
std::cout << "- " << attrs[i] << std::endl;
}
std::cout << host.getJSON() << std::endl;
// set another chain : // set another chain :
// pipoHost.setChain("chroma"); // pipoHost.setChain("chroma");
WHEN("file is processed") WHEN("file is processed")
{ {
rapidPiPoStreamAttributes sa; rapidmix::pipoStreamAttributes sa;
sa.hasTimeTags = true; sa.hasTimeTags = true;
sa.rate = 44100; sa.rate = 44100;
sa.offset = 0; sa.offset = 0;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment