prepare region RMS (loudness) normalization
[ardour.git] / libs / ardour / ardour / audioregion.h
index bed64615b5d3b0cd2a3f3e644f9a6f129015dea2..d25cf0e421112b48bd1f6bdf1a5709534af2237a 100644 (file)
@@ -82,8 +82,17 @@ class LIBARDOUR_API AudioRegion : public Region
        gain_t scale_amplitude() const { return _scale_amplitude; }
 
        void normalize (float, float target_in_dB = 0.0f);
+
+       /** @return the maximum (linear) amplitude of the region, or a -ve
+        *  number if the Progress object reports that the process was cancelled.
+        */
        double maximum_amplitude (Progress* p = 0) const;
 
+       /** @return the maximum (rms) signal power of the region, or a -1
+        *  if the Progress object reports that the process was cancelled.
+        */
+       double rms (Progress* p = 0) const;
+
        bool envelope_active () const { return _envelope_active; }
        bool fade_in_active ()  const { return _fade_in_active; }
        bool fade_out_active () const { return _fade_out_active; }
@@ -180,7 +189,7 @@ class LIBARDOUR_API AudioRegion : public Region
        AudioRegion (boost::shared_ptr<AudioSource>);
        AudioRegion (const SourceList &);
        AudioRegion (boost::shared_ptr<const AudioRegion>);
-       AudioRegion (boost::shared_ptr<const AudioRegion>, frameoffset_t offset, const int32_t& sub_num);
+       AudioRegion (boost::shared_ptr<const AudioRegion>, frameoffset_t offset, const int32_t sub_num);
        AudioRegion (boost::shared_ptr<const AudioRegion>, const SourceList&);
        AudioRegion (SourceList &);