mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-12 02:40:00 +01:00
Output session fading fixed for OSC and animation.
Linear interpolation (instead of dichotomy converge) for fading at Session update. Mixing View update reads value of session fading to animate the cursor (which was preventing other manipulation of fading). Cleanup fading in OSC controller, with animation options and fade-in and fade-out controls.
This commit is contained in:
24
Session.h
24
Session.h
@@ -98,8 +98,9 @@ public:
|
||||
void setResolution (glm::vec3 resolution, bool useAlpha = false);
|
||||
|
||||
// manipulate fading of output
|
||||
void setFading (float f, bool forcenow = false);
|
||||
inline float fading () const { return fading_target_; }
|
||||
void setFadingTarget (float f, float duration = 0.f);
|
||||
inline float fadingTarget () const { return fading_.target; }
|
||||
inline float fading () const { return render_.fading(); }
|
||||
|
||||
// activation threshold for source (mixing distance)
|
||||
inline void setActivationThreshold(float t) { activation_threshold_ = t; }
|
||||
@@ -162,10 +163,27 @@ protected:
|
||||
std::map<View::Mode, Group*> config_;
|
||||
SessionSnapshots snapshots_;
|
||||
std::vector<SourceIdList> play_groups_;
|
||||
float fading_target_;
|
||||
std::mutex access_;
|
||||
FrameBufferImage *thumbnail_;
|
||||
uint64_t start_time_;
|
||||
|
||||
struct Fading
|
||||
{
|
||||
bool active;
|
||||
float start;
|
||||
float target;
|
||||
float duration;
|
||||
float progress;
|
||||
|
||||
Fading() {
|
||||
active = false;
|
||||
start = 0.f;
|
||||
target = 0.f;
|
||||
duration = 0.f;
|
||||
progress = 0.f;
|
||||
}
|
||||
};
|
||||
Fading fading_;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user