New mechanism for source update with callbacks

Similarly to Node update callbacks, sources now have SourceCallbacks called at the start of each update. Several SourceCallback are implemented to ensure thread safe update of more complex properties (mixing alpha, depth, etc.).
This commit is contained in:
Bruno Herbelin
2021-12-20 00:25:42 +01:00
parent 8deb364025
commit f921e7610c
9 changed files with 464 additions and 169 deletions

View File

@@ -244,14 +244,14 @@ void MixingView::draw()
if (ImGui::Selectable( ICON_FA_CLOUD_SUN " Expand & hide" )){
SourceList::iterator it = Mixer::selection().begin();
for (; it != Mixer::selection().end(); ++it) {
(*it)->setAlpha(0.f);
(*it)->call( new SetAlpha(0.f) );
}
Action::manager().store(std::string("Selection: Mixing Expand & hide"));
}
if (ImGui::Selectable( ICON_FA_SUN " Compress & show" )){
SourceList::iterator it = Mixer::selection().begin();
for (; it != Mixer::selection().end(); ++it) {
(*it)->setAlpha(0.99f);
(*it)->call( new SetAlpha(0.999f) );
}
Action::manager().store(std::string("Selection: Mixing Compress & show"));
}