boost::fusion::map<boost::fusion::pair<core::image_transform, image_transforms>,\r
boost::fusion::pair<core::audio_transform, audio_transforms>> transforms_;\r
\r
+ std::unordered_map<int, blend_mode::type> blend_modes_;\r
+\r
std::queue<std::pair<boost::unique_future<safe_ptr<host_buffer>>, std::vector<int16_t>>> buffer_;\r
\r
const size_t buffer_size_;\r
});\r
}\r
\r
+ void set_blend_mode(int index, blend_mode::type value)\r
+ {\r
+ blend_modes_[index] = value;\r
+ }\r
+\r
std::wstring print() const\r
{\r
return L"mixer";\r
\r
BOOST_FOREACH(auto& frame, frames)\r
{\r
- image_mixer_.begin_layer();\r
+ auto blend_it = blend_modes_.find(frame.first);\r
+ image_mixer_.begin_layer(blend_it != blend_modes_.end() ? blend_it->second : blend_mode::normal);\r
\r
auto frame1 = make_safe<core::basic_frame>(frame.second);\r
frame1->get_image_transform() = image_transforms[frame.first].fetch_and_tick(1);\r
void mixer::set_audio_transform(int index, const core::audio_transform& transform, unsigned int mix_duration, const std::wstring& tween){impl_->set_transform<core::audio_transform>(index, transform, mix_duration, tween);}\r
void mixer::apply_image_transform(int index, const std::function<core::image_transform(core::image_transform)>& transform, unsigned int mix_duration, const std::wstring& tween){impl_->apply_transform<core::image_transform>(index, transform, mix_duration, tween);}\r
void mixer::apply_audio_transform(int index, const std::function<core::audio_transform(core::audio_transform)>& transform, unsigned int mix_duration, const std::wstring& tween){impl_->apply_transform<core::audio_transform>(index, transform, mix_duration, tween);}\r
-\r
+void mixer::set_blend_mode(int index, blend_mode::type value){impl_->set_blend_mode(index, value);}\r
}}
\ No newline at end of file