PluginInfo::type added to copy constructor. But why is the copy constructor defined...
[ardour.git] / libs / ardour / audioregion.cc
index 287d9dbe467165c9fb265297f122163e030e0de0..6163897b2015c24ce9434fd23706efc5ff676649 100644 (file)
@@ -509,14 +509,18 @@ AudioRegion::read_at (Sample *buf, Sample *mixdown_buffer, float *gain_buffer, n
                      uint32_t chan_n, nframes_t read_frames, nframes_t skip_frames) const
 {
        /* regular diskstream/butler read complete with fades etc */
-       return _read_at (sources, _length, buf, mixdown_buffer, gain_buffer, file_position, cnt, chan_n, read_frames, skip_frames, ReadOps (~0));
+       return _read_at (sources, _length, buf, mixdown_buffer, gain_buffer, file_position, cnt, 
+                        chan_n, read_frames, skip_frames, ReadOps (~0));
 }
 
 nframes_t
 AudioRegion::master_read_at (Sample *buf, Sample *mixdown_buffer, float *gain_buffer, nframes_t position, 
                             nframes_t cnt, uint32_t chan_n) const
 {
-       return _read_at (master_sources, master_sources.front()->length(), buf, mixdown_buffer, gain_buffer, position, cnt, chan_n, 0, 0);
+       /* do not read gain/scaling/fades and do not count this disk i/o in statistics */
+
+       return _read_at (master_sources, master_sources.front()->length(), buf, mixdown_buffer, 
+                        gain_buffer, position, cnt, chan_n, 0, 0, ReadOps (0));
 }
 
 nframes_t
@@ -843,7 +847,7 @@ AudioRegion::set_live_state (const XMLNode& node, Change& what_changed, bool sen
                        }
 
                        if ((prop = child->property ("active")) != 0) {
-                               if (prop->value() == "yes") {
+                               if (string_is_affirmative (prop->value())) {
                                        set_fade_in_active (true);
                                } else {
                                        set_fade_in_active (true);
@@ -864,7 +868,7 @@ AudioRegion::set_live_state (const XMLNode& node, Change& what_changed, bool sen
                        }
 
                        if ((prop = child->property ("active")) != 0) {
-                               if (prop->value() == "yes") {
+                               if (string_is_affirmative (prop->value())) {
                                        set_fade_out_active (true);
                                } else {
                                        set_fade_out_active (false);
@@ -1632,14 +1636,21 @@ AudioRegion::get_transients (AnalysisFeatureList& results, bool force_new)
 
        /* no existing/complete transient info */
 
+       static bool analyse_dialog_shown = false;
        if (!Config->get_auto_analyse_audio()) {
-               pl->session().Dialog (_("\
+               if ( !analyse_dialog_shown ) {
+                       pl->session().Dialog (_("\
 You have requested an operation that requires audio analysis.\n\n\
 You currently have \"auto-analyse-audio\" disabled, which means\n\
 that transient data must be generated every time it is required.\n\n\
 If you are doing work that will require transient data on a\n\
 regular basis, you should probably enable \"auto-analyse-audio\"\n\
-then quit ardour and restart."));
+then quit ardour and restart.\n\n\
+This dialog will not display again.  But you may notice a slight delay\n\
+in this and future transient-detection operations.\n\
+"));
+                       analyse_dialog_shown = true;  //only show this dialog once 
+                       }
        }
 
        TransientDetector t (pl->session().frame_rate());