summaryrefslogtreecommitdiff
path: root/rotord/rendercontext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'rotord/rendercontext.cpp')
-rw-r--r--rotord/rendercontext.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/rotord/rendercontext.cpp b/rotord/rendercontext.cpp
index 7a76a70..fc410b2 100644
--- a/rotord/rendercontext.cpp
+++ b/rotord/rendercontext.cpp
@@ -147,6 +147,11 @@ void Render_context::session_command(const std::vector<std::string>& command,xml
if (graph.load(command[3])) {
status=HTTPResponse::HTTP_OK;
XML.addValue("status","Loaded graph from PUT body");
+ if (audio_loaded) {
+ add_queue(ANALYSE_AUDIO);
+ status=HTTPResponse::HTTP_OK;
+ XML.addValue("status","Starting audio analysis for graph: "+command[3]);
+ }
}
else {
string graph_filename=graph_dir+command[3];
@@ -161,6 +166,11 @@ void Render_context::session_command(const std::vector<std::string>& command,xml
//or could our nodes even be subclassed from xml nodes?
//the graph or the audio could load first- have to analyse the audio with vamp after the graph is loaded
//for now the graph must load 1st
+ if (audio_loaded) {
+ add_queue(ANALYSE_AUDIO);
+ status=HTTPResponse::HTTP_OK;
+ XML.addValue("status","Starting audio analysis for graph: "+command[3]);
+ }
}
else {
status=HTTPResponse::HTTP_INTERNAL_SERVER_ERROR; //~/sources/poco-1.4.6-all/Net/include/Poco/Net/HTTPResponse.h
@@ -316,7 +326,7 @@ bool Render_context::load_audio(const string &filename,vector<Base_audio_process
}
sample_processed+=frame->nb_samples;
//mutex.lock();
- progress=((float)sample_processed)/samples;
+ progress=((float)sample_processed)/samples; //atomic on 64 bit?
//mutex.unlock();
frame=loader.get_frame();