From 31ba1ab9504c5a4080d9703a37ab3d4f82066037 Mon Sep 17 00:00:00 2001 From: Comment Date: Tue, 7 May 2013 11:39:33 +0100 Subject: tidy up audio loading --- rotord/rendercontext.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'rotord/rendercontext.cpp') diff --git a/rotord/rendercontext.cpp b/rotord/rendercontext.cpp index d0fa5bd..cdb1cf7 100644 --- a/rotord/rendercontext.cpp +++ b/rotord/rendercontext.cpp @@ -271,8 +271,19 @@ Command_response Render_context::session_command(const std::vector& //http://blog.tomaka17.com/2012/03/libavcodeclibavformat-tutorial/ //great to use c++11 features - bool Render_context::load_audio(const string &filename,vector processors){ + audioloader.setup(filename); + + for (auto p: processors) { + if(!p->init(codecContext->channels,16,samples,codecContext->sample_rate) ){ + cerr<<"Plugin failed to initialse"< processors){ av_register_all(); -- cgit v1.2.3