void change_midi_ports ();
int use_config_midi_ports ();
- void set_play_loop (bool yn, bool leave_rolling);
+ void set_play_loop (bool yn);
+ void unset_play_loop ();
void overwrite_some_buffers (Diskstream*);
void flush_all_redirects ();
int micro_locate (nframes_t distance);
}
+ /* unconditionally reset these flags. if play_loop is still true then Diskstream::seek() will do
+ the wrong thing in seamless loop mode.
+ */
+
+ if (post_transport_work & PostTransportStop) {
+ _play_range = false;
+ unset_play_loop ();
+ }
+
/* this for() block can be put inside the previous if() and has the effect of ... ??? what */
+
for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) {
if (!(*i)->hidden()) {
if ((*i)->speed() != 1.0f || (*i)->speed() != -1.0f) {
DurationChanged (); /* EMIT SIGNAL */
}
- if (post_transport_work & PostTransportStop) {
- _play_range = false;
- play_loop = false;
- }
-
nframes_t tf = _transport_frame;
PositionChanged (tf); /* EMIT SIGNAL */
}
void
-Session::set_play_loop (bool yn, bool leave_rolling)
+Session::unset_play_loop ()
+{
+ play_loop = false;
+ clear_events (Event::AutoLoop);
+
+ // set all diskstreams to NOT use internal looping
+ boost::shared_ptr<DiskstreamList> dsl = diskstreams.reader();
+ for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) {
+ if (!(*i)->hidden()) {
+ (*i)->set_loop (0);
+ }
+ }
+}
+
+void
+Session::set_play_loop (bool yn)
{
/* Called from event-handling context */
return;
}
- if ((play_loop = yn)) {
+ if (yn) {
+
+ play_loop = true;
if (loc) {
} else {
- clear_events (Event::AutoLoop);
-
- // set all diskstreams to NOT use internal looping
- boost::shared_ptr<DiskstreamList> dsl = diskstreams.reader();
- for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) {
- if (!(*i)->hidden()) {
- (*i)->set_loop (0);
- }
- }
-
+ unset_play_loop ();
}
TransportStateChange ();
if (al && (_transport_frame < al->start() || _transport_frame > al->end())) {
// cancel looping directly, this is called from event handling context
- set_play_loop (false, false);
+ set_play_loop (false);
}
else if (al && _transport_frame == al->start()) {
if (with_loop) {
if (yn) {
/* cancel loop play */
- set_play_loop (false, true);
+ set_play_loop (false);
}
_play_range = yn;