diff options
| author | Comment <tim@gray.(none)> | 2013-05-07 11:39:33 +0100 |
|---|---|---|
| committer | Comment <tim@gray.(none)> | 2013-05-07 11:39:33 +0100 |
| commit | 31ba1ab9504c5a4080d9703a37ab3d4f82066037 (patch) | |
| tree | 1f61f011688137752742cac405c030c25362a7f9 /rotord/rendercontext.cpp | |
| parent | ff59340614ec150e4bd84d3554081e666970aef2 (diff) | |
tidy up audio loading
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(); |
