po name changes, again?
[ardour2.git] / gtk2_ardour / audio_streamview.cc
blobabfa767c9c473dfeec247de7b435e51840d52806
1 /*
2 Copyright (C) 2001, 2006 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.
19 #include <cmath>
20 #include <cassert>
21 #include <utility>
23 #include <gtkmm.h>
25 #include <gtkmm2ext/gtk_ui.h>
27 #include "pbd/stacktrace.h"
29 #include "ardour/audioplaylist.h"
30 #include "ardour/audioregion.h"
31 #include "ardour/audiofilesource.h"
32 #include "ardour/audio_track.h"
33 #include "ardour/source.h"
34 #include "ardour/region_factory.h"
35 #include "ardour/profile.h"
36 #include "ardour/rc_configuration.h"
37 #include "ardour/session.h"
39 #include "audio_streamview.h"
40 #include "audio_region_view.h"
41 #include "tape_region_view.h"
42 #include "audio_time_axis.h"
43 #include "canvas-waveview.h"
44 #include "canvas-simplerect.h"
45 #include "region_selection.h"
46 #include "selection.h"
47 #include "public_editor.h"
48 #include "ardour_ui.h"
49 #include "crossfade_view.h"
50 #include "rgb_macros.h"
51 #include "gui_thread.h"
52 #include "utils.h"
54 #include "i18n.h"
56 using namespace std;
57 using namespace ARDOUR;
58 using namespace PBD;
59 using namespace Editing;
61 AudioStreamView::AudioStreamView (AudioTimeAxisView& tv)
62 : StreamView (tv)
64 crossfades_visible = tv.session()->config.get_xfades_visible ();
65 color_handler ();
66 _amplitude_above_axis = 1.0;
68 Config->ParameterChanged.connect (*this, invalidator (*this), ui_bind (&AudioStreamView::parameter_changed, this, _1), gui_context());
71 AudioStreamView::~AudioStreamView ()
75 int
76 AudioStreamView::set_samples_per_unit (gdouble spp)
78 StreamView::set_samples_per_unit(spp);
80 for (CrossfadeViewList::iterator xi = crossfade_views.begin(); xi != crossfade_views.end(); ++xi) {
81 xi->second->set_samples_per_unit (spp);
84 return 0;
87 int
88 AudioStreamView::set_amplitude_above_axis (gdouble app)
90 RegionViewList::iterator i;
92 if (app < 1.0) {
93 return -1;
96 _amplitude_above_axis = app;
98 for (i = region_views.begin(); i != region_views.end(); ++i) {
99 AudioRegionView* const arv = dynamic_cast<AudioRegionView*>(*i);
100 if (arv)
101 arv->set_amplitude_above_axis (app);
104 return 0;
107 RegionView*
108 AudioStreamView::create_region_view (boost::shared_ptr<Region> r, bool wait_for_waves, bool recording)
110 AudioRegionView *region_view = 0;
111 boost::shared_ptr<AudioRegion> region = boost::dynamic_pointer_cast<AudioRegion> (r);
113 if (region == 0) {
114 return 0;
117 switch (_trackview.audio_track()->mode()) {
119 case NonLayered:
120 case Normal:
121 if (recording) {
122 region_view = new AudioRegionView (_canvas_group, _trackview, region,
123 _samples_per_unit, region_color, recording, TimeAxisViewItem::Visibility(
124 TimeAxisViewItem::ShowFrame |
125 TimeAxisViewItem::HideFrameRight |
126 TimeAxisViewItem::HideFrameLeft |
127 TimeAxisViewItem::HideFrameTB));
128 } else {
129 region_view = new AudioRegionView (_canvas_group, _trackview, region,
130 _samples_per_unit, region_color);
132 break;
133 case Destructive:
134 region_view = new TapeAudioRegionView (_canvas_group, _trackview, region,
135 _samples_per_unit, region_color);
136 break;
137 default:
138 fatal << string_compose (_("programming error: %1"), "illegal track mode in ::add_region_view_internal") << endmsg;
139 /*NOTREACHED*/
143 region_view->init (region_color, wait_for_waves);
144 region_view->set_amplitude_above_axis(_amplitude_above_axis);
145 region_view->set_height (child_height ());
147 /* if its the special single-sample length that we use for rec-regions, make it
148 insensitive to events
151 if (region->length() == 1) {
152 region_view->set_sensitive (false);
155 region_view->set_waveform_scale (Config->get_waveform_scale ());
156 region_view->set_waveform_shape (Config->get_waveform_shape ());
157 region_view->set_waveform_visible (Config->get_show_waveforms ());
159 return region_view;
162 RegionView*
163 AudioStreamView::add_region_view_internal (boost::shared_ptr<Region> r, bool wait_for_waves, bool recording)
165 RegionView *region_view = create_region_view (r, wait_for_waves, recording);
167 if (region_view == 0) {
168 return 0;
171 // if(!recording){
172 // for (list<RegionView *>::iterator i = region_views.begin(); i != region_views.end(); ++i) {
173 // if ((*i)->region() == r) {
174 // cerr << "audio_streamview in add_region_view_internal region found" << endl;
175 /* great. we already have a AudioRegionView for this Region. use it again. */
177 // (*i)->set_valid (true);
179 // this might not be necessary
180 // AudioRegionView* const arv = dynamic_cast<AudioRegionView*>(*i);
182 // if (arv) {
183 // arv->set_waveform_scale (_waveform_scale);
184 // arv->set_waveform_shape (_waveform_shape);
185 // }
187 // return NULL;
188 // }
189 // }
190 // }
192 region_views.push_front (region_view);
194 /* catch region going away */
196 r->DropReferences.connect (*this, invalidator (*this), boost::bind (&AudioStreamView::remove_region_view, this, boost::weak_ptr<Region> (r)), gui_context());
198 RegionViewAdded (region_view);
200 return region_view;
203 void
204 AudioStreamView::remove_region_view (boost::weak_ptr<Region> weak_r)
206 ENSURE_GUI_THREAD (*this, &AudioStreamView::remove_region_view, weak_r);
208 boost::shared_ptr<Region> r (weak_r.lock());
210 if (!r) {
211 return;
214 if (!_trackview.session()->deletion_in_progress()) {
216 for (CrossfadeViewList::iterator i = crossfade_views.begin(); i != crossfade_views.end();) {
217 CrossfadeViewList::iterator tmp;
219 tmp = i;
220 ++tmp;
222 boost::shared_ptr<AudioRegion> ar = boost::dynamic_pointer_cast<AudioRegion>(r);
223 if (ar && i->second->crossfade->involves (ar)) {
224 delete i->second;
225 crossfade_views.erase (i);
228 i = tmp;
232 StreamView::remove_region_view(r);
235 void
236 AudioStreamView::undisplay_track ()
238 StreamView::undisplay_track ();
240 for (CrossfadeViewList::iterator i = crossfade_views.begin(); i != crossfade_views.end(); ++i) {
241 delete i->second;
244 crossfade_views.clear ();
247 void
248 AudioStreamView::playlist_layered (boost::weak_ptr<Track> wtr)
250 boost::shared_ptr<Track> tr (wtr.lock());
252 if (!tr) {
253 return;
256 StreamView::playlist_layered (wtr);
258 /* make sure xfades are on top and all the regionviews are stacked correctly. */
260 for (CrossfadeViewList::iterator i = crossfade_views.begin(); i != crossfade_views.end(); ++i) {
261 i->second->get_canvas_group()->raise_to_top();
265 void
266 AudioStreamView::playlist_switched (boost::weak_ptr<Track> wtr)
268 boost::shared_ptr<Track> tr (wtr.lock());
270 if (!tr) {
271 return;
274 playlist_connections.drop_connections ();
276 StreamView::playlist_switched (tr);
278 boost::shared_ptr<AudioPlaylist> apl = boost::dynamic_pointer_cast<AudioPlaylist> (tr->playlist());
280 if (apl) {
281 apl->NewCrossfade.connect (playlist_connections, invalidator (*this), ui_bind (&AudioStreamView::add_crossfade, this, _1), gui_context());
285 void
286 AudioStreamView::add_crossfade (boost::weak_ptr<Crossfade> wc)
288 boost::shared_ptr<Crossfade> crossfade (wc.lock());
290 if (!crossfade) {
291 return;
294 AudioRegionView* lview = 0;
295 AudioRegionView* rview = 0;
297 /* first see if we already have a CrossfadeView for this Crossfade */
299 CrossfadeViewList::iterator i = crossfade_views.find (crossfade);
300 if (i != crossfade_views.end()) {
301 if (!crossfades_visible) {
302 i->second->hide();
303 } else {
304 i->second->show ();
306 i->second->set_valid (true);
307 return;
310 /* create a new one */
312 for (list<RegionView *>::iterator i = region_views.begin(); i != region_views.end(); ++i) {
313 AudioRegionView* arv = dynamic_cast<AudioRegionView*>(*i);
315 if (!lview && arv && (arv->region() == crossfade->out())) {
316 lview = arv;
318 if (!rview && arv && (arv->region() == crossfade->in())) {
319 rview = arv;
323 CrossfadeView *cv = new CrossfadeView (_trackview.canvas_display (),
324 _trackview,
325 crossfade,
326 _samples_per_unit,
327 region_color,
328 *lview, *rview);
329 cv->set_valid (true);
330 crossfade->Invalidated.connect (*this, invalidator (*this), ui_bind (&AudioStreamView::remove_crossfade, this, _1), gui_context());
331 crossfade_views[cv->crossfade] = cv;
332 if (!crossfades_visible) {
333 cv->hide ();
336 update_content_height (cv);
339 void
340 AudioStreamView::remove_crossfade (boost::shared_ptr<Region> r)
342 ENSURE_GUI_THREAD (*this, &AudioStreamView::remove_crossfade, r)
344 boost::shared_ptr<Crossfade> xfade = boost::dynamic_pointer_cast<Crossfade> (r);
346 for (CrossfadeViewList::iterator i = crossfade_views.begin(); i != crossfade_views.end(); ++i) {
347 if (i->second->crossfade == xfade) {
348 delete i->second;
349 crossfade_views.erase (i);
350 break;
355 void
356 AudioStreamView::redisplay_track ()
358 list<RegionView *>::iterator i;
359 CrossfadeViewList::iterator xi, tmpx;
361 // Flag region views as invalid and disable drawing
362 for (i = region_views.begin(); i != region_views.end(); ++i) {
363 (*i)->set_valid (false);
364 (*i)->enable_display (false);
367 // Flag crossfade views as invalid
368 for (xi = crossfade_views.begin(); xi != crossfade_views.end(); ++xi) {
369 xi->second->set_valid (false);
370 if (xi->second->visible()) {
371 xi->second->show ();
375 // Add and display region and crossfade views, and flag them as valid
377 if (_trackview.is_audio_track()) {
378 _trackview.track()->playlist()->foreach_region(
379 sigc::hide_return (sigc::mem_fun (*this, &StreamView::add_region_view))
382 boost::shared_ptr<AudioPlaylist> apl = boost::dynamic_pointer_cast<AudioPlaylist>(
383 _trackview.track()->playlist()
386 if (apl) {
387 apl->foreach_crossfade (sigc::mem_fun (*this, &AudioStreamView::add_crossfade));
391 // Remove invalid crossfade views
392 for (xi = crossfade_views.begin(); xi != crossfade_views.end();) {
393 tmpx = xi;
394 tmpx++;
396 if (!xi->second->valid()) {
397 delete xi->second;
398 crossfade_views.erase (xi);
401 xi = tmpx;
404 // Stack regions by layer, and remove invalid regions
405 layer_regions();
408 void
409 AudioStreamView::set_show_waveforms (bool yn)
411 for (list<RegionView *>::iterator i = region_views.begin(); i != region_views.end(); ++i) {
412 AudioRegionView* const arv = dynamic_cast<AudioRegionView*>(*i);
413 if (arv) {
414 arv->set_waveform_visible (yn);
419 void
420 AudioStreamView::set_waveform_shape (WaveformShape shape)
422 for (RegionViewList::iterator i = region_views.begin(); i != region_views.end(); ++i) {
423 AudioRegionView* const arv = dynamic_cast<AudioRegionView*>(*i);
424 if (arv)
425 arv->set_waveform_shape (shape);
429 void
430 AudioStreamView::set_waveform_scale (WaveformScale scale)
432 for (RegionViewList::iterator i = region_views.begin(); i != region_views.end(); ++i) {
433 AudioRegionView* const arv = dynamic_cast<AudioRegionView*>(*i);
434 if (arv) {
435 arv->set_waveform_scale (scale);
440 void
441 AudioStreamView::setup_rec_box ()
443 //cerr << _trackview.name() << " streamview SRB region_views.size() = " << region_views.size() << endl;
445 if (_trackview.session()->transport_rolling()) {
447 // cerr << "\trolling\n";
449 if (!rec_active &&
450 _trackview.session()->record_status() == Session::Recording &&
451 _trackview.track()->record_enabled()) {
452 if (_trackview.audio_track()->mode() == Normal && Config->get_show_waveforms_while_recording() && rec_regions.size() == rec_rects.size()) {
454 /* add a new region, but don't bother if they set show-waveforms-while-recording mid-record */
456 SourceList sources;
458 rec_data_ready_connections.drop_connections ();
459 boost::shared_ptr<AudioTrack> tr = _trackview.audio_track();
461 for (uint32_t n = 0; n < tr->n_channels().n_audio(); ++n) {
462 boost::shared_ptr<AudioFileSource> src = tr->write_source (n);
463 if (src) {
464 sources.push_back (src);
465 src->PeakRangeReady.connect (rec_data_ready_connections,
466 invalidator (*this),
467 ui_bind (&AudioStreamView::rec_peak_range_ready, this, _1, _2, boost::weak_ptr<Source>(src)),
468 gui_context());
472 // handle multi
474 framepos_t start = 0;
475 if (rec_regions.size() > 0) {
476 start = rec_regions.back().first->start()
477 + _trackview.track()->get_captured_frames(rec_regions.size()-1);
480 PropertyList plist;
482 plist.add (Properties::start, start);
483 plist.add (Properties::length, 1);
484 plist.add (Properties::name, string());
485 plist.add (Properties::layer, 0);
487 boost::shared_ptr<AudioRegion> region (
488 boost::dynamic_pointer_cast<AudioRegion>(RegionFactory::create (sources, plist, false)));
490 assert(region);
491 region->set_position (_trackview.session()->transport_frame(), this);
492 rec_regions.push_back (make_pair(region, (RegionView*) 0));
495 /* start a new rec box */
497 boost::shared_ptr<AudioTrack> at;
499 at = _trackview.audio_track(); /* we know what it is already */
500 framepos_t const frame_pos = at->current_capture_start ();
501 gdouble xstart = _trackview.editor().frame_to_pixel (frame_pos);
502 gdouble xend;
503 uint32_t fill_color;
505 switch (_trackview.audio_track()->mode()) {
506 case Normal:
507 case NonLayered:
508 xend = xstart;
509 fill_color = ARDOUR_UI::config()->canvasvar_RecordingRect.get();
510 break;
512 case Destructive:
513 xend = xstart + 2;
514 fill_color = ARDOUR_UI::config()->canvasvar_RecordingRect.get();
515 /* make the recording rect translucent to allow
516 the user to see the peak data coming in, etc.
518 fill_color = UINT_RGBA_CHANGE_A (fill_color, 120);
519 break;
522 ArdourCanvas::SimpleRect * rec_rect = new Gnome::Canvas::SimpleRect (*_canvas_group);
523 rec_rect->property_x1() = xstart;
524 rec_rect->property_y1() = 1.0;
525 rec_rect->property_x2() = xend;
526 rec_rect->property_y2() = child_height ();
527 rec_rect->property_outline_what() = 0x0;
528 rec_rect->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_TimeAxisFrame.get();
529 rec_rect->property_fill_color_rgba() = fill_color;
530 rec_rect->lower_to_bottom();
532 RecBoxInfo recbox;
533 recbox.rectangle = rec_rect;
534 recbox.start = _trackview.session()->transport_frame();
535 recbox.length = 0;
537 rec_rects.push_back (recbox);
539 screen_update_connection.disconnect();
540 screen_update_connection = ARDOUR_UI::instance()->SuperRapidScreenUpdate.connect (
541 sigc::mem_fun (*this, &AudioStreamView::update_rec_box));
542 rec_updating = true;
543 rec_active = true;
545 } else if (rec_active &&
546 (_trackview.session()->record_status() != Session::Recording ||
547 !_trackview.track()->record_enabled())) {
548 screen_update_connection.disconnect();
549 rec_active = false;
550 rec_updating = false;
553 } else {
555 // cerr << "\tNOT rolling, rec_rects = " << rec_rects.size() << " rec_regions = " << rec_regions.size() << endl;
557 if (!rec_rects.empty() || !rec_regions.empty()) {
559 /* disconnect rapid update */
560 screen_update_connection.disconnect();
561 rec_data_ready_connections.drop_connections ();
562 rec_updating = false;
563 rec_active = false;
565 /* remove temp regions */
567 for (list<pair<boost::shared_ptr<Region>,RegionView*> >::iterator iter = rec_regions.begin(); iter != rec_regions.end(); ) {
568 list<pair<boost::shared_ptr<Region>,RegionView*> >::iterator tmp;
570 tmp = iter;
571 ++tmp;
573 (*iter).first->drop_references ();
575 iter = tmp;
578 rec_regions.clear();
580 // cerr << "\tclear " << rec_rects.size() << " rec rects\n";
582 /* transport stopped, clear boxes */
583 for (vector<RecBoxInfo>::iterator iter=rec_rects.begin(); iter != rec_rects.end(); ++iter) {
584 RecBoxInfo &rect = (*iter);
585 delete rect.rectangle;
588 rec_rects.clear();
594 void
595 AudioStreamView::foreach_crossfadeview (void (CrossfadeView::*pmf)(void))
597 for (CrossfadeViewList::iterator i = crossfade_views.begin(); i != crossfade_views.end(); ++i) {
598 (i->second->*pmf) ();
602 void
603 AudioStreamView::rec_peak_range_ready (framepos_t start, framecnt_t cnt, boost::weak_ptr<Source> weak_src)
605 ENSURE_GUI_THREAD (*this, &AudioStreamView::rec_peak_range_ready, start, cnt, weak_src)
607 boost::shared_ptr<Source> src (weak_src.lock());
609 if (!src) {
610 return;
613 // this is called from the peak building thread
615 if (rec_data_ready_map.size() == 0 || start + cnt > last_rec_data_frame) {
616 last_rec_data_frame = start + cnt;
619 rec_data_ready_map[src] = true;
621 if (rec_data_ready_map.size() == _trackview.track()->n_channels().n_audio()) {
622 update_rec_regions (start, cnt);
623 rec_data_ready_map.clear();
627 void
628 AudioStreamView::update_rec_regions (framepos_t start, framecnt_t cnt)
630 if (!Config->get_show_waveforms_while_recording ()) {
631 return;
634 uint32_t n = 0;
636 for (list<pair<boost::shared_ptr<Region>,RegionView*> >::iterator iter = rec_regions.begin(); iter != rec_regions.end(); n++) {
638 list<pair<boost::shared_ptr<Region>,RegionView*> >::iterator tmp = iter;
639 ++tmp;
641 assert (n < rec_rects.size());
643 if (!canvas_item_visible (rec_rects[n].rectangle)) {
644 /* rect already hidden, this region is done */
645 iter = tmp;
646 continue;
649 boost::shared_ptr<AudioRegion> region = boost::dynamic_pointer_cast<AudioRegion>(iter->first);
651 if (!region) {
652 iter = tmp;
653 continue;
656 framecnt_t origlen = region->length();
658 if (region == rec_regions.back().first && rec_active) {
660 if (last_rec_data_frame > region->start()) {
662 framecnt_t nlen = last_rec_data_frame - region->start();
664 if (nlen != region->length()) {
666 region->suspend_property_changes ();
667 region->set_position (_trackview.track()->get_capture_start_frame(n), this);
668 region->set_length (nlen, this);
669 region->resume_property_changes ();
671 if (origlen == 1) {
672 /* our special initial length */
673 add_region_view_internal (region, false, true);
674 setup_new_rec_layer_time (region);
677 check_record_layers (region, (region->position() - region->start() + start + cnt));
679 /* also update rect */
680 ArdourCanvas::SimpleRect * rect = rec_rects[n].rectangle;
681 gdouble xend = _trackview.editor().frame_to_pixel (region->position() + region->length());
682 rect->property_x2() = xend;
685 } else {
687 framecnt_t nlen = _trackview.track()->get_captured_frames(n);
689 if (nlen != region->length()) {
691 if (region->source_length(0) >= region->start() + nlen) {
693 region->suspend_property_changes ();
694 region->set_position (_trackview.track()->get_capture_start_frame(n), this);
695 region->set_length (nlen, this);
696 region->resume_property_changes ();
698 if (origlen == 1) {
699 /* our special initial length */
700 add_region_view_internal (region, false, true);
703 /* also hide rect */
704 ArdourCanvas::Item * rect = rec_rects[n].rectangle;
705 rect->hide();
712 iter = tmp;
716 void
717 AudioStreamView::show_all_fades ()
719 for (list<RegionView*>::iterator i = region_views.begin(); i != region_views.end(); ++i) {
720 AudioRegionView* const arv = dynamic_cast<AudioRegionView*>(*i);
721 if (arv) {
722 arv->set_fade_visibility (true);
727 void
728 AudioStreamView::hide_all_fades ()
730 for (list<RegionView*>::iterator i = region_views.begin(); i != region_views.end(); ++i) {
731 AudioRegionView* const arv = dynamic_cast<AudioRegionView*>(*i);
732 if (arv) {
733 arv->set_fade_visibility (false);
738 void
739 AudioStreamView::show_all_xfades ()
741 foreach_crossfadeview (&CrossfadeView::show);
742 crossfades_visible = true;
745 void
746 AudioStreamView::hide_all_xfades ()
748 foreach_crossfadeview (&CrossfadeView::hide);
749 crossfades_visible = false;
752 void
753 AudioStreamView::hide_xfades_involving (AudioRegionView& rv)
755 for (CrossfadeViewList::iterator i = crossfade_views.begin(); i != crossfade_views.end(); ++i) {
756 if (i->second->crossfade->involves (rv.audio_region())) {
757 i->second->fake_hide ();
762 void
763 AudioStreamView::reveal_xfades_involving (AudioRegionView& rv)
765 for (CrossfadeViewList::iterator i = crossfade_views.begin(); i != crossfade_views.end(); ++i) {
766 if (i->second->crossfade->involves (rv.audio_region()) && i->second->visible()) {
767 i->second->show ();
772 void
773 AudioStreamView::color_handler ()
775 //case cAudioTrackBase:
776 if (_trackview.is_track()) {
777 canvas_rect->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_AudioTrackBase.get();
780 //case cAudioBusBase:
781 if (!_trackview.is_track()) {
782 if (Profile->get_sae() && _trackview.route()->is_master()) {
783 canvas_rect->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_AudioMasterBusBase.get();
784 } else {
785 canvas_rect->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_AudioBusBase.get();
790 void
791 AudioStreamView::update_contents_height ()
793 StreamView::update_contents_height ();
795 for (CrossfadeViewList::iterator i = crossfade_views.begin(); i != crossfade_views.end(); ++i) {
796 update_content_height (i->second);
800 void
801 AudioStreamView::update_content_height (CrossfadeView* cv)
803 if (_layer_display == Overlaid) {
805 cv->set_y (0);
806 cv->set_height (height);
808 } else {
810 layer_t const inl = cv->crossfade->in()->layer ();
811 layer_t const outl = cv->crossfade->out()->layer ();
813 layer_t const high = max (inl, outl);
814 layer_t const low = min (inl, outl);
816 const double h = child_height ();
818 cv->set_y ((_layers - high - 1) * h);
819 cv->set_height ((high - low + 1) * h);
824 void
825 AudioStreamView::parameter_changed (string const & p)
827 if (p == "show-waveforms") {
828 set_show_waveforms (Config->get_show_waveforms ());
829 } else if (p == "waveform-scale") {
830 set_waveform_scale (Config->get_waveform_scale ());
831 } else if (p == "waveform-shape") {
832 set_waveform_shape (Config->get_waveform_shape ());
836 void
837 AudioStreamView::horizontal_position_changed ()
839 /* we only `draw' the bit of the curve that is visible, so we need to update here */
841 for (CrossfadeViewList::iterator i = crossfade_views.begin(); i != crossfade_views.end(); ++i) {
842 i->second->horizontal_position_changed ();