From cbf03a315657fc9e388e78dd39e9daf4fd0a9718 Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Wed, 21 Aug 2013 13:27:22 +0100 Subject: remove division by zero log --- rotord/src/nodes_maths.h | 14 +++++++------- rotord/src/rotor.cpp | 2 +- rotord/src/rotord.cpp | 24 ++++++++++++++++++------ 3 files changed, 26 insertions(+), 14 deletions(-) (limited to 'rotord/src') diff --git a/rotord/src/nodes_maths.h b/rotord/src/nodes_maths.h index 617ca76..d083c72 100644 --- a/rotord/src/nodes_maths.h +++ b/rotord/src/nodes_maths.h @@ -74,13 +74,13 @@ namespace Rotor { }; Arithmetic* clone(map &_settings) { return new Arithmetic(_settings);}; const float output(const Time_spec &time) { - if (attributes["operator"]->intVal==ARITHMETIC_divide||attributes["operator"]->intVal==ARITHMETIC_modulo){ - if (value==0.0f) { - Poco::Logger& logger = Poco::Logger::get("Rotor"); - logger.error("Arithmetic node: caught division by zero, frame "+time.frame()); - return 0.0f; - } - } + //if (attributes["operator"]->intVal==ARITHMETIC_divide||attributes["operator"]->intVal==ARITHMETIC_modulo){ + // if (value==0.0f) { + // Poco::Logger& logger = Poco::Logger::get("Rotor"); + // logger.error("Arithmetic node: caught division by zero, frame "+time.frame()); + // return 0.0f; + // } + //} if (inputs.size()) { //there should there be a way to specify number of inputs in the code rather than in xml if (inputs[0]->connection) { float in= inputs[0]->get(time); diff --git a/rotord/src/rotor.cpp b/rotord/src/rotor.cpp index 0a1207b..c45ce5e 100755 --- a/rotord/src/rotor.cpp +++ b/rotord/src/rotor.cpp @@ -275,7 +275,7 @@ bool Video_output::render(const float duration, const float framerate,const stri //Assertion ff_avcodec_locked failed at libavcodec/utils.c:2967 //cerr<<"videoloader: "< command; @@ -33,7 +33,7 @@ HTTPRequestHandler* RotorRequestHandlerFactory::createRequestHandler(const HTTPS logger.information(request.clientAddress().toString()+" "+request.getMethod()); HTTPResponse::HTTPStatus status=HTTPResponse::HTTP_BAD_REQUEST; //by default - + std::string body; std::ostringstream os; os<1){ + if (command[1]=="json") { + string content="{\ + title: 'Lights Down @Rotor'',\ + audio: 'filename'',\ + id:,\ + type: 'patchBay',\ + nodeDefinitions: []\ + }"; + + return new RenderContextHandler(content, status); + } + } } else if (command[0]=="listnode") { XML.pushTag("rotor"); @@ -123,7 +136,7 @@ HTTPRequestHandler* RotorRequestHandlerFactory::createRequestHandler(const HTTPS XML.addTag("render"); XML.addAttribute("render","ID",r.first,i); bool context_found=false; - for (auto& task: manager.taskList()) { + for (auto& task: manager.taskList()) { if(task->name()==r.second) { Render_status status=((Poco::AutoPtr)task)->get_render_status(r.first); //cerr<<"render "< sc; //uid,method,id,command1,{command2,}{body} @@ -193,7 +206,7 @@ HTTPRequestHandler* RotorRequestHandlerFactory::createRequestHandler(const HTTPS } sc.push_back(body); SC.body=body; - + ((Poco::AutoPtr)task)->session_command(SC,XML,status); if (XML.tagExists("render_id")){ //cerr<<"render started: "<& args){ } return Application::EXIT_OK; } - \ No newline at end of file -- cgit v1.2.3