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 AudioPlaylist* apl = dynamic_cast<AudioPlaylist*>(ds->playlist());
367 playlist_connections.push_back (apl->NewCrossfade.connect (mem_fun (*this, &StreamView::add_crossfade)));
371 StreamView::add_crossfade (Crossfade *crossfade)
373 AudioRegionView* lview = 0;
374 AudioRegionView* rview = 0;
376 ENSURE_GUI_THREAD (bind (mem_fun (*this, &StreamView::add_crossfade), crossfade));
378 /* first see if we already have a CrossfadeView for this Crossfade */
380 for (list<CrossfadeView *>::iterator i = crossfade_views.begin(); i != crossfade_views.end(); ++i) {
381 if (&(*i)->crossfade == crossfade) {
382 if (!crossfades_visible) {
387 (*i)->set_valid (true);
392 /* create a new one */
394 for (list<AudioRegionView *>::iterator i = region_views.begin(); i != region_views.end(); ++i) {
395 if (!lview && &((*i)->region) == &crossfade->out()) {
398 if (!rview && &((*i)->region) == &crossfade->in()) {
403 CrossfadeView *cv = new CrossfadeView (_trackview.canvas_display,
410 crossfade->Invalidated.connect (mem_fun (*this, &StreamView::remove_crossfade));
411 crossfade_views.push_back (cv);
413 if (!crossfades_visible) {
419 StreamView::remove_crossfade (Crossfade *xfade)
421 ENSURE_GUI_THREAD (bind (mem_fun (*this, &StreamView::remove_crossfade), xfade));
423 for (list<CrossfadeView*>::iterator i = crossfade_views.begin(); i != crossfade_views.end(); ++i) {
424 if (&(*i)->crossfade == xfade) {
426 crossfade_views.erase (i);
433 StreamView::playlist_state_changed (Change ignored)
435 ENSURE_GUI_THREAD (bind (mem_fun (*this, &StreamView::playlist_state_changed), ignored));
437 redisplay_diskstream ();
441 StreamView::redisplay_diskstream ()
443 list<AudioRegionView *>::iterator i, tmp;
444 list<CrossfadeView*>::iterator xi, tmpx;
447 for (i = region_views.begin(); i != region_views.end(); ++i) {
448 (*i)->set_valid (false);
451 for (xi = crossfade_views.begin(); xi != crossfade_views.end(); ++xi) {
452 (*xi)->set_valid (false);
453 if ((*xi)->visible()) {
458 if (_trackview.is_audio_track()) {
459 _trackview.get_diskstream()->playlist()->foreach_region (this, &StreamView::add_region_view);
460 AudioPlaylist* apl = dynamic_cast<AudioPlaylist*>(_trackview.get_diskstream()->playlist());
462 apl->foreach_crossfade (this, &StreamView::add_crossfade);
465 for (i = region_views.begin(); i != region_views.end(); ) {
469 if (!(*i)->is_valid()) {
471 region_views.erase (i);
477 for (xi = crossfade_views.begin(); xi != crossfade_views.end();) {
481 if (!(*xi)->valid()) {
483 crossfade_views.erase (xi);
489 /* now fix layering */
491 playlist_modified ();
495 StreamView::diskstream_changed (void *src_ignored)
499 if ((at = _trackview.audio_track()) != 0) {
500 AudioDiskstream& ds = at->disk_stream();
501 /* XXX grrr: when will SigC++ allow me to bind references? */
502 Gtkmm2ext::UI::instance()->call_slot (bind (mem_fun (*this, &StreamView::display_diskstream), &ds));
504 Gtkmm2ext::UI::instance()->call_slot (mem_fun (*this, &StreamView::undisplay_diskstream));
509 StreamView::apply_color (Gdk::Color& color, ColorTarget target)
512 list<AudioRegionView *>::iterator i;
516 region_color = color;
517 for (i = region_views.begin(); i != region_views.end(); ++i) {
518 (*i)->set_color (region_color);
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);
524 case StreamBaseColor:
525 // stream_base_color = RGBA_TO_UINT (color.red/256, color.green/256, color.blue/256, 255);
526 // gnome_canvas_item_set (canvas_rect, "fill_color_rgba", stream_base_color, NULL);
532 StreamView::set_show_waveforms (bool yn)
534 for (list<AudioRegionView *>::iterator i = region_views.begin(); i != region_views.end(); ++i) {
535 (*i)->set_waveform_visible (yn);
540 StreamView::set_selected_regionviews (AudioRegionSelection& regions)
544 // cerr << _trackview.name() << " (selected = " << regions.size() << ")" << endl;
545 for (list<AudioRegionView*>::iterator i = region_views.begin(); i != region_views.end(); ++i) {
549 for (AudioRegionSelection::iterator ii = regions.begin(); ii != regions.end(); ++ii) {
555 // cerr << "\tregion " << (*i)->region.name() << " selected = " << selected << endl;
556 (*i)->set_selected (selected);
561 StreamView::get_selectables (jack_nframes_t start, jack_nframes_t end, list<Selectable*>& results)
563 for (list<AudioRegionView*>::iterator i = region_views.begin(); i != region_views.end(); ++i) {
564 if ((*i)->region.coverage(start, end) != OverlapNone) {
565 results.push_back (*i);
571 StreamView::get_inverted_selectables (Selection& sel, list<Selectable*>& results)
573 for (list<AudioRegionView*>::iterator i = region_views.begin(); i != region_views.end(); ++i) {
574 if (!sel.audio_regions.contains (*i)) {
575 results.push_back (*i);
581 StreamView::set_waveform_shape (WaveformShape shape)
583 for (AudioRegionViewList::iterator i = region_views.begin(); i != region_views.end(); ++i) {
584 (*i)->set_waveform_shape (shape);
589 StreamView::region_layered (AudioRegionView* rv)
591 rv->get_canvas_group()->lower_to_bottom();
593 /* don't ever leave it at the bottom, since then it doesn't
594 get events - the parent group does instead ...
597 rv->get_canvas_group()->raise (rv->region.layer() + 1);
601 StreamView::rec_enable_changed (void *src)
603 Gtkmm2ext::UI::instance()->call_slot (mem_fun (*this, &StreamView::setup_rec_box));
607 StreamView::sess_rec_enable_changed ()
609 Gtkmm2ext::UI::instance()->call_slot (mem_fun (*this, &StreamView::setup_rec_box));
613 StreamView::transport_changed()
615 Gtkmm2ext::UI::instance()->call_slot (mem_fun (*this, &StreamView::setup_rec_box));
619 StreamView::setup_rec_box ()
621 // cerr << _trackview.name() << " streamview SRB\n";
623 if (_trackview.session().transport_rolling()) {
625 // cerr << "\trolling\n";
628 _trackview.session().record_status() == Session::Recording &&
629 _trackview.get_diskstream()->record_enabled()) {
631 if (_trackview.audio_track()->mode() == Normal && use_rec_regions && rec_regions.size() == rec_rects.size()) {
633 /* add a new region, but don't bother if they set use_rec_regions mid-record */
635 AudioRegion::SourceList sources;
637 for (list<sigc::connection>::iterator prc = peak_ready_connections.begin(); prc != peak_ready_connections.end(); ++prc) {
640 peak_ready_connections.clear();
642 for (uint32_t n=0; n < _trackview.get_diskstream()->n_channels(); ++n) {
643 AudioSource *src = (AudioSource *) _trackview.get_diskstream()->write_source (n);
645 sources.push_back (src);
646 peak_ready_connections.push_back (src->PeakRangeReady.connect (bind (mem_fun (*this, &StreamView::rec_peak_range_ready), src)));
652 jack_nframes_t start = 0;
653 if (rec_regions.size() > 0) {
654 start = rec_regions.back()->start() + _trackview.get_diskstream()->get_captured_frames(rec_regions.size()-1);
657 AudioRegion * region = new AudioRegion(sources, start, 1 , "", 0, (Region::Flag)(Region::DefaultFlags | Region::DoNotSaveState), false);
658 region->set_position (_trackview.session().transport_frame(), this);
659 rec_regions.push_back (region);
660 /* catch it if it goes away */
661 region->GoingAway.connect (mem_fun (*this, &StreamView::remove_rec_region));
663 /* we add the region later */
666 /* start a new rec box */
670 at = _trackview.audio_track(); /* we know what it is already */
671 AudioDiskstream& ds = at->disk_stream();
672 jack_nframes_t frame_pos = ds.current_capture_start ();
673 gdouble xstart = _trackview.editor.frame_to_pixel (frame_pos);
677 switch (_trackview.audio_track()->mode()) {
680 fill_color = color_map[cRecordingRectFill];
685 fill_color = color_map[cRecordingRectFill];
686 /* make the recording rect translucent to allow
687 the user to see the peak data coming in, etc.
689 fill_color = UINT_RGBA_CHANGE_A (fill_color, 120);
693 ArdourCanvas::SimpleRect * rec_rect = new Gnome::Canvas::SimpleRect (*canvas_group);
694 rec_rect->property_x1() = xstart;
695 rec_rect->property_y1() = 1.0;
696 rec_rect->property_x2() = xend;
697 rec_rect->property_y2() = (double) _trackview.height - 1;
698 rec_rect->property_outline_color_rgba() = color_map[cRecordingRectOutline];
699 rec_rect->property_fill_color_rgba() = fill_color;
702 recbox.rectangle = rec_rect;
703 recbox.start = _trackview.session().transport_frame();
706 rec_rects.push_back (recbox);
708 screen_update_connection.disconnect();
709 screen_update_connection = ARDOUR_UI::instance()->SuperRapidScreenUpdate.connect (mem_fun (*this, &StreamView::update_rec_box));
713 } else if (rec_active &&
714 (_trackview.session().record_status() != Session::Recording ||
715 !_trackview.get_diskstream()->record_enabled())) {
717 screen_update_connection.disconnect();
719 rec_updating = false;
725 // cerr << "\tNOT rolling, rec_rects = " << rec_rects.size() << " rec_regions = " << rec_regions.size() << endl;
727 if (!rec_rects.empty() || !rec_regions.empty()) {
729 /* disconnect rapid update */
730 screen_update_connection.disconnect();
732 for (list<sigc::connection>::iterator prc = peak_ready_connections.begin(); prc != peak_ready_connections.end(); ++prc) {
735 peak_ready_connections.clear();
737 rec_updating = false;
739 last_rec_peak_frame = 0;
741 /* remove temp regions */
742 for (list<AudioRegion*>::iterator iter=rec_regions.begin(); iter != rec_regions.end(); )
744 list<AudioRegion*>::iterator tmp;
749 /* this will trigger the remove_region_view */
757 // cerr << "\tclear " << rec_rects.size() << " rec rects\n";
760 /* transport stopped, clear boxes */
761 for (vector<RecBoxInfo>::iterator iter=rec_rects.begin(); iter != rec_rects.end(); ++iter) {
762 RecBoxInfo &rect = (*iter);
763 delete rect.rectangle;
774 StreamView::update_rec_box ()
776 if (rec_active && rec_rects.size() > 0) {
777 /* only update the last box */
778 RecBoxInfo & rect = rec_rects.back();
779 jack_nframes_t at = _trackview.get_diskstream()->current_capture_end();
783 switch (_trackview.audio_track()->mode()) {
785 rect.length = at - rect.start;
786 xstart = _trackview.editor.frame_to_pixel (rect.start);
787 xend = _trackview.editor.frame_to_pixel (at);
792 xstart = _trackview.editor.frame_to_pixel (_trackview.get_diskstream()->current_capture_start());
793 xend = _trackview.editor.frame_to_pixel (at);
797 rect.rectangle->property_x1() = xstart;
798 rect.rectangle->property_x2() = xend;
803 StreamView::find_view (const AudioRegion& region)
805 for (list<AudioRegionView*>::iterator i = region_views.begin(); i != region_views.end(); ++i) {
807 if (&(*i)->region == ®ion) {
815 StreamView::foreach_regionview (sigc::slot<void,AudioRegionView*> slot)
817 for (list<AudioRegionView*>::iterator i = region_views.begin(); i != region_views.end(); ++i) {
823 StreamView::foreach_crossfadeview (void (CrossfadeView::*pmf)(void))
825 for (list<CrossfadeView*>::iterator i = crossfade_views.begin(); i != crossfade_views.end(); ++i) {
831 StreamView::rec_peak_range_ready (jack_nframes_t start, jack_nframes_t cnt, Source * src)
833 // this is called from the peak building thread
835 ENSURE_GUI_THREAD(bind (mem_fun (*this, &StreamView::rec_peak_range_ready), start, cnt, src));
837 if (rec_peak_ready_map.size() == 0 || start+cnt > last_rec_peak_frame) {
838 last_rec_peak_frame = start + cnt;
841 rec_peak_ready_map[src] = true;
843 if (rec_peak_ready_map.size() == _trackview.get_diskstream()->n_channels()) {
844 this->update_rec_regions ();
845 rec_peak_ready_map.clear();
850 StreamView::update_rec_regions ()
852 if (use_rec_regions) {
856 for (list<AudioRegion*>::iterator iter = rec_regions.begin(); iter != rec_regions.end(); n++) {
858 list<AudioRegion*>::iterator tmp;
863 if (!canvas_item_visible (rec_rects[n].rectangle)) {
864 /* rect already hidden, this region is done */
869 AudioRegion * region = (*iter);
870 jack_nframes_t origlen = region->length();
872 if (region == rec_regions.back() && rec_active) {
874 if (last_rec_peak_frame > region->start()) {
876 jack_nframes_t nlen = last_rec_peak_frame - region->start();
878 if (nlen != region->length()) {
881 region->set_position (_trackview.get_diskstream()->get_capture_start_frame(n), this);
882 region->set_length (nlen, this);
883 region->thaw ("updated");
886 /* our special initial length */
887 add_region_view_internal (region, false);
890 /* also update rect */
891 ArdourCanvas::SimpleRect * rect = rec_rects[n].rectangle;
892 gdouble xend = _trackview.editor.frame_to_pixel (region->position() + region->length());
893 rect->property_x2() = xend;
899 jack_nframes_t nlen = _trackview.get_diskstream()->get_captured_frames(n);
901 if (nlen != region->length()) {
903 if (region->source(0).length() >= region->start() + nlen) {
906 region->set_position (_trackview.get_diskstream()->get_capture_start_frame(n), this);
907 region->set_length (nlen, this);
908 region->thaw ("updated");
911 /* our special initial length */
912 add_region_view_internal (region, false);
916 ArdourCanvas::Item * rect = rec_rects[n].rectangle;
929 StreamView::show_all_xfades ()
931 foreach_crossfadeview (&CrossfadeView::show);
932 crossfades_visible = true;
936 StreamView::hide_all_xfades ()
938 foreach_crossfadeview (&CrossfadeView::hide);
939 crossfades_visible = false;
943 StreamView::hide_xfades_involving (AudioRegionView& rv)
945 for (list<CrossfadeView *>::iterator i = crossfade_views.begin(); i != crossfade_views.end(); ++i) {
946 if ((*i)->crossfade.involves (rv.region)) {
953 StreamView::reveal_xfades_involving (AudioRegionView& rv)
955 for (list<CrossfadeView *>::iterator i = crossfade_views.begin(); i != crossfade_views.end(); ++i) {
956 if ((*i)->crossfade.involves (rv.region) && (*i)->visible()) {
963 StreamView::color_handler (ColorID id, uint32_t val)
966 case cAudioTrackBase:
967 if (_trackview.is_audio_track()) {
968 canvas_rect->property_fill_color_rgba() = val;
972 if (!_trackview.is_audio_track()) {
973 canvas_rect->property_fill_color_rgba() = val;
976 case cAudioTrackOutline:
977 canvas_rect->property_outline_color_rgba() = val;