2 Copyright (C) 1999-2002 Paul Davis
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25 #include "pbd/error.h"
26 #include "pbd/enumwriter.h"
28 #include <glibmm/thread.h>
30 #include "ardour/ardour.h"
31 #include "ardour/audioengine.h"
32 #include "ardour/auditioner.h"
33 #include "ardour/butler.h"
34 #include "ardour/debug.h"
35 #include "ardour/process_thread.h"
36 #include "ardour/session.h"
37 #include "ardour/slave.h"
38 #include "ardour/timestamps.h"
39 #include "ardour/graph.h"
40 #include "ardour/audio_port.h"
42 #include "midi++/manager.h"
43 #include "midi++/mmc.h"
47 using namespace ARDOUR;
51 /** Called by the audio engine when there is work to be done with JACK.
52 * @param nframes Number of frames to process.
55 Session::process (pframes_t nframes)
57 MIDI::Manager::instance()->cycle_start(nframes);
61 if (processing_blocked()) {
66 if (non_realtime_work_pending()) {
67 if (!_butler->transport_work_requested ()) {
72 _engine.main_thread()->get_buffers ();
74 (this->*process_function) (nframes);
76 _engine.main_thread()->drop_buffers ();
78 // the ticker is for sending time information like MidiClock
79 framepos_t transport_frames = transport_frame();
80 Timecode::BBT_Time transport_bbt;
81 bbt_time(transport_frames, transport_bbt);
82 Timecode::Time transport_timecode;
83 timecode_time(transport_frames, transport_timecode);
84 tick (transport_frames, transport_bbt, transport_timecode); /* EMIT SIGNAL */
86 SendFeedback (); /* EMIT SIGNAL */
88 MIDI::Manager::instance()->cycle_end();
92 Session::fail_roll (pframes_t nframes)
94 return no_roll (nframes);
98 Session::no_roll (pframes_t nframes)
100 framepos_t end_frame = _transport_frame + nframes; // FIXME: varispeed + no_roll ??
102 bool declick = get_transport_declick_required();
103 boost::shared_ptr<RouteList> r = routes.reader ();
106 _click_io->silence (nframes);
109 DEBUG_TRACE(DEBUG::Graph,"calling graph/no-roll\n");
110 route_graph->routes_no_roll( nframes, _transport_frame, end_frame, non_realtime_work_pending(), actively_recording(), declick);
112 for (RouteList::iterator i = r->begin(); i != r->end(); ++i) {
114 if ((*i)->is_hidden()) {
118 (*i)->set_pending_declick (declick);
120 if ((*i)->no_roll (nframes, _transport_frame, end_frame, non_realtime_work_pending(),
121 actively_recording(), declick)) {
122 error << string_compose(_("Session: error in no roll for %1"), (*i)->name()) << endmsg;
133 Session::process_routes (pframes_t nframes, bool& need_butler)
136 int declick = get_transport_declick_required();
137 bool rec_monitors = get_rec_monitors_input();
138 boost::shared_ptr<RouteList> r = routes.reader ();
140 if (transport_sub_state & StopPendingCapture) {
141 /* force a declick out */
145 record_active = actively_recording(); // || (get_record_enabled() && get_punch_in());
147 const framepos_t start_frame = _transport_frame;
148 const framepos_t end_frame = _transport_frame + floor (nframes * _transport_speed);
150 DEBUG_TRACE(DEBUG::Graph,"calling graph/process-routes\n");
151 route_graph->process_routes( nframes, start_frame, end_frame, declick, record_active, rec_monitors, need_butler);
153 for (RouteList::iterator i = r->begin(); i != r->end(); ++i) {
157 if ((*i)->is_hidden()) {
161 (*i)->set_pending_declick (declick);
163 if ((ret = (*i)->roll (nframes, start_frame, end_frame, declick, record_active, rec_monitors, need_butler)) < 0) {
173 Session::silent_process_routes (pframes_t nframes, bool& need_butler)
175 bool record_active = actively_recording();
176 int declick = get_transport_declick_required();
177 bool rec_monitors = get_rec_monitors_input();
178 boost::shared_ptr<RouteList> r = routes.reader ();
180 if (transport_sub_state & StopPendingCapture) {
181 /* force a declick out */
185 const framepos_t start_frame = _transport_frame;
186 const framepos_t end_frame = _transport_frame + lrintf(nframes * _transport_speed);
188 route_graph->silent_process_routes( nframes, start_frame, end_frame, record_active, rec_monitors, need_butler);
190 for (RouteList::iterator i = r->begin(); i != r->end(); ++i) {
194 if ((*i)->is_hidden()) {
198 if ((ret = (*i)->silent_roll (nframes, start_frame, end_frame, record_active, rec_monitors, need_butler)) < 0) {
208 Session::get_track_statistics ()
213 boost::shared_ptr<RouteList> rl = routes.reader();
214 for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) {
216 boost::shared_ptr<Track> tr = boost::dynamic_pointer_cast<Track> (*i);
218 if (!tr || tr->hidden()) {
222 pworst = min (pworst, tr->playback_buffer_load());
223 cworst = min (cworst, tr->capture_buffer_load());
226 g_atomic_int_set (&_playback_load, (uint32_t) floor (pworst * 100.0f));
227 g_atomic_int_set (&_capture_load, (uint32_t) floor (cworst * 100.0f));
229 if (actively_recording()) {
234 /** Process callback used when the auditioner is not active */
236 Session::process_with_events (pframes_t nframes)
239 pframes_t this_nframes;
240 framepos_t end_frame;
241 bool session_needs_butler = false;
242 framepos_t stop_limit;
243 framecnt_t frames_moved;
245 /* make sure the auditioner is silent */
248 auditioner->silence (nframes);
251 /* handle any pending events */
253 while (pending_events.read (&ev, 1) == 1) {
257 /* if we are not in the middle of a state change,
258 and there are immediate events queued up,
262 while (!non_realtime_work_pending() && !immediate_events.empty()) {
263 SessionEvent *ev = immediate_events.front ();
264 immediate_events.pop_front ();
268 /* Events caused a transport change, send an MTC Full Frame (Timecode) message.
269 * This is sent whether rolling or not, to give slaves an idea of ardour time
270 * on locates (and allow slow slaves to position and prepare for rolling)
272 if (_send_timecode_update) {
273 send_full_time_code (_transport_frame);
276 if (!process_can_proceed()) {
281 if (events.empty() || next_event == events.end()) {
282 process_without_events (nframes);
286 if (_transport_speed == 1.0) {
287 frames_moved = (framecnt_t) nframes;
289 interpolation.set_target_speed (fabs(_target_transport_speed));
290 interpolation.set_speed (fabs(_transport_speed));
291 frames_moved = (framecnt_t) interpolation.interpolate (0, nframes, 0, 0);
294 end_frame = _transport_frame + frames_moved;
297 SessionEvent* this_event;
298 Events::iterator the_next_one;
300 if (!process_can_proceed()) {
305 if (!_exporting && _slave) {
306 if (!follow_slave (nframes)) {
311 if (_transport_speed == 0) {
316 if (!_exporting && !timecode_transmission_suspended()) {
317 send_midi_time_code_for_cycle (nframes);
320 if (actively_recording()) {
321 stop_limit = max_framepos;
324 if (Config->get_stop_at_session_end()) {
325 stop_limit = current_end_frame();
327 stop_limit = max_framepos;
331 if (maybe_stop (stop_limit)) {
336 this_event = *next_event;
337 the_next_one = next_event;
340 /* yes folks, here it is, the actual loop where we really truly
346 this_nframes = nframes; /* real (jack) time relative */
347 frames_moved = (framecnt_t) floor (_transport_speed * nframes); /* transport relative */
349 /* running an event, position transport precisely to its time */
350 if (this_event && this_event->action_frame <= end_frame && this_event->action_frame >= _transport_frame) {
351 /* this isn't quite right for reverse play */
352 frames_moved = (framecnt_t) (this_event->action_frame - _transport_frame);
353 this_nframes = abs (floor(frames_moved / _transport_speed));
358 click (_transport_frame, this_nframes);
360 if (process_routes (this_nframes, session_needs_butler)) {
365 get_track_statistics ();
367 nframes -= this_nframes;
369 if (frames_moved < 0) {
370 decrement_transport_position (-frames_moved);
372 increment_transport_position (frames_moved);
375 maybe_stop (stop_limit);
376 check_declick_out ();
379 _engine.split_cycle (this_nframes);
381 /* now handle this event and all others scheduled for the same time */
383 while (this_event && this_event->action_frame == _transport_frame) {
384 process_event (this_event);
386 if (the_next_one == events.end()) {
389 this_event = *the_next_one;
394 /* if an event left our state changing, do the right thing */
396 if (nframes && non_realtime_work_pending()) {
401 /* this is necessary to handle the case of seamless looping */
402 end_frame = _transport_frame + floor (nframes * _transport_speed);
408 } /* implicit release of route lock */
410 if (session_needs_butler) {
416 Session::reset_slave_state ()
418 average_slave_delta = 1800;
419 delta_accumulator_cnt = 0;
420 have_first_delta_accumulator = false;
421 _slave_state = Stopped;
425 Session::transport_locked () const
429 if (!locate_pending() && (!config.get_external_sync() || (sl && sl->ok() && sl->locked()))) {
437 Session::follow_slave (pframes_t nframes)
440 framepos_t slave_transport_frame;
441 framecnt_t this_delta;
446 config.set_external_sync (false);
450 _slave->speed_and_position (slave_speed, slave_transport_frame);
452 DEBUG_TRACE (DEBUG::Slave, string_compose ("Slave position %1 speed %2\n", slave_transport_frame, slave_speed));
454 if (!_slave->locked()) {
455 DEBUG_TRACE (DEBUG::Slave, "slave not locked\n");
459 if (slave_transport_frame > _transport_frame) {
460 this_delta = slave_transport_frame - _transport_frame;
463 this_delta = _transport_frame - slave_transport_frame;
467 if (_slave->starting()) {
471 if (_slave->is_always_synced() || config.get_timecode_source_is_synced()) {
473 /* if the TC source is synced, then we assume that its
474 speed is binary: 0.0 or 1.0
477 if (slave_speed != 0.0f) {
483 /* if we are chasing and the average delta between us and the
484 master gets too big, we want to switch to silent
485 motion. so keep track of that here.
488 if (_slave_state == Running) {
489 calculate_moving_average_of_slave_delta(dir, this_delta);
493 track_slave_state (slave_speed, slave_transport_frame, this_delta);
495 DEBUG_TRACE (DEBUG::Slave, string_compose ("slave state %1 @ %2 speed %3 cur delta %4 avg delta %5\n",
496 _slave_state, slave_transport_frame, slave_speed, this_delta, average_slave_delta));
499 if (_slave_state == Running && !_slave->is_always_synced() && !config.get_timecode_source_is_synced()) {
501 if (_transport_speed != 0.0f) {
504 note that average_dir is +1 or -1
509 if (average_slave_delta == 0) {
513 delta = average_slave_delta;
514 delta *= average_dir;
518 if (slave_speed != 0.0) {
519 DEBUG_TRACE (DEBUG::Slave, string_compose ("delta = %1 speed = %2 ts = %3 M@%4 S@%5 avgdelta %6\n",
520 (int) (dir * this_delta),
524 slave_transport_frame,
525 average_slave_delta));
529 if (_slave->give_slave_full_control_over_transport_speed()) {
530 set_transport_speed (slave_speed, false, false);
531 //std::cout << "set speed = " << slave_speed << "\n";
533 float adjusted_speed = slave_speed + (1.5 * (delta / float(_current_frame_rate)));
534 request_transport_speed (adjusted_speed);
535 DEBUG_TRACE (DEBUG::Slave, string_compose ("adjust using %1 towards %2 ratio %3 current %4 slave @ %5\n",
536 delta, adjusted_speed, adjusted_speed/slave_speed, _transport_speed,
541 if ((framecnt_t) abs(average_slave_delta) > _slave->resolution()) {
542 cerr << "average slave delta greater than slave resolution (" << _slave->resolution() << "), going to silent motion\n";
550 if (_slave_state == Running && !non_realtime_work_pending()) {
551 /* speed is set, we're locked, and good to go */
556 DEBUG_TRACE (DEBUG::Slave, "silent motion\n")
557 follow_slave_silently (nframes, slave_speed);
560 /* don't move at all */
561 DEBUG_TRACE (DEBUG::Slave, "no roll\n")
567 Session::calculate_moving_average_of_slave_delta (int dir, framecnt_t this_delta)
569 if (delta_accumulator_cnt >= delta_accumulator_size) {
570 have_first_delta_accumulator = true;
571 delta_accumulator_cnt = 0;
574 if (delta_accumulator_cnt != 0 || this_delta < _current_frame_rate) {
575 delta_accumulator[delta_accumulator_cnt++] = (framecnt_t) dir * (framecnt_t) this_delta;
578 if (have_first_delta_accumulator) {
579 average_slave_delta = 0L;
580 for (int i = 0; i < delta_accumulator_size; ++i) {
581 average_slave_delta += delta_accumulator[i];
583 average_slave_delta /= (int32_t) delta_accumulator_size;
584 if (average_slave_delta < 0L) {
586 average_slave_delta = abs(average_slave_delta);
594 Session::track_slave_state (float slave_speed, framepos_t slave_transport_frame, framecnt_t this_delta)
596 if (slave_speed != 0.0f) {
598 /* slave is running */
600 switch (_slave_state) {
602 if (_slave->requires_seekahead()) {
603 slave_wait_end = slave_transport_frame + _slave->seekahead_distance ();
604 DEBUG_TRACE (DEBUG::Slave, string_compose ("slave stopped, but running, requires seekahead to %1\n", slave_wait_end));
605 /* we can call locate() here because we are in process context */
606 locate (slave_wait_end, false, false);
607 _slave_state = Waiting;
611 _slave_state = Running;
613 Location* al = _locations->auto_loop_location();
615 if (al && play_loop && (slave_transport_frame < al->start() || slave_transport_frame > al->end())) {
617 request_play_loop(false);
620 if (slave_transport_frame != _transport_frame) {
621 locate (slave_transport_frame, false, false);
631 if (_slave_state == Waiting) {
633 DEBUG_TRACE (DEBUG::Slave, string_compose ("slave waiting at %1\n", slave_transport_frame));
635 if (slave_transport_frame >= slave_wait_end) {
637 DEBUG_TRACE (DEBUG::Slave, string_compose ("slave start at %1 vs %2\n", slave_transport_frame, _transport_frame));
639 _slave_state = Running;
641 /* now perform a "micro-seek" within the disk buffers to realign ourselves
642 precisely with the master.
647 framecnt_t frame_delta = slave_transport_frame - _transport_frame;
649 boost::shared_ptr<RouteList> rl = routes.reader();
650 for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) {
651 boost::shared_ptr<Track> tr = boost::dynamic_pointer_cast<Track> (*i);
652 if (tr && !tr->can_internal_playback_seek (frame_delta)) {
659 for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) {
660 boost::shared_ptr<Track> tr = boost::dynamic_pointer_cast<Track> (*i);
662 tr->internal_playback_seek (frame_delta);
665 _transport_frame += frame_delta;
668 cerr << "cannot micro-seek\n";
672 memset (delta_accumulator, 0, sizeof (int32_t) * delta_accumulator_size);
673 average_slave_delta = 0L;
678 if (_slave_state == Running && _transport_speed == 0.0f) {
679 DEBUG_TRACE (DEBUG::Slave, "slave starts transport\n");
683 } else { // slave_speed is 0
685 /* slave has stopped */
687 if (_transport_speed != 0.0f) {
688 DEBUG_TRACE (DEBUG::Slave, string_compose ("slave stops transport: %1 frame %2 tf %3\n", slave_speed, slave_transport_frame, _transport_frame));
692 if (slave_transport_frame != _transport_frame) {
693 DEBUG_TRACE (DEBUG::Slave, string_compose ("slave stopped, move to %1\n", slave_transport_frame));
694 force_locate (slave_transport_frame, false);
697 _slave_state = Stopped;
702 Session::follow_slave_silently (pframes_t nframes, float slave_speed)
704 if (slave_speed && _transport_speed) {
706 /* something isn't right, but we should move with the master
712 silent_process_routes (nframes, need_butler);
714 get_track_statistics ();
720 int32_t frames_moved = (int32_t) floor (_transport_speed * nframes);
722 if (frames_moved < 0) {
723 decrement_transport_position (-frames_moved);
725 increment_transport_position (frames_moved);
728 framepos_t stop_limit;
730 if (actively_recording()) {
731 stop_limit = max_framepos;
733 if (Config->get_stop_at_session_end()) {
734 stop_limit = current_end_frame();
736 stop_limit = max_framepos;
740 maybe_stop (stop_limit);
745 Session::process_without_events (pframes_t nframes)
747 bool session_needs_butler = false;
748 framepos_t stop_limit;
749 framecnt_t frames_moved;
751 if (!process_can_proceed()) {
756 if (!_exporting && _slave) {
757 if (!follow_slave (nframes)) {
762 if (_transport_speed == 0) {
767 if (!_exporting && !timecode_transmission_suspended()) {
768 send_midi_time_code_for_cycle (nframes);
771 if (actively_recording()) {
772 stop_limit = max_framepos;
774 if (Config->get_stop_at_session_end()) {
775 stop_limit = current_end_frame();
777 stop_limit = max_framepos;
781 if (maybe_stop (stop_limit)) {
786 if (maybe_sync_start (nframes)) {
790 click (_transport_frame, nframes);
792 if (_transport_speed == 1.0) {
793 frames_moved = (framecnt_t) nframes;
795 interpolation.set_target_speed (fabs(_target_transport_speed));
796 interpolation.set_speed (fabs(_transport_speed));
797 frames_moved = (framecnt_t) interpolation.interpolate (0, nframes, 0, 0);
800 if (process_routes (nframes, session_needs_butler)) {
805 get_track_statistics ();
807 if (frames_moved < 0) {
808 decrement_transport_position (-frames_moved);
810 increment_transport_position (frames_moved);
813 maybe_stop (stop_limit);
814 check_declick_out ();
816 if (session_needs_butler) {
821 /** Process callback used when the auditioner is active.
822 * @param nframes number of frames to process.
825 Session::process_audition (pframes_t nframes)
828 boost::shared_ptr<RouteList> r = routes.reader ();
830 for (RouteList::iterator i = r->begin(); i != r->end(); ++i) {
831 if (!(*i)->is_hidden()) {
832 (*i)->silence (nframes);
836 /* run the auditioner, and if it says we need butler service, ask for it */
838 if (auditioner->play_audition (nframes) > 0) {
842 /* if using a monitor section, run it because otherwise we don't hear anything */
844 if (auditioner->needs_monitor()) {
845 _monitor_out->passthru (_transport_frame, _transport_frame + nframes, nframes, false);
848 /* handle pending events */
850 while (pending_events.read (&ev, 1) == 1) {
854 /* if we are not in the middle of a state change,
855 and there are immediate events queued up,
859 while (!non_realtime_work_pending() && !immediate_events.empty()) {
860 SessionEvent *ev = immediate_events.front ();
861 immediate_events.pop_front ();
865 if (!auditioner->auditioning()) {
866 /* auditioner no longer active, so go back to the normal process callback */
867 process_function = &Session::process_with_events;
872 Session::maybe_sync_start (pframes_t & nframes)
874 pframes_t sync_offset;
876 if (!waiting_for_sync_offset) {
880 if (_engine.get_sync_offset (sync_offset) && sync_offset < nframes) {
882 /* generate silence up to the sync point, then
883 adjust nframes + offset to reflect whatever
887 no_roll (sync_offset);
888 nframes -= sync_offset;
889 AudioPort::increment_port_offset (sync_offset);
890 waiting_for_sync_offset = false;
893 return true; // done, nothing left to process
898 /* sync offset point is not within this process()
899 cycle, so just generate silence. and don't bother
900 with any fancy stuff here, just the minimal silence.
905 if (Config->get_locate_while_waiting_for_sync()) {
906 if (micro_locate (nframes)) {
907 /* XXX ERROR !!! XXX */
911 return true; // done, nothing left to process
918 Session::queue_event (SessionEvent* ev)
920 if (_state_of_the_state & Deletion) {
922 } else if (_state_of_the_state & Loading) {
925 pending_events.write (&ev, 1);
930 Session::set_next_event ()
932 if (events.empty()) {
933 next_event = events.end();
937 if (next_event == events.end()) {
938 next_event = events.begin();
941 if ((*next_event)->action_frame > _transport_frame) {
942 next_event = events.begin();
945 for (; next_event != events.end(); ++next_event) {
946 if ((*next_event)->action_frame >= _transport_frame) {
953 Session::process_event (SessionEvent* ev)
958 /* if we're in the middle of a state change (i.e. waiting
959 for the butler thread to complete the non-realtime
960 part of the change), we'll just have to queue this
961 event for a time when the change is complete.
964 if (non_realtime_work_pending()) {
966 /* except locates, which we have the capability to handle */
968 if (ev->type != SessionEvent::Locate) {
969 immediate_events.insert (immediate_events.end(), ev);
975 DEBUG_TRACE (DEBUG::SessionEvents, string_compose ("Processing event: %1 @ %2\n", enum_2_string (ev->type), _transport_frame));
978 case SessionEvent::SetLoop:
979 set_play_loop (ev->yes_or_no);
982 case SessionEvent::AutoLoop:
984 start_locate (ev->target_frame, true, false, Config->get_seamless_loop());
990 case SessionEvent::Locate:
992 // cerr << "forced locate to " << ev->target_frame << endl;
993 locate (ev->target_frame, false, true, false);
995 // cerr << "soft locate to " << ev->target_frame << endl;
996 start_locate (ev->target_frame, false, true, false);
998 _send_timecode_update = true;
1001 case SessionEvent::LocateRoll:
1002 if (ev->yes_or_no) {
1003 // cerr << "forced locate to+roll " << ev->target_frame << endl;
1004 locate (ev->target_frame, true, true, false);
1006 // cerr << "soft locate to+roll " << ev->target_frame << endl;
1007 start_locate (ev->target_frame, true, true, false);
1009 _send_timecode_update = true;
1012 case SessionEvent::LocateRollLocate:
1013 // locate is handled by ::request_roll_at_and_return()
1014 _requested_return_frame = ev->target_frame;
1015 request_locate (ev->target2_frame, true);
1019 case SessionEvent::SetTransportSpeed:
1020 set_transport_speed (ev->speed, ev->yes_or_no, ev->second_yes_or_no);
1023 case SessionEvent::PunchIn:
1024 // cerr << "PunchIN at " << transport_frame() << endl;
1025 if (config.get_punch_in() && record_status() == Enabled) {
1032 case SessionEvent::PunchOut:
1033 // cerr << "PunchOUT at " << transport_frame() << endl;
1034 if (config.get_punch_out()) {
1035 step_back_from_record ();
1041 case SessionEvent::StopOnce:
1042 if (!non_realtime_work_pending()) {
1043 stop_transport (ev->yes_or_no);
1044 _clear_event_type (SessionEvent::StopOnce);
1050 case SessionEvent::RangeStop:
1051 if (!non_realtime_work_pending()) {
1052 stop_transport (ev->yes_or_no);
1058 case SessionEvent::RangeLocate:
1059 start_locate (ev->target_frame, true, true, false);
1064 case SessionEvent::Overwrite:
1065 overwrite_some_buffers (static_cast<Track*>(ev->ptr));
1068 case SessionEvent::SetTrackSpeed:
1069 set_track_speed (static_cast<Track*> (ev->ptr), ev->speed);
1072 case SessionEvent::SetSyncSource:
1073 use_sync_source (ev->slave);
1076 case SessionEvent::Audition:
1077 set_audition (ev->region);
1078 // drop reference to region
1079 ev->region.reset ();
1082 case SessionEvent::InputConfigurationChange:
1083 add_post_transport_work (PostTransportInputChange);
1084 _butler->schedule_transport_work ();
1087 case SessionEvent::SetPlayAudioRange:
1088 set_play_range (ev->audio_range, (ev->speed == 1.0f));
1091 case SessionEvent::RealTimeOperation:
1093 del = false; // other side of RT request needs to clean up
1096 case SessionEvent::AdjustPlaybackBuffering:
1097 schedule_playback_buffering_adjustment ();
1100 case SessionEvent::AdjustCaptureBuffering:
1101 schedule_capture_buffering_adjustment ();
1104 case SessionEvent::SetTimecodeTransmission:
1105 g_atomic_int_set (&_suspend_timecode_transmission, ev->yes_or_no ? 0 : 1);
1109 fatal << string_compose(_("Programming error: illegal event type in process_event (%1)"), ev->type) << endmsg;
1115 del = del && !_remove_event (ev);