diff options
Diffstat (limited to 'rotord/rotord.cpp')
| -rwxr-xr-x[-rw-r--r--] | rotord/rotord.cpp | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/rotord/rotord.cpp b/rotord/rotord.cpp index 315e856..e794b7d 100644..100755 --- a/rotord/rotord.cpp +++ b/rotord/rotord.cpp @@ -21,10 +21,32 @@ void RotorRequestHandler::handleRequest(HTTPServerRequest& request,HTTPServerRes ostr << "</p></body></html>"; } - RotorRequestHandlerFactory::RotorRequestHandlerFactory(const std::string& format):_format(format){ } +AudioAnalyserHandler::AudioAnalyserHandler(const vampHost::Settings& _settings): settings(_settings){ +} + +void AudioAnalyserHandler::handleRequest(HTTPServerRequest& request,HTTPServerResponse& response) { + + response.setChunkedTransferEncoding(true); + response.setContentType("text/html"); + + string audioData=vampHost:: + + std::ostream& ostr = response.send(); + ostr << "<html><head><title>RotorServer powered by " + "POCO C++ Libraries</title>"; + ostr << "</head>"; + ostr << "<body><p style=\"text-align: center; " + "font-size: 48px;\">"; + ostr << dt; + ostr << "</p></body></html>"; +} + +AudioAnalyserFactory::AudioAnalyserFactory(const vampHost::Settings& _settings): settings(_settings){ +} + HTTPRequestHandler* RotorRequestHandlerFactory::createRequestHandler(const HTTPServerRequest& request){ Application& app = Application::instance(); @@ -46,9 +68,10 @@ HTTPRequestHandler* RotorRequestHandlerFactory::createRequestHandler(const HTTPS if (segments.size() == 0) { return new RotorRequestHandler(_format); } - else if (segments[0]=="vamp") { + else if (segments[0]=="vamp"&&segments.size()>3) { // vamp/plugin/filter/filename // how do deal with error condition? + return new RotorRequestHandler(_format); //string audioData=runPlugin(string myname, string soname, string id, // string output, int outputNo, string wavname, // string outfilename, bool useFrames); |
