diff options
Diffstat (limited to 'rotord/rendercontext.cpp')
| -rw-r--r-- | rotord/rendercontext.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
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<std::string>& //http://blog.tomaka17.com/2012/03/libavcodeclibavformat-tutorial/ //great to use c++11 features - bool Render_context::load_audio(const string &filename,vector<Base_audio_processor*> processors){ + audioloader.setup(filename); + + for (auto p: processors) { + if(!p->init(codecContext->channels,16,samples,codecContext->sample_rate) ){ + cerr<<"Plugin failed to initialse"<<endl; + return false; + } + } + + return true; +} +bool Render_context::_load_audio(const string &filename,vector<Base_audio_processor*> processors){ av_register_all(); |
