5 #include <gtkmm2ext/gtk_ui.h>
7 #include <ardour/audioplaylist.h>
8 #include <ardour/audioregion.h>
9 #include <ardour/diskstream.h>
10 #include <ardour/audio_track.h>
11 #include <ardour/playlist_templates.h>
12 #include <ardour/source.h>
14 #include "streamview.h"
15 #include "regionview.h"
16 #include "taperegionview.h"
17 #include "audio_time_axis.h"
18 #include "canvas-waveview.h"
19 #include "canvas-simplerect.h"
20 #include "region_selection.h"
21 #include "selection.h"
22 #include "public_editor.h"
23 #include "ardour_ui.h"
24 #include "crossfade_view.h"
25 #include "rgb_macros.h"
26 #include "gui_thread.h"
30 using namespace ARDOUR;
31 using namespace Editing;
33 StreamView::StreamView (AudioTimeAxisView& tv)
36 region_color = _trackview.color();
37 crossfades_visible = true;
39 if (tv.is_audio_track()) {
41 //stream_base_color = RGBA_TO_UINT (222,223,218,255);
42 stream_base_color = color_map[cAudioTrackBase];
45 //stream_base_color = RGBA_TO_UINT (230,226,238,255);
46 stream_base_color = color_map[cAudioBusBase];
49 /* set_position() will position the group */
51 canvas_group = new ArdourCanvas::Group(*_trackview.canvas_display);
53 canvas_rect = new ArdourCanvas::SimpleRect (*canvas_group);
54 canvas_rect->property_x1() = 0.0;
55 canvas_rect->property_y1() = 0.0;
56 canvas_rect->property_x2() = 1000000.0;
57 canvas_rect->property_y2() = (double) tv.height;
58 canvas_rect->property_outline_color_rgba() = color_map[cAudioTrackOutline];
59 canvas_rect->property_outline_what() = (guint32) (0x1|0x2|0x8); // outline ends and bottom
60 canvas_rect->property_fill_color_rgba() = stream_base_color;
62 canvas_rect->signal_event().connect (bind (mem_fun (_trackview.editor, &PublicEditor::canvas_stream_view_event), canvas_rect, &_trackview));
64 _samples_per_unit = _trackview.editor.get_current_zoom();
65 _amplitude_above_axis = 1.0;
67 if (_trackview.is_audio_track()) {
68 _trackview.audio_track()->diskstream_changed.connect (mem_fun (*this, &StreamView::diskstream_changed));
69 _trackview.session().TransportStateChange.connect (mem_fun (*this, &StreamView::transport_changed));
70 _trackview.get_diskstream()->record_enable_changed.connect (mem_fun (*this, &StreamView::rec_enable_changed));
71 _trackview.session().RecordStateChanged.connect (mem_fun (*this, &StreamView::sess_rec_enable_changed));
76 use_rec_regions = tv.editor.show_waveforms_recording ();
77 last_rec_peak_frame = 0;
79 ColorChanged.connect (mem_fun (*this, &StreamView::color_handler));
82 StreamView::~StreamView ()
84 undisplay_diskstream ();
91 if (_trackview.is_audio_track()) {
92 display_diskstream (_trackview.get_diskstream());
97 StreamView::set_position (gdouble x, gdouble y)
100 canvas_group->property_x() = x;
101 canvas_group->property_y() = y;
106 StreamView::set_height (gdouble h)
108 /* limit the values to something sane-ish */
110 if (h < 10.0 || h > 1000.0) {
114 canvas_rect->property_y2() = h;
116 for (AudioRegionViewList::iterator i = region_views.begin(); i != region_views.end(); ++i) {
117 (*i)->set_height (h);
120 for (CrossfadeViewList::iterator i = crossfade_views.begin(); i != crossfade_views.end(); ++i) {
121 (*i)->set_height (h);
124 for (vector<RecBoxInfo>::iterator i = rec_rects.begin(); i != rec_rects.end(); ++i) {
125 RecBoxInfo &recbox = (*i);
126 recbox.rectangle->property_y2() = h - 1.0;
133 StreamView::set_samples_per_unit (gdouble spp)
135 AudioRegionViewList::iterator i;
141 _samples_per_unit = spp;
143 for (i = region_views.begin(); i != region_views.end(); ++i) {
144 (*i)->set_samples_per_unit (spp);
147 for (CrossfadeViewList::iterator xi = crossfade_views.begin(); xi != crossfade_views.end(); ++xi) {
148 (*xi)->set_samples_per_unit (spp);
151 for (vector<RecBoxInfo>::iterator xi = rec_rects.begin(); xi != rec_rects.end(); ++xi) {
152 RecBoxInfo &recbox = (*xi);
154 gdouble xstart = _trackview.editor.frame_to_pixel ( recbox.start );
155 gdouble xend = _trackview.editor.frame_to_pixel ( recbox.start + recbox.length );
157 recbox.rectangle->property_x1() = xstart;
158 recbox.rectangle->property_x2() = xend;
165 StreamView::set_amplitude_above_axis (gdouble app)
168 AudioRegionViewList::iterator i;
174 _amplitude_above_axis = app;
176 for (i = region_views.begin(); i != region_views.end(); ++i) {
177 (*i)->set_amplitude_above_axis (app);
184 StreamView::add_region_view (Region *r)
186 add_region_view_internal (r, true);
190 StreamView::add_region_view_internal (Region *r, bool wait_for_waves)
192 ENSURE_GUI_THREAD (bind (mem_fun (*this, &StreamView::add_region_view), r));
194 AudioRegion* region = dynamic_cast<AudioRegion*> (r);
200 AudioRegionView *region_view;
201 list<AudioRegionView *>::iterator i;
203 for (i = region_views.begin(); i != region_views.end(); ++i) {
204 if (&(*i)->region == region) {
206 /* great. we already have a AudioRegionView for this Region. use it again.
209 (*i)->set_valid (true);
214 switch (_trackview.audio_track()->mode()) {
216 region_view = new AudioRegionView (canvas_group, _trackview, *region,
217 _samples_per_unit, region_color);
220 region_view = new TapeAudioRegionView (canvas_group, _trackview, *region,
221 _samples_per_unit, region_color);
225 region_view->init (_amplitude_above_axis, region_color, wait_for_waves);
226 region_views.push_front (region_view);
228 /* follow global waveform setting */
230 region_view->set_waveform_visible(_trackview.editor.show_waveforms());
232 /* catch regionview going away */
234 region->GoingAway.connect (mem_fun (*this, &StreamView::remove_region_view));
236 AudioRegionViewAdded (region_view);
240 StreamView::remove_region_view (Region *r)
242 ENSURE_GUI_THREAD (bind (mem_fun (*this, &StreamView::remove_region_view), r));
244 AudioRegion* ar = dynamic_cast<AudioRegion*> (r);
250 for (list<AudioRegionView *>::iterator i = region_views.begin(); i != region_views.end(); ++i) {
251 if (&((*i)->region) == ar) {
253 region_views.erase (i);
258 for (list<CrossfadeView *>::iterator i = crossfade_views.begin(); i != crossfade_views.end();) {
259 list<CrossfadeView*>::iterator tmp;
264 if ((*i)->crossfade.involves (*ar)) {
266 crossfade_views.erase (i);
274 StreamView::remove_rec_region (Region *r)
276 ENSURE_GUI_THREAD(bind (mem_fun (*this, &StreamView::remove_rec_region), r));
278 if (!Gtkmm2ext::UI::instance()->caller_is_gui_thread()) {
279 fatal << "region deleted from non-GUI thread!" << endmsg;
283 AudioRegion* ar = dynamic_cast<AudioRegion*> (r);
289 for (list<AudioRegion *>::iterator i = rec_regions.begin(); i != rec_regions.end(); ++i) {
291 rec_regions.erase (i);
298 StreamView::undisplay_diskstream ()
301 for (AudioRegionViewList::iterator i = region_views.begin(); i != region_views.end(); ++i) {
305 for (CrossfadeViewList::iterator i = crossfade_views.begin(); i != crossfade_views.end(); ++i) {
309 region_views.clear();
310 crossfade_views.clear ();
314 StreamView::display_diskstream (DiskStream *ds)
316 playlist_change_connection.disconnect();
317 playlist_changed (ds);
318 playlist_change_connection = ds->PlaylistChanged.connect (bind (mem_fun (*this, &StreamView::playlist_changed), ds));
322 StreamView::playlist_modified ()
324 ENSURE_GUI_THREAD (mem_fun (*this, &StreamView::playlist_modified));
326 /* if the playlist is modified, make sure xfades are on top and all the regionviews are stacked
330 for (AudioRegionViewList::iterator i = region_views.begin(); i != region_views.end(); ++i) {
334 for (list<CrossfadeView *>::iterator i = crossfade_views.begin(); i != crossfade_views.end(); ++i) {
335 (*i)->get_canvas_group()->raise_to_top();
340 StreamView::playlist_changed (DiskStream *ds)
342 ENSURE_GUI_THREAD (bind (mem_fun (*this, &StreamView::playlist_changed), ds));
344 /* disconnect from old playlist */
346 for (vector<sigc::connection>::iterator i = playlist_connections.begin(); i != playlist_connections.end(); ++i) {
350 playlist_connections.clear();
351 undisplay_diskstream ();
355 redisplay_diskstream ();
359 playlist_connections.push_back (ds->playlist()->RegionAdded.connect (mem_fun (*this, &StreamView::add_region_view)));
360 playlist_connections.push_back (ds->playlist()->RegionRemoved.connect (mem_fun (*this, &StreamView::remove_region_view)));
361 playlist_connections.push_back (ds->playlist()->StateChanged.connect (mem_fun (*this, &StreamView::playlist_state_changed)));
362 playlist_connections.push_back (ds->playlist()->Modified.connect (mem_fun (*this, &StreamView::playlist_modified)));
363 playlist_connections.push_back (ds->playlist()->NewCrossfade.connect (mem_fun (*this, &StreamView::add_crossfade)));
367 StreamView::add_crossfade (Crossfade *crossfade)
369 AudioRegionView* lview = 0;
370 AudioRegionView* rview = 0;
372 ENSURE_GUI_THREAD (bind (mem_fun (*this, &StreamView::add_crossfade), crossfade));
374 /* first see if we already have a CrossfadeView for this Crossfade */
376 for (list<CrossfadeView *>::iterator i = crossfade_views.begin(); i != crossfade_views.end(); ++i) {
377 if (&(*i)->crossfade == crossfade) {
378 if (!crossfades_visible) {
383 (*i)->set_valid (true);
388 /* create a new one */
390 for (list<AudioRegionView *>::iterator i = region_views.begin(); i != region_views.end(); ++i) {
391 if (!lview && &((*i)->region) == &crossfade->out()) {
394 if (!rview && &((*i)->region) == &crossfade->in()) {
399 CrossfadeView *cv = new CrossfadeView (_trackview.canvas_display,
406 crossfade->Invalidated.connect (mem_fun (*this, &StreamView::remove_crossfade));
407 crossfade_views.push_back (cv);
409 if (!crossfades_visible) {
415 StreamView::remove_crossfade (Crossfade *xfade)
417 ENSURE_GUI_THREAD (bind (mem_fun (*this, &StreamView::remove_crossfade), xfade));
419 for (list<CrossfadeView*>::iterator i = crossfade_views.begin(); i != crossfade_views.end(); ++i) {
420 if (&(*i)->crossfade == xfade) {
422 crossfade_views.erase (i);
429 StreamView::playlist_state_changed (Change ignored)
431 ENSURE_GUI_THREAD (bind (mem_fun (*this, &StreamView::playlist_state_changed), ignored));
433 redisplay_diskstream ();
437 StreamView::redisplay_diskstream ()
439 list<AudioRegionView *>::iterator i, tmp;
440 list<CrossfadeView*>::iterator xi, tmpx;
443 for (i = region_views.begin(); i != region_views.end(); ++i) {
444 (*i)->set_valid (false);
447 for (xi = crossfade_views.begin(); xi != crossfade_views.end(); ++xi) {
448 (*xi)->set_valid (false);
449 if ((*xi)->visible()) {
454 if (_trackview.is_audio_track()) {
455 _trackview.get_diskstream()->playlist()->foreach_region (this, &StreamView::add_region_view);
456 _trackview.get_diskstream()->playlist()->foreach_crossfade (this, &StreamView::add_crossfade);
459 for (i = region_views.begin(); i != region_views.end(); ) {
463 if (!(*i)->is_valid()) {
465 region_views.erase (i);
471 for (xi = crossfade_views.begin(); xi != crossfade_views.end();) {
475 if (!(*xi)->valid()) {
477 crossfade_views.erase (xi);
483 /* now fix layering */
485 playlist_modified ();
489 StreamView::diskstream_changed (void *src_ignored)
493 if ((at = _trackview.audio_track()) != 0) {
494 DiskStream& ds = at->disk_stream();
495 /* XXX grrr: when will SigC++ allow me to bind references? */
496 Gtkmm2ext::UI::instance()->call_slot (bind (mem_fun (*this, &StreamView::display_diskstream), &ds));
498 Gtkmm2ext::UI::instance()->call_slot (mem_fun (*this, &StreamView::undisplay_diskstream));
503 StreamView::apply_color (Gdk::Color& color, ColorTarget target)
506 list<AudioRegionView *>::iterator i;
510 region_color = color;
511 for (i = region_views.begin(); i != region_views.end(); ++i) {
512 (*i)->set_color (region_color);
514 // stream_base_color = RGBA_TO_UINT (color.red/256, color.green/256, color.blue/256, 255);
515 // gnome_canvas_item_set (canvas_rect, "fill_color_rgba", stream_base_color, NULL);
518 case StreamBaseColor:
519 // stream_base_color = RGBA_TO_UINT (color.red/256, color.green/256, color.blue/256, 255);
520 // gnome_canvas_item_set (canvas_rect, "fill_color_rgba", stream_base_color, NULL);
526 StreamView::set_show_waveforms (bool yn)
528 for (list<AudioRegionView *>::iterator i = region_views.begin(); i != region_views.end(); ++i) {
529 (*i)->set_waveform_visible (yn);
534 StreamView::set_selected_regionviews (AudioRegionSelection& regions)
538 // cerr << _trackview.name() << " (selected = " << regions.size() << ")" << endl;
539 for (list<AudioRegionView*>::iterator i = region_views.begin(); i != region_views.end(); ++i) {
543 for (AudioRegionSelection::iterator ii = regions.begin(); ii != regions.end(); ++ii) {
549 // cerr << "\tregion " << (*i)->region.name() << " selected = " << selected << endl;
550 (*i)->set_selected (selected, this);
555 StreamView::get_selectables (jack_nframes_t start, jack_nframes_t end, list<Selectable*>& results)
557 for (list<AudioRegionView*>::iterator i = region_views.begin(); i != region_views.end(); ++i) {
558 if ((*i)->region.coverage(start, end) != OverlapNone) {
559 results.push_back (*i);
565 StreamView::get_inverted_selectables (Selection& sel, list<Selectable*>& results)
567 for (list<AudioRegionView*>::iterator i = region_views.begin(); i != region_views.end(); ++i) {
568 if (!sel.audio_regions.contains (*i)) {
569 results.push_back (*i);
575 StreamView::set_waveform_shape (WaveformShape shape)
577 for (AudioRegionViewList::iterator i = region_views.begin(); i != region_views.end(); ++i) {
578 (*i)->set_waveform_shape (shape);
583 StreamView::region_layered (AudioRegionView* rv)
585 rv->get_canvas_group()->lower_to_bottom();
587 /* don't ever leave it at the bottom, since then it doesn't
588 get events - the parent group does instead ...
591 rv->get_canvas_group()->raise (rv->region.layer() + 1);
595 StreamView::rec_enable_changed (void *src)
597 Gtkmm2ext::UI::instance()->call_slot (mem_fun (*this, &StreamView::setup_rec_box));
601 StreamView::sess_rec_enable_changed ()
603 Gtkmm2ext::UI::instance()->call_slot (mem_fun (*this, &StreamView::setup_rec_box));
607 StreamView::transport_changed()
609 Gtkmm2ext::UI::instance()->call_slot (mem_fun (*this, &StreamView::setup_rec_box));
613 StreamView::setup_rec_box ()
615 // cerr << _trackview.name() << " streamview SRB\n";
617 if (_trackview.session().transport_rolling()) {
619 // cerr << "\trolling\n";
622 _trackview.session().record_status() == Session::Recording &&
623 _trackview.get_diskstream()->record_enabled()) {
625 if (_trackview.audio_track()->mode() == Normal && use_rec_regions && rec_regions.size() == rec_rects.size()) {
627 /* add a new region, but don't bother if they set use_rec_regions mid-record */
629 AudioRegion::SourceList sources;
631 for (list<sigc::connection>::iterator prc = peak_ready_connections.begin(); prc != peak_ready_connections.end(); ++prc) {
634 peak_ready_connections.clear();
636 for (uint32_t n=0; n < _trackview.get_diskstream()->n_channels(); ++n) {
637 Source *src = (Source *) _trackview.get_diskstream()->write_source (n);
639 sources.push_back (src);
640 peak_ready_connections.push_back (src->PeakRangeReady.connect (bind (mem_fun (*this, &StreamView::rec_peak_range_ready), src)));
646 jack_nframes_t start = 0;
647 if (rec_regions.size() > 0) {
648 start = rec_regions.back()->start() + _trackview.get_diskstream()->get_captured_frames(rec_regions.size()-1);
651 AudioRegion * region = new AudioRegion(sources, start, 1 , "", 0, (Region::Flag)(Region::DefaultFlags | Region::DoNotSaveState), false);
652 region->set_position (_trackview.session().transport_frame(), this);
653 rec_regions.push_back (region);
654 /* catch it if it goes away */
655 region->GoingAway.connect (mem_fun (*this, &StreamView::remove_rec_region));
657 /* we add the region later */
660 /* start a new rec box */
664 at = _trackview.audio_track(); /* we know what it is already */
665 DiskStream& ds = at->disk_stream();
666 jack_nframes_t frame_pos = ds.current_capture_start ();
667 gdouble xstart = _trackview.editor.frame_to_pixel (frame_pos);
671 switch (_trackview.audio_track()->mode()) {
674 fill_color = color_map[cRecordingRectFill];
679 fill_color = color_map[cRecordingRectFill];
680 /* make the recording rect translucent to allow
681 the user to see the peak data coming in, etc.
683 fill_color = UINT_RGBA_CHANGE_A (fill_color, 120);
687 ArdourCanvas::SimpleRect * rec_rect = new Gnome::Canvas::SimpleRect (*canvas_group);
688 rec_rect->property_x1() = xstart;
689 rec_rect->property_y1() = 1.0;
690 rec_rect->property_x2() = xend;
691 rec_rect->property_y2() = (double) _trackview.height - 1;
692 rec_rect->property_outline_color_rgba() = color_map[cRecordingRectOutline];
693 rec_rect->property_fill_color_rgba() = fill_color;
696 recbox.rectangle = rec_rect;
697 recbox.start = _trackview.session().transport_frame();
700 rec_rects.push_back (recbox);
702 screen_update_connection.disconnect();
703 screen_update_connection = ARDOUR_UI::instance()->SuperRapidScreenUpdate.connect (mem_fun (*this, &StreamView::update_rec_box));
707 } else if (rec_active &&
708 (_trackview.session().record_status() != Session::Recording ||
709 !_trackview.get_diskstream()->record_enabled())) {
711 screen_update_connection.disconnect();
713 rec_updating = false;
719 // cerr << "\tNOT rolling, rec_rects = " << rec_rects.size() << " rec_regions = " << rec_regions.size() << endl;
721 if (!rec_rects.empty() || !rec_regions.empty()) {
723 /* disconnect rapid update */
724 screen_update_connection.disconnect();
726 for (list<sigc::connection>::iterator prc = peak_ready_connections.begin(); prc != peak_ready_connections.end(); ++prc) {
729 peak_ready_connections.clear();
731 rec_updating = false;
733 last_rec_peak_frame = 0;
735 /* remove temp regions */
736 for (list<AudioRegion*>::iterator iter=rec_regions.begin(); iter != rec_regions.end(); )
738 list<AudioRegion*>::iterator tmp;
743 /* this will trigger the remove_region_view */
751 // cerr << "\tclear " << rec_rects.size() << " rec rects\n";
754 /* transport stopped, clear boxes */
755 for (vector<RecBoxInfo>::iterator iter=rec_rects.begin(); iter != rec_rects.end(); ++iter) {
756 RecBoxInfo &rect = (*iter);
757 delete rect.rectangle;
768 StreamView::update_rec_box ()
770 if (rec_active && rec_rects.size() > 0) {
771 /* only update the last box */
772 RecBoxInfo & rect = rec_rects.back();
773 jack_nframes_t at = _trackview.get_diskstream()->current_capture_end();
777 switch (_trackview.audio_track()->mode()) {
779 rect.length = at - rect.start;
780 xstart = _trackview.editor.frame_to_pixel (rect.start);
781 xend = _trackview.editor.frame_to_pixel (at);
786 xstart = _trackview.editor.frame_to_pixel (_trackview.get_diskstream()->current_capture_start());
787 xend = _trackview.editor.frame_to_pixel (at);
791 rect.rectangle->property_x1() = xstart;
792 rect.rectangle->property_x2() = xend;
797 StreamView::find_view (const AudioRegion& region)
799 for (list<AudioRegionView*>::iterator i = region_views.begin(); i != region_views.end(); ++i) {
801 if (&(*i)->region == ®ion) {
809 StreamView::foreach_regionview (sigc::slot<void,AudioRegionView*> slot)
811 for (list<AudioRegionView*>::iterator i = region_views.begin(); i != region_views.end(); ++i) {
817 StreamView::foreach_crossfadeview (void (CrossfadeView::*pmf)(void))
819 for (list<CrossfadeView*>::iterator i = crossfade_views.begin(); i != crossfade_views.end(); ++i) {
825 StreamView::rec_peak_range_ready (jack_nframes_t start, jack_nframes_t cnt, Source * src)
827 // this is called from the peak building thread
829 ENSURE_GUI_THREAD(bind (mem_fun (*this, &StreamView::rec_peak_range_ready), start, cnt, src));
831 if (rec_peak_ready_map.size() == 0 || start+cnt > last_rec_peak_frame) {
832 last_rec_peak_frame = start + cnt;
835 rec_peak_ready_map[src] = true;
837 if (rec_peak_ready_map.size() == _trackview.get_diskstream()->n_channels()) {
838 this->update_rec_regions ();
839 rec_peak_ready_map.clear();
844 StreamView::update_rec_regions ()
846 if (use_rec_regions) {
850 for (list<AudioRegion*>::iterator iter = rec_regions.begin(); iter != rec_regions.end(); n++) {
852 list<AudioRegion*>::iterator tmp;
857 if (!canvas_item_visible (rec_rects[n].rectangle)) {
858 /* rect already hidden, this region is done */
863 AudioRegion * region = (*iter);
864 jack_nframes_t origlen = region->length();
866 if (region == rec_regions.back() && rec_active) {
868 if (last_rec_peak_frame > region->start()) {
870 jack_nframes_t nlen = last_rec_peak_frame - region->start();
872 if (nlen != region->length()) {
875 region->set_position (_trackview.get_diskstream()->get_capture_start_frame(n), this);
876 region->set_length (nlen, this);
877 region->thaw ("updated");
880 /* our special initial length */
881 add_region_view_internal (region, false);
884 /* also update rect */
885 ArdourCanvas::SimpleRect * rect = rec_rects[n].rectangle;
886 gdouble xend = _trackview.editor.frame_to_pixel (region->position() + region->length());
887 rect->property_x2() = xend;
893 jack_nframes_t nlen = _trackview.get_diskstream()->get_captured_frames(n);
895 if (nlen != region->length()) {
897 if (region->source(0).length() >= region->start() + nlen) {
900 region->set_position (_trackview.get_diskstream()->get_capture_start_frame(n), this);
901 region->set_length (nlen, this);
902 region->thaw ("updated");
905 /* our special initial length */
906 add_region_view_internal (region, false);
910 ArdourCanvas::Item * rect = rec_rects[n].rectangle;
923 StreamView::show_all_xfades ()
925 foreach_crossfadeview (&CrossfadeView::show);
926 crossfades_visible = true;
930 StreamView::hide_all_xfades ()
932 foreach_crossfadeview (&CrossfadeView::hide);
933 crossfades_visible = false;
937 StreamView::hide_xfades_involving (AudioRegionView& rv)
939 for (list<CrossfadeView *>::iterator i = crossfade_views.begin(); i != crossfade_views.end(); ++i) {
940 if ((*i)->crossfade.involves (rv.region)) {
947 StreamView::reveal_xfades_involving (AudioRegionView& rv)
949 for (list<CrossfadeView *>::iterator i = crossfade_views.begin(); i != crossfade_views.end(); ++i) {
950 if ((*i)->crossfade.involves (rv.region) && (*i)->visible()) {
957 StreamView::color_handler (ColorID id, uint32_t val)
960 case cAudioTrackBase:
961 if (_trackview.is_audio_track()) {
962 canvas_rect->property_fill_color_rgba() = val;
966 if (!_trackview.is_audio_track()) {
967 canvas_rect->property_fill_color_rgba() = val;
970 case cAudioTrackOutline:
971 canvas_rect->property_outline_color_rgba() = val;