5 #include <gtkmm2ext/gtk_ui.h>
7 #include <ardour/audioplaylist.h>
8 #include <ardour/audioregion.h>
9 #include <ardour/audiosource.h>
10 #include <ardour/audio_diskstream.h>
11 #include <ardour/audio_track.h>
12 #include <ardour/playlist_templates.h>
13 #include <ardour/source.h>
15 #include "streamview.h"
16 #include "regionview.h"
17 #include "taperegionview.h"
18 #include "audio_time_axis.h"
19 #include "canvas-waveview.h"
20 #include "canvas-simplerect.h"
21 #include "region_selection.h"
22 #include "selection.h"
23 #include "public_editor.h"
24 #include "ardour_ui.h"
25 #include "crossfade_view.h"
26 #include "rgb_macros.h"
27 #include "gui_thread.h"
31 using namespace ARDOUR;
33 using namespace Editing;
35 StreamView::StreamView (AudioTimeAxisView& tv)
38 region_color = _trackview.color();
39 crossfades_visible = true;
41 if (tv.is_audio_track()) {
43 //stream_base_color = RGBA_TO_UINT (222,223,218,255);
44 stream_base_color = color_map[cAudioTrackBase];
47 //stream_base_color = RGBA_TO_UINT (230,226,238,255);
48 stream_base_color = color_map[cAudioBusBase];
51 /* set_position() will position the group */
53 canvas_group = new ArdourCanvas::Group(*_trackview.canvas_display);
55 canvas_rect = new ArdourCanvas::SimpleRect (*canvas_group);
56 canvas_rect->property_x1() = 0.0;
57 canvas_rect->property_y1() = 0.0;
58 canvas_rect->property_x2() = 1000000.0;
59 canvas_rect->property_y2() = (double) tv.height;
60 canvas_rect->property_outline_color_rgba() = color_map[cAudioTrackOutline];
61 canvas_rect->property_outline_what() = (guint32) (0x1|0x2|0x8); // outline ends and bottom
62 canvas_rect->property_fill_color_rgba() = stream_base_color;
64 canvas_rect->signal_event().connect (bind (mem_fun (_trackview.editor, &PublicEditor::canvas_stream_view_event), canvas_rect, &_trackview));
66 _samples_per_unit = _trackview.editor.get_current_zoom();
67 _amplitude_above_axis = 1.0;
69 if (_trackview.is_audio_track()) {
70 _trackview.audio_track()->diskstream_changed.connect (mem_fun (*this, &StreamView::diskstream_changed));
71 _trackview.session().TransportStateChange.connect (mem_fun (*this, &StreamView::transport_changed));
72 _trackview.get_diskstream()->record_enable_changed.connect (mem_fun (*this, &StreamView::rec_enable_changed));
73 _trackview.session().RecordStateChanged.connect (mem_fun (*this, &StreamView::sess_rec_enable_changed));
78 use_rec_regions = tv.editor.show_waveforms_recording ();
79 last_rec_peak_frame = 0;
81 ColorChanged.connect (mem_fun (*this, &StreamView::color_handler));
84 StreamView::~StreamView ()
86 undisplay_diskstream ();
93 if (_trackview.is_audio_track()) {
94 display_diskstream (_trackview.get_diskstream());
99 StreamView::set_position (gdouble x, gdouble y)
102 canvas_group->property_x() = x;
103 canvas_group->property_y() = y;
108 StreamView::set_height (gdouble h)
110 /* limit the values to something sane-ish */
112 if (h < 10.0 || h > 1000.0) {
116 canvas_rect->property_y2() = h;
118 for (AudioRegionViewList::iterator i = region_views.begin(); i != region_views.end(); ++i) {
119 (*i)->set_height (h);
122 for (CrossfadeViewList::iterator i = crossfade_views.begin(); i != crossfade_views.end(); ++i) {
123 (*i)->set_height (h);
126 for (vector<RecBoxInfo>::iterator i = rec_rects.begin(); i != rec_rects.end(); ++i) {
127 RecBoxInfo &recbox = (*i);
128 recbox.rectangle->property_y2() = h - 1.0;
135 StreamView::set_samples_per_unit (gdouble spp)
137 AudioRegionViewList::iterator i;
143 _samples_per_unit = spp;
145 for (i = region_views.begin(); i != region_views.end(); ++i) {
146 (*i)->set_samples_per_unit (spp);
149 for (CrossfadeViewList::iterator xi = crossfade_views.begin(); xi != crossfade_views.end(); ++xi) {
150 (*xi)->set_samples_per_unit (spp);
153 for (vector<RecBoxInfo>::iterator xi = rec_rects.begin(); xi != rec_rects.end(); ++xi) {
154 RecBoxInfo &recbox = (*xi);
156 gdouble xstart = _trackview.editor.frame_to_pixel ( recbox.start );
157 gdouble xend = _trackview.editor.frame_to_pixel ( recbox.start + recbox.length );
159 recbox.rectangle->property_x1() = xstart;
160 recbox.rectangle->property_x2() = xend;
167 StreamView::set_amplitude_above_axis (gdouble app)
170 AudioRegionViewList::iterator i;
176 _amplitude_above_axis = app;
178 for (i = region_views.begin(); i != region_views.end(); ++i) {
179 (*i)->set_amplitude_above_axis (app);
186 StreamView::add_region_view (Region *r)
188 add_region_view_internal (r, true);
192 StreamView::add_region_view_internal (Region *r, bool wait_for_waves)
194 ENSURE_GUI_THREAD (bind (mem_fun (*this, &StreamView::add_region_view), r));
196 AudioRegion* region = dynamic_cast<AudioRegion*> (r);
202 AudioRegionView *region_view;
203 list<AudioRegionView *>::iterator i;
205 for (i = region_views.begin(); i != region_views.end(); ++i) {
206 if (&(*i)->region == region) {
208 /* great. we already have a AudioRegionView for this Region. use it again.
211 (*i)->set_valid (true);
216 switch (_trackview.audio_track()->mode()) {
218 region_view = new AudioRegionView (canvas_group, _trackview, *region,
219 _samples_per_unit, region_color);
222 region_view = new TapeAudioRegionView (canvas_group, _trackview, *region,
223 _samples_per_unit, region_color);
227 region_view->init (_amplitude_above_axis, region_color, wait_for_waves);
228 region_views.push_front (region_view);
230 /* follow global waveform setting */
232 region_view->set_waveform_visible(_trackview.editor.show_waveforms());
234 /* catch regionview going away */
236 region->GoingAway.connect (mem_fun (*this, &StreamView::remove_region_view));
238 AudioRegionViewAdded (region_view);
242 StreamView::remove_region_view (Region *r)
244 ENSURE_GUI_THREAD (bind (mem_fun (*this, &StreamView::remove_region_view), r));
246 AudioRegion* ar = dynamic_cast<AudioRegion*> (r);
252 for (list<AudioRegionView *>::iterator i = region_views.begin(); i != region_views.end(); ++i) {
253 if (&((*i)->region) == ar) {
255 region_views.erase (i);
260 for (list<CrossfadeView *>::iterator i = crossfade_views.begin(); i != crossfade_views.end();) {
261 list<CrossfadeView*>::iterator tmp;
266 if ((*i)->crossfade.involves (*ar)) {
268 crossfade_views.erase (i);
276 StreamView::remove_rec_region (Region *r)
278 ENSURE_GUI_THREAD(bind (mem_fun (*this, &StreamView::remove_rec_region), r));
280 if (!Gtkmm2ext::UI::instance()->caller_is_ui_thread()) {
281 fatal << "region deleted from non-GUI thread!" << endmsg;
285 AudioRegion* ar = dynamic_cast<AudioRegion*> (r);
291 for (list<AudioRegion *>::iterator i = rec_regions.begin(); i != rec_regions.end(); ++i) {
293 rec_regions.erase (i);
300 StreamView::undisplay_diskstream ()
303 for (AudioRegionViewList::iterator i = region_views.begin(); i != region_views.end(); ++i) {
307 for (CrossfadeViewList::iterator i = crossfade_views.begin(); i != crossfade_views.end(); ++i) {
311 region_views.clear();
312 crossfade_views.clear ();
316 StreamView::display_diskstream (AudioDiskstream *ds)
318 playlist_change_connection.disconnect();
319 playlist_changed (ds);
320 playlist_change_connection = ds->PlaylistChanged.connect (bind (mem_fun (*this, &StreamView::playlist_changed), ds));
324 StreamView::playlist_modified ()
326 ENSURE_GUI_THREAD (mem_fun (*this, &StreamView::playlist_modified));
328 /* if the playlist is modified, make sure xfades are on top and all the regionviews are stacked
332 for (AudioRegionViewList::iterator i = region_views.begin(); i != region_views.end(); ++i) {
336 for (list<CrossfadeView *>::iterator i = crossfade_views.begin(); i != crossfade_views.end(); ++i) {
337 (*i)->get_canvas_group()->raise_to_top();
342 StreamView::playlist_changed (AudioDiskstream *ds)
344 ENSURE_GUI_THREAD (bind (mem_fun (*this, &StreamView::playlist_changed), ds));
346 /* disconnect from old playlist */
348 for (vector<sigc::connection>::iterator i = playlist_connections.begin(); i != playlist_connections.end(); ++i) {
352 playlist_connections.clear();
353 undisplay_diskstream ();
357 redisplay_diskstream ();
361 playlist_connections.push_back (ds->playlist()->RegionAdded.connect (mem_fun (*this, &StreamView::add_region_view)));
362 playlist_connections.push_back (ds->playlist()->RegionRemoved.connect (mem_fun (*this, &StreamView::remove_region_view)));
363 playlist_connections.push_back (ds->playlist()->StateChanged.connect (mem_fun (*this, &StreamView::playlist_state_changed)));
364 playlist_connections.push_back (ds->playlist()->Modified.connect (mem_fun (*this, &StreamView::playlist_modified)));
365 playlist_connections.push_back (ds->playlist()->NewCrossfade.connect (mem_fun (*this, &StreamView::add_crossfade)));
369 StreamView::add_crossfade (Crossfade *crossfade)
371 AudioRegionView* lview = 0;
372 AudioRegionView* rview = 0;
374 ENSURE_GUI_THREAD (bind (mem_fun (*this, &StreamView::add_crossfade), crossfade));
376 /* first see if we already have a CrossfadeView for this Crossfade */
378 for (list<CrossfadeView *>::iterator i = crossfade_views.begin(); i != crossfade_views.end(); ++i) {
379 if (&(*i)->crossfade == crossfade) {
380 if (!crossfades_visible) {
385 (*i)->set_valid (true);
390 /* create a new one */
392 for (list<AudioRegionView *>::iterator i = region_views.begin(); i != region_views.end(); ++i) {
393 if (!lview && &((*i)->region) == &crossfade->out()) {
396 if (!rview && &((*i)->region) == &crossfade->in()) {
401 CrossfadeView *cv = new CrossfadeView (_trackview.canvas_display,
408 crossfade->Invalidated.connect (mem_fun (*this, &StreamView::remove_crossfade));
409 crossfade_views.push_back (cv);
411 if (!crossfades_visible) {
417 StreamView::remove_crossfade (Crossfade *xfade)
419 ENSURE_GUI_THREAD (bind (mem_fun (*this, &StreamView::remove_crossfade), xfade));
421 for (list<CrossfadeView*>::iterator i = crossfade_views.begin(); i != crossfade_views.end(); ++i) {
422 if (&(*i)->crossfade == xfade) {
424 crossfade_views.erase (i);
431 StreamView::playlist_state_changed (Change ignored)
433 ENSURE_GUI_THREAD (bind (mem_fun (*this, &StreamView::playlist_state_changed), ignored));
435 redisplay_diskstream ();
439 StreamView::redisplay_diskstream ()
441 list<AudioRegionView *>::iterator i, tmp;
442 list<CrossfadeView*>::iterator xi, tmpx;
445 for (i = region_views.begin(); i != region_views.end(); ++i) {
446 (*i)->set_valid (false);
449 for (xi = crossfade_views.begin(); xi != crossfade_views.end(); ++xi) {
450 (*xi)->set_valid (false);
451 if ((*xi)->visible()) {
456 if (_trackview.is_audio_track()) {
457 _trackview.get_diskstream()->playlist()->foreach_region (this, &StreamView::add_region_view);
458 _trackview.get_diskstream()->playlist()->foreach_crossfade (this, &StreamView::add_crossfade);
461 for (i = region_views.begin(); i != region_views.end(); ) {
465 if (!(*i)->is_valid()) {
467 region_views.erase (i);
473 for (xi = crossfade_views.begin(); xi != crossfade_views.end();) {
477 if (!(*xi)->valid()) {
479 crossfade_views.erase (xi);
485 /* now fix layering */
487 playlist_modified ();
491 StreamView::diskstream_changed (void *src_ignored)
495 if ((at = _trackview.audio_track()) != 0) {
496 AudioDiskstream& ds = at->disk_stream();
497 /* XXX grrr: when will SigC++ allow me to bind references? */
498 Gtkmm2ext::UI::instance()->call_slot (bind (mem_fun (*this, &StreamView::display_diskstream), &ds));
500 Gtkmm2ext::UI::instance()->call_slot (mem_fun (*this, &StreamView::undisplay_diskstream));
505 StreamView::apply_color (Gdk::Color& color, ColorTarget target)
508 list<AudioRegionView *>::iterator i;
512 region_color = color;
513 for (i = region_views.begin(); i != region_views.end(); ++i) {
514 (*i)->set_color (region_color);
516 // stream_base_color = RGBA_TO_UINT (color.red/256, color.green/256, color.blue/256, 255);
517 // gnome_canvas_item_set (canvas_rect, "fill_color_rgba", stream_base_color, NULL);
520 case StreamBaseColor:
521 // stream_base_color = RGBA_TO_UINT (color.red/256, color.green/256, color.blue/256, 255);
522 // gnome_canvas_item_set (canvas_rect, "fill_color_rgba", stream_base_color, NULL);
528 StreamView::set_show_waveforms (bool yn)
530 for (list<AudioRegionView *>::iterator i = region_views.begin(); i != region_views.end(); ++i) {
531 (*i)->set_waveform_visible (yn);
536 StreamView::set_selected_regionviews (AudioRegionSelection& regions)
540 // cerr << _trackview.name() << " (selected = " << regions.size() << ")" << endl;
541 for (list<AudioRegionView*>::iterator i = region_views.begin(); i != region_views.end(); ++i) {
545 for (AudioRegionSelection::iterator ii = regions.begin(); ii != regions.end(); ++ii) {
551 // cerr << "\tregion " << (*i)->region.name() << " selected = " << selected << endl;
552 (*i)->set_selected (selected);
557 StreamView::get_selectables (jack_nframes_t start, jack_nframes_t end, list<Selectable*>& results)
559 for (list<AudioRegionView*>::iterator i = region_views.begin(); i != region_views.end(); ++i) {
560 if ((*i)->region.coverage(start, end) != OverlapNone) {
561 results.push_back (*i);
567 StreamView::get_inverted_selectables (Selection& sel, list<Selectable*>& results)
569 for (list<AudioRegionView*>::iterator i = region_views.begin(); i != region_views.end(); ++i) {
570 if (!sel.audio_regions.contains (*i)) {
571 results.push_back (*i);
577 StreamView::set_waveform_shape (WaveformShape shape)
579 for (AudioRegionViewList::iterator i = region_views.begin(); i != region_views.end(); ++i) {
580 (*i)->set_waveform_shape (shape);
585 StreamView::region_layered (AudioRegionView* rv)
587 rv->get_canvas_group()->lower_to_bottom();
589 /* don't ever leave it at the bottom, since then it doesn't
590 get events - the parent group does instead ...
593 rv->get_canvas_group()->raise (rv->region.layer() + 1);
597 StreamView::rec_enable_changed (void *src)
599 Gtkmm2ext::UI::instance()->call_slot (mem_fun (*this, &StreamView::setup_rec_box));
603 StreamView::sess_rec_enable_changed ()
605 Gtkmm2ext::UI::instance()->call_slot (mem_fun (*this, &StreamView::setup_rec_box));
609 StreamView::transport_changed()
611 Gtkmm2ext::UI::instance()->call_slot (mem_fun (*this, &StreamView::setup_rec_box));
615 StreamView::setup_rec_box ()
617 // cerr << _trackview.name() << " streamview SRB\n";
619 if (_trackview.session().transport_rolling()) {
621 // cerr << "\trolling\n";
624 _trackview.session().record_status() == Session::Recording &&
625 _trackview.get_diskstream()->record_enabled()) {
627 if (_trackview.audio_track()->mode() == Normal && use_rec_regions && rec_regions.size() == rec_rects.size()) {
629 /* add a new region, but don't bother if they set use_rec_regions mid-record */
631 AudioRegion::SourceList sources;
633 for (list<sigc::connection>::iterator prc = peak_ready_connections.begin(); prc != peak_ready_connections.end(); ++prc) {
636 peak_ready_connections.clear();
638 for (uint32_t n=0; n < _trackview.get_diskstream()->n_channels(); ++n) {
639 AudioSource *src = (AudioSource *) _trackview.get_diskstream()->write_source (n);
641 sources.push_back (src);
642 peak_ready_connections.push_back (src->PeakRangeReady.connect (bind (mem_fun (*this, &StreamView::rec_peak_range_ready), src)));
648 jack_nframes_t start = 0;
649 if (rec_regions.size() > 0) {
650 start = rec_regions.back()->start() + _trackview.get_diskstream()->get_captured_frames(rec_regions.size()-1);
653 AudioRegion * region = new AudioRegion(sources, start, 1 , "", 0, (Region::Flag)(Region::DefaultFlags | Region::DoNotSaveState), false);
654 region->set_position (_trackview.session().transport_frame(), this);
655 rec_regions.push_back (region);
656 /* catch it if it goes away */
657 region->GoingAway.connect (mem_fun (*this, &StreamView::remove_rec_region));
659 /* we add the region later */
662 /* start a new rec box */
666 at = _trackview.audio_track(); /* we know what it is already */
667 AudioDiskstream& ds = at->disk_stream();
668 jack_nframes_t frame_pos = ds.current_capture_start ();
669 gdouble xstart = _trackview.editor.frame_to_pixel (frame_pos);
673 switch (_trackview.audio_track()->mode()) {
676 fill_color = color_map[cRecordingRectFill];
681 fill_color = color_map[cRecordingRectFill];
682 /* make the recording rect translucent to allow
683 the user to see the peak data coming in, etc.
685 fill_color = UINT_RGBA_CHANGE_A (fill_color, 120);
689 ArdourCanvas::SimpleRect * rec_rect = new Gnome::Canvas::SimpleRect (*canvas_group);
690 rec_rect->property_x1() = xstart;
691 rec_rect->property_y1() = 1.0;
692 rec_rect->property_x2() = xend;
693 rec_rect->property_y2() = (double) _trackview.height - 1;
694 rec_rect->property_outline_color_rgba() = color_map[cRecordingRectOutline];
695 rec_rect->property_fill_color_rgba() = fill_color;
698 recbox.rectangle = rec_rect;
699 recbox.start = _trackview.session().transport_frame();
702 rec_rects.push_back (recbox);
704 screen_update_connection.disconnect();
705 screen_update_connection = ARDOUR_UI::instance()->SuperRapidScreenUpdate.connect (mem_fun (*this, &StreamView::update_rec_box));
709 } else if (rec_active &&
710 (_trackview.session().record_status() != Session::Recording ||
711 !_trackview.get_diskstream()->record_enabled())) {
713 screen_update_connection.disconnect();
715 rec_updating = false;
721 // cerr << "\tNOT rolling, rec_rects = " << rec_rects.size() << " rec_regions = " << rec_regions.size() << endl;
723 if (!rec_rects.empty() || !rec_regions.empty()) {
725 /* disconnect rapid update */
726 screen_update_connection.disconnect();
728 for (list<sigc::connection>::iterator prc = peak_ready_connections.begin(); prc != peak_ready_connections.end(); ++prc) {
731 peak_ready_connections.clear();
733 rec_updating = false;
735 last_rec_peak_frame = 0;
737 /* remove temp regions */
738 for (list<AudioRegion*>::iterator iter=rec_regions.begin(); iter != rec_regions.end(); )
740 list<AudioRegion*>::iterator tmp;
745 /* this will trigger the remove_region_view */
753 // cerr << "\tclear " << rec_rects.size() << " rec rects\n";
756 /* transport stopped, clear boxes */
757 for (vector<RecBoxInfo>::iterator iter=rec_rects.begin(); iter != rec_rects.end(); ++iter) {
758 RecBoxInfo &rect = (*iter);
759 delete rect.rectangle;
770 StreamView::update_rec_box ()
772 if (rec_active && rec_rects.size() > 0) {
773 /* only update the last box */
774 RecBoxInfo & rect = rec_rects.back();
775 jack_nframes_t at = _trackview.get_diskstream()->current_capture_end();
779 switch (_trackview.audio_track()->mode()) {
781 rect.length = at - rect.start;
782 xstart = _trackview.editor.frame_to_pixel (rect.start);
783 xend = _trackview.editor.frame_to_pixel (at);
788 xstart = _trackview.editor.frame_to_pixel (_trackview.get_diskstream()->current_capture_start());
789 xend = _trackview.editor.frame_to_pixel (at);
793 rect.rectangle->property_x1() = xstart;
794 rect.rectangle->property_x2() = xend;
799 StreamView::find_view (const AudioRegion& region)
801 for (list<AudioRegionView*>::iterator i = region_views.begin(); i != region_views.end(); ++i) {
803 if (&(*i)->region == ®ion) {
811 StreamView::foreach_regionview (sigc::slot<void,AudioRegionView*> slot)
813 for (list<AudioRegionView*>::iterator i = region_views.begin(); i != region_views.end(); ++i) {
819 StreamView::foreach_crossfadeview (void (CrossfadeView::*pmf)(void))
821 for (list<CrossfadeView*>::iterator i = crossfade_views.begin(); i != crossfade_views.end(); ++i) {
827 StreamView::rec_peak_range_ready (jack_nframes_t start, jack_nframes_t cnt, Source * src)
829 // this is called from the peak building thread
831 ENSURE_GUI_THREAD(bind (mem_fun (*this, &StreamView::rec_peak_range_ready), start, cnt, src));
833 if (rec_peak_ready_map.size() == 0 || start+cnt > last_rec_peak_frame) {
834 last_rec_peak_frame = start + cnt;
837 rec_peak_ready_map[src] = true;
839 if (rec_peak_ready_map.size() == _trackview.get_diskstream()->n_channels()) {
840 this->update_rec_regions ();
841 rec_peak_ready_map.clear();
846 StreamView::update_rec_regions ()
848 if (use_rec_regions) {
852 for (list<AudioRegion*>::iterator iter = rec_regions.begin(); iter != rec_regions.end(); n++) {
854 list<AudioRegion*>::iterator tmp;
859 if (!canvas_item_visible (rec_rects[n].rectangle)) {
860 /* rect already hidden, this region is done */
865 AudioRegion * region = (*iter);
866 jack_nframes_t origlen = region->length();
868 if (region == rec_regions.back() && rec_active) {
870 if (last_rec_peak_frame > region->start()) {
872 jack_nframes_t nlen = last_rec_peak_frame - region->start();
874 if (nlen != region->length()) {
877 region->set_position (_trackview.get_diskstream()->get_capture_start_frame(n), this);
878 region->set_length (nlen, this);
879 region->thaw ("updated");
882 /* our special initial length */
883 add_region_view_internal (region, false);
886 /* also update rect */
887 ArdourCanvas::SimpleRect * rect = rec_rects[n].rectangle;
888 gdouble xend = _trackview.editor.frame_to_pixel (region->position() + region->length());
889 rect->property_x2() = xend;
895 jack_nframes_t nlen = _trackview.get_diskstream()->get_captured_frames(n);
897 if (nlen != region->length()) {
899 if (region->source(0).length() >= region->start() + nlen) {
902 region->set_position (_trackview.get_diskstream()->get_capture_start_frame(n), this);
903 region->set_length (nlen, this);
904 region->thaw ("updated");
907 /* our special initial length */
908 add_region_view_internal (region, false);
912 ArdourCanvas::Item * rect = rec_rects[n].rectangle;
925 StreamView::show_all_xfades ()
927 foreach_crossfadeview (&CrossfadeView::show);
928 crossfades_visible = true;
932 StreamView::hide_all_xfades ()
934 foreach_crossfadeview (&CrossfadeView::hide);
935 crossfades_visible = false;
939 StreamView::hide_xfades_involving (AudioRegionView& rv)
941 for (list<CrossfadeView *>::iterator i = crossfade_views.begin(); i != crossfade_views.end(); ++i) {
942 if ((*i)->crossfade.involves (rv.region)) {
949 StreamView::reveal_xfades_involving (AudioRegionView& rv)
951 for (list<CrossfadeView *>::iterator i = crossfade_views.begin(); i != crossfade_views.end(); ++i) {
952 if ((*i)->crossfade.involves (rv.region) && (*i)->visible()) {
959 StreamView::color_handler (ColorID id, uint32_t val)
962 case cAudioTrackBase:
963 if (_trackview.is_audio_track()) {
964 canvas_rect->property_fill_color_rgba() = val;
968 if (!_trackview.is_audio_track()) {
969 canvas_rect->property_fill_color_rgba() = val;
972 case cAudioTrackOutline:
973 canvas_rect->property_outline_color_rgba() = val;