- _peaks_ready_connection = 0;
-
- for (list<Wave*>::iterator i = _waves.begin(); i != _waves.end(); ++i) {
- if ((*i)->region->audio_source(0)->peaks_ready (boost::bind (&StripSilenceDialog::peaks_ready, this), &_peaks_ready_connection, gui_context())) {
- (*i)->view = new WaveView (*(_canvas->root()));
- (*i)->view->property_data_src() = static_cast<gpointer>((*i)->region.get());
- (*i)->view->property_cache() = WaveView::create_cache ();
- (*i)->view->property_cache_updater() = true;
- (*i)->view->property_channel() = 0;
- (*i)->view->property_length_function() = (void *) region_length_from_c;
- (*i)->view->property_sourcefile_length_function() = (void *) sourcefile_length_from_c;
- (*i)->view->property_peak_function() = (void *) region_read_peaks_from_c;
- (*i)->view->property_x() = 0;
- (*i)->view->property_y() = n * _wave_height;
- (*i)->view->property_height() = _wave_height;
- (*i)->view->property_samples_per_unit() = (*i)->samples_per_unit;
- (*i)->view->property_region_start() = (*i)->region->start();
- (*i)->view->property_wave_color() = ARDOUR_UI::config()->canvasvar_WaveForm.get();
- (*i)->view->property_fill_color() = ARDOUR_UI::config()->canvasvar_WaveFormFill.get();
- (*i)->view->property_logscaled() = true;
- (*i)->view->property_rectified() = true;
- }
-
- ++n;
- }