transforms[index] = tweened_transform<T>(src, dst, mix_duration, tween);\r
});\r
}\r
-\r
- template<typename T>\r
- void reset_transform(unsigned int mix_duration, const std::wstring& tween)\r
- {\r
- channel_.execution().invoke([&]\r
- {\r
- auto& transforms = boost::fusion::at_key<T>(transforms_);\r
-\r
- BOOST_FOREACH(auto& t, transforms) \r
- t.second = tweened_transform<T>(t.second.fetch(), T(), mix_duration, tween); \r
- set_transform(T(), mix_duration, tween);\r
- });\r
- }\r
-\r
- template<typename T>\r
- void reset_transform(int index, unsigned int mix_duration, const std::wstring& tween)\r
- {\r
- channel_.execution().invoke([&]\r
- { \r
- set_transform(T(), mix_duration, tween);\r
- });\r
- }\r
- \r
+ \r
std::wstring print() const\r
{\r
return L"mixer";\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(const std::function<core::audio_transform(core::audio_transform)>& transform, unsigned int mix_duration, const std::wstring& tween){impl_->apply_transform<core::audio_transform>(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
-void mixer::reset_image_transform(unsigned int mix_duration, const std::wstring& tween){impl_->reset_transform<core::image_transform>(mix_duration, tween);}\r
-void mixer::reset_image_transform(int index, unsigned int mix_duration, const std::wstring& tween){impl_->reset_transform<core::image_transform>(index, mix_duration, tween);}\r
-void mixer::reset_audio_transform(unsigned int mix_duration, const std::wstring& tween){impl_->reset_transform<core::audio_transform>(mix_duration, tween);}\r
-void mixer::reset_audio_transform(int index, unsigned int mix_duration, const std::wstring& tween){impl_->reset_transform<core::audio_transform>(index, mix_duration, tween);}\r
+\r
}}
\ No newline at end of file
void apply_audio_transform(const std::function<core::audio_transform(core::audio_transform)>& transform, unsigned int mix_duration = 0, const std::wstring& tween = L"linear");\r
void apply_audio_transform(int index, const std::function<core::audio_transform(core::audio_transform)>& transform, unsigned int mix_duration = 0, const std::wstring& tween = L"linear");\r
\r
- void reset_image_transform(unsigned int mix_duration = 0, const std::wstring& tween = L"linear");\r
- void reset_image_transform(int index, unsigned int mix_duration = 0, const std::wstring& tween = L"linear");\r
- void reset_audio_transform(unsigned int mix_duration = 0, const std::wstring& tween = L"linear");\r
- void reset_audio_transform(int index, unsigned int mix_duration = 0, const std::wstring& tween = L"linear");\r
-\r
private:\r
struct implementation;\r
safe_ptr<implementation> impl_;\r
\r
\r
/* File created by MIDL compiler version 7.00.0555 */\r
-/* at Mon Jun 13 15:24:58 2011\r
+/* at Tue Jun 14 09:26:37 2011\r
*/\r
/* Compiler settings for interop\DeckLinkAPI.idl:\r
Oicf, W1, Zp8, env=Win32 (32b run), target_arch=X86 7.00.0555 \r
\r
\r
/* File created by MIDL compiler version 7.00.0555 */\r
-/* at Mon Jun 13 15:24:58 2011\r
+/* at Tue Jun 14 09:26:37 2011\r
*/\r
/* Compiler settings for interop\DeckLinkAPI.idl:\r
Oicf, W1, Zp8, env=Win32 (32b run), target_arch=X86 7.00.0555 \r
\r
int layer = GetLayerIndex(std::numeric_limits<int>::min());\r
if(layer != std::numeric_limits<int>::min())\r
- GetChannel()->mixer()->reset_image_transform(GetLayerIndex(), duration, tween);\r
+ GetChannel()->mixer()->set_image_transform(GetLayerIndex(), image_transform(), duration, tween);\r
else\r
- GetChannel()->mixer()->reset_image_transform(duration, tween);\r
+ GetChannel()->mixer()->set_image_transform(image_transform(), duration, tween);\r
}\r
}\r
else if(_parameters[0] == L"AUDIO")\r
{\r
int duration = _parameters.size() > 2 ? lexical_cast_or_default(_parameters[2], 0) : 0;\r
std::wstring tween = _parameters.size() > 3 ? _parameters[3] : L"linear";\r
- GetChannel()->mixer()->reset_audio_transform(duration, tween);\r
+ int layer = GetLayerIndex(std::numeric_limits<int>::min());\r
+ if(layer != std::numeric_limits<int>::min())\r
+ GetChannel()->mixer()->set_audio_transform(GetLayerIndex(), audio_transform(), duration, tween);\r
+ else \r
+ GetChannel()->mixer()->set_audio_transform(audio_transform(), duration, tween);\r
}\r
}\r
else if(_parameters[0] == L"RESET")\r
{\r
int duration = _parameters.size() > 2 ? lexical_cast_or_default(_parameters[2], 0) : 0;\r
std::wstring tween = _parameters.size() > 3 ? _parameters[3] : L"linear";\r
- GetChannel()->mixer()->reset_image_transform(duration, tween);\r
- GetChannel()->mixer()->reset_audio_transform(duration, tween);\r
+ GetChannel()->mixer()->set_image_transform(image_transform(), duration, tween);\r
+ GetChannel()->mixer()->set_audio_transform(audio_transform(), duration, tween);\r
}\r
\r
SetReplyString(TEXT("202 MIXER OK\r\n"));\r