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;
32 using namespace Editing;
34 StreamView::StreamView (AudioTimeAxisView& tv)
37 region_color = _trackview.color();
38 crossfades_visible = true;
40 if (tv.is_audio_track()) {
42 //stream_base_color = RGBA_TO_UINT (222,223,218,255);
43 stream_base_color = color_map[cAudioTrackBase];
46 //stream_base_color = RGBA_TO_UINT (230,226,238,255);
47 stream_base_color = color_map[cAudioBusBase];
50 /* set_position() will position the group */
52 canvas_group = new ArdourCanvas::Group(*_trackview.canvas_display);
54 canvas_rect = new ArdourCanvas::SimpleRect (*canvas_group);
55 canvas_rect->property_x1() = 0.0;
56 canvas_rect->property_y1() = 0.0;
57 canvas_rect->property_x2() = 1000000.0;
58 canvas_rect->property_y2() = (double) tv.height;
59 canvas_rect->property_outline_color_rgba() = color_map[cAudioTrackOutline];
60 canvas_rect->property_outline_what() = (guint32) (0x1|0x2|0x8); // outline ends and bottom
61 canvas_rect->property_fill_color_rgba() = stream_base_color;
63 canvas_rect->signal_event().connect (bind (mem_fun (_trackview.editor, &PublicEditor::canvas_stream_view_event), canvas_rect, &_trackview));
65 _samples_per_unit = _trackview.editor.get_current_zoom();
66 _amplitude_above_axis = 1.0;
68 if (_trackview.is_audio_track()) {
69 _trackview.audio_track()->diskstream_changed.connect (mem_fun (*this, &StreamView::diskstream_changed));
70 _trackview.session().TransportStateChange.connect (mem_fun (*this, &StreamView::transport_changed));
71 _trackview.get_diskstream()->record_enable_changed.connect (mem_fun (*this, &StreamView::rec_enable_changed));
72 _trackview.session().RecordStateChanged.connect (mem_fun (*this, &StreamView::sess_rec_enable_changed));
77 use_rec_regions = tv.editor.show_waveforms_recording ();
78 last_rec_peak_frame = 0;
80 ColorChanged.connect (mem_fun (*this, &StreamView::color_handler));
83 StreamView::~StreamView ()
85 undisplay_diskstream ();
92 if (_trackview.is_audio_track()) {
93 display_diskstream (_trackview.get_diskstream());
98 StreamView::set_position (gdouble x, gdouble y)
101 canvas_group->property_x() = x;
102 canvas_group->property_y() = y;
107 StreamView::set_height (gdouble h)
109 /* limit the values to something sane-ish */
111 if (h < 10.0 || h > 1000.0) {
115 canvas_rect->property_y2() = h;
117 for (AudioRegionViewList::iterator i = region_views.begin(); i != region_views.end(); ++i) {
118 (*i)->set_height (h);
121 for (CrossfadeViewList::iterator i = crossfade_views.begin(); i != crossfade_views.end(); ++i) {
122 (*i)->set_height (h);
125 for (vector<RecBoxInfo>::iterator i = rec_rects.begin(); i != rec_rects.end(); ++i) {
126 RecBoxInfo &recbox = (*i);
127 recbox.rectangle->property_y2() = h - 1.0;
134 StreamView::set_samples_per_unit (gdouble spp)
136 AudioRegionViewList::iterator i;
142 _samples_per_unit = spp;
144 for (i = region_views.begin(); i != region_views.end(); ++i) {
145 (*i)->set_samples_per_unit (spp);
148 for (CrossfadeViewList::iterator xi = crossfade_views.begin(); xi != crossfade_views.end(); ++xi) {
149 (*xi)->set_samples_per_unit (spp);
152 for (vector<RecBoxInfo>::iterator xi = rec_rects.begin(); xi != rec_rects.end(); ++xi) {
153 RecBoxInfo &recbox = (*xi);
155 gdouble xstart = _trackview.editor.frame_to_pixel ( recbox.start );
156 gdouble xend = _trackview.editor.frame_to_pixel ( recbox.start + recbox.length );
158 recbox.rectangle->property_x1() = xstart;
159 recbox.rectangle->property_x2() = xend;
166 StreamView::set_amplitude_above_axis (gdouble app)
169 AudioRegionViewList::iterator i;
175 _amplitude_above_axis = app;
177 for (i = region_views.begin(); i != region_views.end(); ++i) {
178 (*i)->set_amplitude_above_axis (app);
185 StreamView::add_region_view (Region *r)
187 add_region_view_internal (r, true);
191 StreamView::add_region_view_internal (Region *r, bool wait_for_waves)
193 ENSURE_GUI_THREAD (bind (mem_fun (*this, &StreamView::add_region_view), r));
195 AudioRegion* region = dynamic_cast<AudioRegion*> (r);
201 AudioRegionView *region_view;
202 list<AudioRegionView *>::iterator i;
204 for (i = region_views.begin(); i != region_views.end(); ++i) {
205 if (&(*i)->region == region) {
207 /* great. we already have a AudioRegionView for this Region. use it again.
210 (*i)->set_valid (true);
215 switch (_trackview.audio_track()->mode()) {
217 region_view = new AudioRegionView (canvas_group, _trackview, *region,
218 _samples_per_unit, region_color);
221 region_view = new TapeAudioRegionView (canvas_group, _trackview, *region,
222 _samples_per_unit, region_color);
226 region_view->init (_amplitude_above_axis, region_color, wait_for_waves);
227 region_views.push_front (region_view);
229 /* follow global waveform setting */
231 region_view->set_waveform_visible(_trackview.editor.show_waveforms());
233 /* catch regionview going away */
235 region->GoingAway.connect (mem_fun (*this, &StreamView::remove_region_view));
237 AudioRegionViewAdded (region_view);
241 StreamView::remove_region_view (Region *r)
243 ENSURE_GUI_THREAD (bind (mem_fun (*this, &StreamView::remove_region_view), r));
245 AudioRegion* ar = dynamic_cast<AudioRegion*> (r);
251 for (list<AudioRegionView *>::iterator i = region_views.begin(); i != region_views.end(); ++i) {
252 if (&((*i)->region) == ar) {
254 region_views.erase (i);
259 for (list<CrossfadeView *>::iterator i = crossfade_views.begin(); i != crossfade_views.end();) {
260 list<CrossfadeView*>::iterator tmp;
265 if ((*i)->crossfade.involves (*ar)) {
267 crossfade_views.erase (i);
275 StreamView::remove_rec_region (Region *r)
277 ENSURE_GUI_THREAD(bind (mem_fun (*this, &StreamView::remove_rec_region), r));
279 if (!Gtkmm2ext::UI::instance()->caller_is_ui_thread()) {
280 fatal << "region deleted from non-GUI thread!" << endmsg;
284 AudioRegion* ar = dynamic_cast<AudioRegion*> (r);
290 for (list<AudioRegion *>::iterator i = rec_regions.begin(); i != rec_regions.end(); ++i) {
292 rec_regions.erase (i);
299 StreamView::undisplay_diskstream ()
302 for (AudioRegionViewList::iterator i = region_views.begin(); i != region_views.end(); ++i) {
306 for (CrossfadeViewList::iterator i = crossfade_views.begin(); i != crossfade_views.end(); ++i) {
310 region_views.clear();
311 crossfade_views.clear ();
315 StreamView::display_diskstream (AudioDiskstream *ds)
317 playlist_change_connection.disconnect();
318 playlist_changed (ds);
319 playlist_change_connection = ds->PlaylistChanged.connect (bind (mem_fun (*this, &StreamView::playlist_changed), ds));
323 StreamView::playlist_modified ()
325 ENSURE_GUI_THREAD (mem_fun (*this, &StreamView::playlist_modified));
327 /* if the playlist is modified, make sure xfades are on top and all the regionviews are stacked
331 for (AudioRegionViewList::iterator i = region_views.begin(); i != region_views.end(); ++i) {
335 for (list<CrossfadeView *>::iterator i = crossfade_views.begin(); i != crossfade_views.end(); ++i) {
336 (*i)->get_canvas_group()->raise_to_top();
341 StreamView::playlist_changed (AudioDiskstream *ds)
343 ENSURE_GUI_THREAD (bind (mem_fun (*this, &StreamView::playlist_changed), ds));
345 /* disconnect from old playlist */
347 for (vector<sigc::connection>::iterator i = playlist_connections.begin(); i != playlist_connections.end(); ++i) {
351 playlist_connections.clear();
352 undisplay_diskstream ();
356 redisplay_diskstream ();
360 playlist_connections.push_back (ds->playlist()->RegionAdded.connect (mem_fun (*this, &StreamView::add_region_view)));
361 playlist_connections.push_back (ds->playlist()->RegionRemoved.connect (mem_fun (*this, &StreamView::remove_region_view)));
362 playlist_connections.push_back (ds->playlist()->StateChanged.connect (mem_fun (*this, &StreamView::playlist_state_changed)));
363 playlist_connections.push_back (ds->playlist()->Modified.connect (mem_fun (*this, &StreamView::playlist_modified)));
364 playlist_connections.push_back (ds->playlist()->NewCrossfade.connect (mem_fun (*this, &StreamView::add_crossfade)));
368 StreamView::add_crossfade (Crossfade *crossfade)
370 AudioRegionView* lview = 0;
371 AudioRegionView* rview = 0;
373 ENSURE_GUI_THREAD (bind (mem_fun (*this, &StreamView::add_crossfade), crossfade));
375 /* first see if we already have a CrossfadeView for this Crossfade */
377 for (list<CrossfadeView *>::iterator i = crossfade_views.begin(); i != crossfade_views.end(); ++i) {
378 if (&(*i)->crossfade == crossfade) {
379 if (!crossfades_visible) {
384 (*i)->set_valid (true);
389 /* create a new one */
391 for (list<AudioRegionView *>::iterator i = region_views.begin(); i != region_views.end(); ++i) {
392 if (!lview && &((*i)->region) == &crossfade->out()) {
395 if (!rview && &((*i)->region) == &crossfade->in()) {
400 CrossfadeView *cv = new CrossfadeView (_trackview.canvas_display,
407 crossfade->Invalidated.connect (mem_fun (*this, &StreamView::remove_crossfade));
408 crossfade_views.push_back (cv);
410 if (!crossfades_visible) {
416 StreamView::remove_crossfade (Crossfade *xfade)
418 ENSURE_GUI_THREAD (bind (mem_fun (*this, &StreamView::remove_crossfade), xfade));
420 for (list<CrossfadeView*>::iterator i = crossfade_views.begin(); i != crossfade_views.end(); ++i) {
421 if (&(*i)->crossfade == xfade) {
423 crossfade_views.erase (i);
430 StreamView::playlist_state_changed (Change ignored)
432 ENSURE_GUI_THREAD (bind (mem_fun (*this, &StreamView::playlist_state_changed), ignored));
434 redisplay_diskstream ();
438 StreamView::redisplay_diskstream ()
440 list<AudioRegionView *>::iterator i, tmp;
441 list<CrossfadeView*>::iterator xi, tmpx;
444 for (i = region_views.begin(); i != region_views.end(); ++i) {
445 (*i)->set_valid (false);
448 for (xi = crossfade_views.begin(); xi != crossfade_views.end(); ++xi) {
449 (*xi)->set_valid (false);
450 if ((*xi)->visible()) {
455 if (_trackview.is_audio_track()) {
456 _trackview.get_diskstream()->playlist()->foreach_region (this, &StreamView::add_region_view);
457 _trackview.get_diskstream()->playlist()->foreach_crossfade (this, &StreamView::add_crossfade);
460 for (i = region_views.begin(); i != region_views.end(); ) {
464 if (!(*i)->is_valid()) {
466 region_views.erase (i);
472 for (xi = crossfade_views.begin(); xi != crossfade_views.end();) {
476 if (!(*xi)->valid()) {
478 crossfade_views.erase (xi);
484 /* now fix layering */
486 playlist_modified ();
490 StreamView::diskstream_changed (void *src_ignored)
494 if ((at = _trackview.audio_track()) != 0) {
495 AudioDiskstream& ds = at->disk_stream();
496 /* XXX grrr: when will SigC++ allow me to bind references? */
497 Gtkmm2ext::UI::instance()->call_slot (bind (mem_fun (*this, &StreamView::display_diskstream), &ds));
499 Gtkmm2ext::UI::instance()->call_slot (mem_fun (*this, &StreamView::undisplay_diskstream));
504 StreamView::apply_color (Gdk::Color& color, ColorTarget target)
507 list<AudioRegionView *>::iterator i;
511 region_color = color;
512 for (i = region_views.begin(); i != region_views.end(); ++i) {
513 (*i)->set_color (region_color);
515 // stream_base_color = RGBA_TO_UINT (color.red/256, color.green/256, color.blue/256, 255);
516 // gnome_canvas_item_set (canvas_rect, "fill_color_rgba", stream_base_color, NULL);
519 case StreamBaseColor:
520 // stream_base_color = RGBA_TO_UINT (color.red/256, color.green/256, color.blue/256, 255);
521 // gnome_canvas_item_set (canvas_rect, "fill_color_rgba", stream_base_color, NULL);
527 StreamView::set_show_waveforms (bool yn)
529 for (list<AudioRegionView *>::iterator i = region_views.begin(); i != region_views.end(); ++i) {
530 (*i)->set_waveform_visible (yn);
535 StreamView::set_selected_regionviews (AudioRegionSelection& regions)
539 // cerr << _trackview.name() << " (selected = " << regions.size() << ")" << endl;
540 for (list<AudioRegionView*>::iterator i = region_views.begin(); i != region_views.end(); ++i) {
544 for (AudioRegionSelection::iterator ii = regions.begin(); ii != regions.end(); ++ii) {
550 // cerr << "\tregion " << (*i)->region.name() << " selected = " << selected << endl;
551 (*i)->set_selected (selected);
556 StreamView::get_selectables (jack_nframes_t start, jack_nframes_t end, list<Selectable*>& results)
558 for (list<AudioRegionView*>::iterator i = region_views.begin(); i != region_views.end(); ++i) {
559 if ((*i)->region.coverage(start, end) != OverlapNone) {
560 results.push_back (*i);
566 StreamView::get_inverted_selectables (Selection& sel, list<Selectable*>& results)
568 for (list<AudioRegionView*>::iterator i = region_views.begin(); i != region_views.end(); ++i) {
569 if (!sel.audio_regions.contains (*i)) {
570 results.push_back (*i);
576 StreamView::set_waveform_shape (WaveformShape shape)
578 for (AudioRegionViewList::iterator i = region_views.begin(); i != region_views.end(); ++i) {
579 (*i)->set_waveform_shape (shape);
584 StreamView::region_layered (AudioRegionView* rv)
586 rv->get_canvas_group()->lower_to_bottom();
588 /* don't ever leave it at the bottom, since then it doesn't
589 get events - the parent group does instead ...
592 rv->get_canvas_group()->raise (rv->region.layer() + 1);
596 StreamView::rec_enable_changed (void *src)
598 Gtkmm2ext::UI::instance()->call_slot (mem_fun (*this, &StreamView::setup_rec_box));
602 StreamView::sess_rec_enable_changed ()
604 Gtkmm2ext::UI::instance()->call_slot (mem_fun (*this, &StreamView::setup_rec_box));
608 StreamView::transport_changed()
610 Gtkmm2ext::UI::instance()->call_slot (mem_fun (*this, &StreamView::setup_rec_box));
614 StreamView::setup_rec_box ()
616 // cerr << _trackview.name() << " streamview SRB\n";
618 if (_trackview.session().transport_rolling()) {
620 // cerr << "\trolling\n";
623 _trackview.session().record_status() == Session::Recording &&
624 _trackview.get_diskstream()->record_enabled()) {
626 if (_trackview.audio_track()->mode() == Normal && use_rec_regions && rec_regions.size() == rec_rects.size()) {
628 /* add a new region, but don't bother if they set use_rec_regions mid-record */
630 AudioRegion::SourceList sources;
632 for (list<sigc::connection>::iterator prc = peak_ready_connections.begin(); prc != peak_ready_connections.end(); ++prc) {
635 peak_ready_connections.clear();
637 for (uint32_t n=0; n < _trackview.get_diskstream()->n_channels(); ++n) {
638 AudioSource *src = (AudioSource *) _trackview.get_diskstream()->write_source (n);
640 sources.push_back (src);
641 peak_ready_connections.push_back (src->PeakRangeReady.connect (bind (mem_fun (*this, &StreamView::rec_peak_range_ready), src)));
647 jack_nframes_t start = 0;
648 if (rec_regions.size() > 0) {
649 start = rec_regions.back()->start() + _trackview.get_diskstream()->get_captured_frames(rec_regions.size()-1);
652 AudioRegion * region = new AudioRegion(sources, start, 1 , "", 0, (Region::Flag)(Region::DefaultFlags | Region::DoNotSaveState), false);
653 region->set_position (_trackview.session().transport_frame(), this);
654 rec_regions.push_back (region);
655 /* catch it if it goes away */
656 region->GoingAway.connect (mem_fun (*this, &StreamView::remove_rec_region));
658 /* we add the region later */
661 /* start a new rec box */
665 at = _trackview.audio_track(); /* we know what it is already */
666 AudioDiskstream& ds = at->disk_stream();
667 jack_nframes_t frame_pos = ds.current_capture_start ();
668 gdouble xstart = _trackview.editor.frame_to_pixel (frame_pos);
672 switch (_trackview.audio_track()->mode()) {
675 fill_color = color_map[cRecordingRectFill];
680 fill_color = color_map[cRecordingRectFill];
681 /* make the recording rect translucent to allow
682 the user to see the peak data coming in, etc.
684 fill_color = UINT_RGBA_CHANGE_A (fill_color, 120);
688 ArdourCanvas::SimpleRect * rec_rect = new Gnome::Canvas::SimpleRect (*canvas_group);
689 rec_rect->property_x1() = xstart;
690 rec_rect->property_y1() = 1.0;
691 rec_rect->property_x2() = xend;
692 rec_rect->property_y2() = (double) _trackview.height - 1;
693 rec_rect->property_outline_color_rgba() = color_map[cRecordingRectOutline];
694 rec_rect->property_fill_color_rgba() = fill_color;
697 recbox.rectangle = rec_rect;
698 recbox.start = _trackview.session().transport_frame();
701 rec_rects.push_back (recbox);
703 screen_update_connection.disconnect();
704 screen_update_connection = ARDOUR_UI::instance()->SuperRapidScreenUpdate.connect (mem_fun (*this, &StreamView::update_rec_box));
708 } else if (rec_active &&
709 (_trackview.session().record_status() != Session::Recording ||
710 !_trackview.get_diskstream()->record_enabled())) {
712 screen_update_connection.disconnect();
714 rec_updating = false;
720 // cerr << "\tNOT rolling, rec_rects = " << rec_rects.size() << " rec_regions = " << rec_regions.size() << endl;
722 if (!rec_rects.empty() || !rec_regions.empty()) {
724 /* disconnect rapid update */
725 screen_update_connection.disconnect();
727 for (list<sigc::connection>::iterator prc = peak_ready_connections.begin(); prc != peak_ready_connections.end(); ++prc) {
730 peak_ready_connections.clear();
732 rec_updating = false;
734 last_rec_peak_frame = 0;
736 /* remove temp regions */
737 for (list<AudioRegion*>::iterator iter=rec_regions.begin(); iter != rec_regions.end(); )
739 list<AudioRegion*>::iterator tmp;
744 /* this will trigger the remove_region_view */
752 // cerr << "\tclear " << rec_rects.size() << " rec rects\n";
755 /* transport stopped, clear boxes */
756 for (vector<RecBoxInfo>::iterator iter=rec_rects.begin(); iter != rec_rects.end(); ++iter) {
757 RecBoxInfo &rect = (*iter);
758 delete rect.rectangle;
769 StreamView::update_rec_box ()
771 if (rec_active && rec_rects.size() > 0) {
772 /* only update the last box */
773 RecBoxInfo & rect = rec_rects.back();
774 jack_nframes_t at = _trackview.get_diskstream()->current_capture_end();
778 switch (_trackview.audio_track()->mode()) {
780 rect.length = at - rect.start;
781 xstart = _trackview.editor.frame_to_pixel (rect.start);
782 xend = _trackview.editor.frame_to_pixel (at);
787 xstart = _trackview.editor.frame_to_pixel (_trackview.get_diskstream()->current_capture_start());
788 xend = _trackview.editor.frame_to_pixel (at);
792 rect.rectangle->property_x1() = xstart;
793 rect.rectangle->property_x2() = xend;
798 StreamView::find_view (const AudioRegion& region)
800 for (list<AudioRegionView*>::iterator i = region_views.begin(); i != region_views.end(); ++i) {
802 if (&(*i)->region == ®ion) {
810 StreamView::foreach_regionview (sigc::slot<void,AudioRegionView*> slot)
812 for (list<AudioRegionView*>::iterator i = region_views.begin(); i != region_views.end(); ++i) {
818 StreamView::foreach_crossfadeview (void (CrossfadeView::*pmf)(void))
820 for (list<CrossfadeView*>::iterator i = crossfade_views.begin(); i != crossfade_views.end(); ++i) {
826 StreamView::rec_peak_range_ready (jack_nframes_t start, jack_nframes_t cnt, Source * src)
828 // this is called from the peak building thread
830 ENSURE_GUI_THREAD(bind (mem_fun (*this, &StreamView::rec_peak_range_ready), start, cnt, src));
832 if (rec_peak_ready_map.size() == 0 || start+cnt > last_rec_peak_frame) {
833 last_rec_peak_frame = start + cnt;
836 rec_peak_ready_map[src] = true;
838 if (rec_peak_ready_map.size() == _trackview.get_diskstream()->n_channels()) {
839 this->update_rec_regions ();
840 rec_peak_ready_map.clear();
845 StreamView::update_rec_regions ()
847 if (use_rec_regions) {
851 for (list<AudioRegion*>::iterator iter = rec_regions.begin(); iter != rec_regions.end(); n++) {
853 list<AudioRegion*>::iterator tmp;
858 if (!canvas_item_visible (rec_rects[n].rectangle)) {
859 /* rect already hidden, this region is done */
864 AudioRegion * region = (*iter);
865 jack_nframes_t origlen = region->length();
867 if (region == rec_regions.back() && rec_active) {
869 if (last_rec_peak_frame > region->start()) {
871 jack_nframes_t nlen = last_rec_peak_frame - region->start();
873 if (nlen != region->length()) {
876 region->set_position (_trackview.get_diskstream()->get_capture_start_frame(n), this);
877 region->set_length (nlen, this);
878 region->thaw ("updated");
881 /* our special initial length */
882 add_region_view_internal (region, false);
885 /* also update rect */
886 ArdourCanvas::SimpleRect * rect = rec_rects[n].rectangle;
887 gdouble xend = _trackview.editor.frame_to_pixel (region->position() + region->length());
888 rect->property_x2() = xend;
894 jack_nframes_t nlen = _trackview.get_diskstream()->get_captured_frames(n);
896 if (nlen != region->length()) {
898 if (region->source(0).length() >= region->start() + nlen) {
901 region->set_position (_trackview.get_diskstream()->get_capture_start_frame(n), this);
902 region->set_length (nlen, this);
903 region->thaw ("updated");
906 /* our special initial length */
907 add_region_view_internal (region, false);
911 ArdourCanvas::Item * rect = rec_rects[n].rectangle;
924 StreamView::show_all_xfades ()
926 foreach_crossfadeview (&CrossfadeView::show);
927 crossfades_visible = true;
931 StreamView::hide_all_xfades ()
933 foreach_crossfadeview (&CrossfadeView::hide);
934 crossfades_visible = false;
938 StreamView::hide_xfades_involving (AudioRegionView& rv)
940 for (list<CrossfadeView *>::iterator i = crossfade_views.begin(); i != crossfade_views.end(); ++i) {
941 if ((*i)->crossfade.involves (rv.region)) {
948 StreamView::reveal_xfades_involving (AudioRegionView& rv)
950 for (list<CrossfadeView *>::iterator i = crossfade_views.begin(); i != crossfade_views.end(); ++i) {
951 if ((*i)->crossfade.involves (rv.region) && (*i)->visible()) {
958 StreamView::color_handler (ColorID id, uint32_t val)
961 case cAudioTrackBase:
962 if (_trackview.is_audio_track()) {
963 canvas_rect->property_fill_color_rgba() = val;
967 if (!_trackview.is_audio_track()) {
968 canvas_rect->property_fill_color_rgba() = val;
971 case cAudioTrackOutline:
972 canvas_rect->property_outline_color_rgba() = val;