MixerScenes: show last-selected scene (libardour part)
This commit is contained in:
parent
f55f0409f8
commit
44ff0e46ba
|
@ -1218,6 +1218,7 @@ public:
|
|||
bool apply_nth_mixer_scene (size_t, RouteList const&);
|
||||
void store_nth_mixer_scene (size_t);
|
||||
bool nth_mixer_scene_valid (size_t) const;
|
||||
size_t last_touched_mixer_scene_idx () {return _last_touched_mixer_scene_idx;}
|
||||
|
||||
boost::shared_ptr<MixerScene> nth_mixer_scene (size_t, bool create_if_missing = false);
|
||||
std::vector<boost::shared_ptr<MixerScene>> mixer_scenes () const;
|
||||
|
@ -1437,6 +1438,7 @@ private:
|
|||
bool _session_range_is_free;
|
||||
bool _silent;
|
||||
samplecnt_t _remaining_latency_preroll;
|
||||
size_t _last_touched_mixer_scene_idx;
|
||||
|
||||
// varispeed playback -- TODO: move out of session to backend.
|
||||
double _engine_speed;
|
||||
|
|
|
@ -198,6 +198,7 @@ Session::Session (AudioEngine &eng,
|
|||
, _session_range_is_free (true)
|
||||
, _silent (false)
|
||||
, _remaining_latency_preroll (0)
|
||||
, _last_touched_mixer_scene_idx (999)
|
||||
, _engine_speed (1.0)
|
||||
, _signalled_varispeed (0)
|
||||
, auto_play_legal (false)
|
||||
|
@ -7537,6 +7538,8 @@ Session::apply_nth_mixer_scene (size_t nth)
|
|||
scene = _mixer_scenes[nth];
|
||||
}
|
||||
assert (scene);
|
||||
|
||||
_last_touched_mixer_scene_idx = nth;
|
||||
return scene->apply ();
|
||||
}
|
||||
|
||||
|
@ -7561,6 +7564,7 @@ Session::apply_nth_mixer_scene (size_t nth, RouteList const& rl)
|
|||
r->automatables (acs);
|
||||
}
|
||||
|
||||
_last_touched_mixer_scene_idx = nth;
|
||||
return scene->apply (acs);
|
||||
}
|
||||
|
||||
|
@ -7568,6 +7572,8 @@ void
|
|||
Session::store_nth_mixer_scene (size_t nth)
|
||||
{
|
||||
boost::shared_ptr<MixerScene> scn = nth_mixer_scene (nth, true);
|
||||
|
||||
_last_touched_mixer_scene_idx = nth;
|
||||
scn->snapshot ();
|
||||
|
||||
//calling code is expected to set a name, but we need to initalize with 'something'
|
||||
|
|
Loading…
Reference in New Issue