mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-12 02:40:00 +01:00
Reimplementation of SourceInputCallbacks into Session
Session should be the object holding the list of inputs parameters (e.g. synchrony) and the list of source callbacks. This also avoids mixing input when copying sources. Code could be improved but is operational.
This commit is contained in:
19
Source.h
19
Source.h
@@ -148,14 +148,6 @@ public:
|
||||
// add callback to each update
|
||||
void call(SourceCallback *callback, bool override = false);
|
||||
|
||||
// callbacks associated to keys
|
||||
void addInputCallback(uint input, SourceCallback *callback);
|
||||
void removeInputCallback(SourceCallback *callback);
|
||||
std::list<SourceCallback *> inputCallbacks(uint input);
|
||||
std::list<uint> callbackInputs();
|
||||
void swapInputCallback(uint from, uint to);
|
||||
void clearInputCallbacks();
|
||||
|
||||
// update mode
|
||||
inline bool active () const { return active_; }
|
||||
virtual void setActive (bool on);
|
||||
@@ -325,17 +317,6 @@ protected:
|
||||
// callbacks
|
||||
std::list<SourceCallback *> update_callbacks_;
|
||||
std::mutex access_callbacks_;
|
||||
struct InputCallback {
|
||||
bool active_;
|
||||
SourceCallback *model_;
|
||||
SourceCallback *reverse_;
|
||||
InputCallback() {
|
||||
active_ = false;
|
||||
model_ = nullptr;
|
||||
reverse_ = nullptr;
|
||||
}
|
||||
};
|
||||
std::multimap<uint, InputCallback> input_callbacks_;
|
||||
void updateCallbacks(float dt);
|
||||
|
||||
// clones
|
||||
|
||||
Reference in New Issue
Block a user