-
- void normalize_to (float target_in_dB = 0.0f);
-
- bool envelope_active () const { return _flags & Region::EnvelopeActive; }
- bool fade_in_active () const { return _flags & Region::FadeIn; }
- bool fade_out_active () const { return _flags & Region::FadeOut; }
-
- boost::shared_ptr<AutomationList> fade_in() { return _fade_in; }
- boost::shared_ptr<AutomationList> fade_out() { return _fade_out; }
- boost::shared_ptr<AutomationList> envelope() { return _envelope; }
-
- virtual nframes_t read_peaks (PeakData *buf, nframes_t npeaks,
- nframes_t offset, nframes_t cnt,
- uint32_t chan_n=0, double samples_per_unit= 1.0) const;
-
- virtual nframes_t read_at (Sample *buf, Sample *mixdown_buf,
- float *gain_buf, nframes_t position, nframes_t cnt,
- uint32_t chan_n = 0) const;
-
- virtual nframes_t master_read_at (Sample *buf, Sample *mixdown_buf,
- float *gain_buf,
- nframes_t position, nframes_t cnt, uint32_t chan_n=0) const;
-
- virtual nframes_t read_raw_internal (Sample*, nframes_t, nframes_t) const;
-
- XMLNode& state (bool);
- int set_state (const XMLNode&);
-
- static void set_default_fade (float steepness, nframes_t len);
+
+ void normalize (float, float target_in_dB = 0.0f);
+ double maximum_amplitude (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; }
+
+ boost::shared_ptr<AutomationList> fade_in() { return _fade_in.val (); }
+ boost::shared_ptr<AutomationList> inverse_fade_in() { return _inverse_fade_in.val (); }
+ boost::shared_ptr<AutomationList> fade_out() { return _fade_out.val (); }
+ boost::shared_ptr<AutomationList> inverse_fade_out() { return _inverse_fade_out.val (); }
+ boost::shared_ptr<AutomationList> envelope() { return _envelope.val (); }
+
+ Evoral::Range<framepos_t> body_range () const;
+
+ virtual framecnt_t read_peaks (PeakData *buf, framecnt_t npeaks,
+ framecnt_t offset, framecnt_t cnt,
+ uint32_t chan_n=0, double frames_per_pixel = 1.0) const;
+
+ /* Readable interface */
+
+ virtual framecnt_t read (Sample*, framepos_t pos, framecnt_t cnt, int channel) const;
+ virtual framecnt_t readable_length() const { return length(); }
+
+ virtual framecnt_t read_at (Sample *buf, Sample *mixdown_buf, float *gain_buf,
+ framepos_t position,
+ framecnt_t cnt,
+ uint32_t chan_n = 0) const;
+
+ virtual framecnt_t master_read_at (Sample *buf, Sample *mixdown_buf, float *gain_buf,
+ framepos_t position, framecnt_t cnt, uint32_t chan_n=0) const;
+
+ virtual framecnt_t read_raw_internal (Sample*, framepos_t, framecnt_t, int channel) const;
+
+ XMLNode& state ();
+ XMLNode& get_basic_state ();
+ int set_state (const XMLNode&, int version);
+
+ void fade_range (framepos_t, framepos_t);
+