Milestone in SourceCallbacks and Keyboard callback trigger

Updated SourceCallback class to accept cloning, reversing, and visitors for saving./loading. New mechanism in Source to listen to key triggers for launching SourceCallbacks. Saving and loading in SessionVisitor and SessionCreator.
This commit is contained in:
Bruno Herbelin
2022-01-30 00:25:08 +01:00
parent 3605ae14b5
commit 8404e0f670
17 changed files with 660 additions and 79 deletions

View File

@@ -51,6 +51,7 @@
#include "StreamSource.h"
#include "NetworkSource.h"
#include "SrtReceiverSource.h"
#include "SourceCallback.h"
#include "ActionManager.h"
#include "MixingGroup.h"
@@ -1174,7 +1175,7 @@ void Mixer::merge(SessionSource *source)
SourceList::iterator it = to_be_moved.begin();
for (; it != to_be_moved.end(); ++it) {
float scale_depth = (MAX_DEPTH-(*it)->depth()) / (MAX_DEPTH-next_depth);
(*it)->call( new SetDepth( (*it)->depth() + scale_depth ) );
(*it)->call( new GotoDepth( (*it)->depth() + scale_depth ) );
}
}
}
@@ -1186,10 +1187,10 @@ void Mixer::merge(SessionSource *source)
renameSource(s);
// scale alpha
s->call( new SetAlpha(s->alpha() * source->alpha()));
s->call( new GotoAlpha(s->alpha() * source->alpha()));
// set depth (proportional to depth of s, adjusted by needed space)
s->call( new SetDepth( target_depth + ( (s->depth()-start_depth)/ need_depth) ) );
s->call( new GotoDepth( target_depth + ( (s->depth()-start_depth)/ need_depth) ) );
// set location
// a. transform of node to import