Compare commits
3 Commits
390ffb2253
...
cefab85dab
Author | SHA1 | Date |
---|---|---|
Ben Loftis | cefab85dab | |
Ben Loftis | 22b7a07526 | |
Ben Loftis | b37414e01c |
|
@ -398,6 +398,9 @@ SurroundStrip::fast_update ()
|
|||
}
|
||||
|
||||
std::shared_ptr<SurroundReturn> sur = _route->surround_return ();
|
||||
|
||||
//these 2 text meters should only be updated while rolling or exporting
|
||||
if (_route->session().transport_rolling()) {
|
||||
float loud = sur->integrated_loudness();
|
||||
if (loud > -90) {
|
||||
char buf[32];
|
||||
|
@ -416,6 +419,7 @@ SurroundStrip::fast_update ()
|
|||
_dbtp_label.set_markup ("-");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
SurroundStrip::route_property_changed (const PropertyChange& what_changed)
|
||||
|
|
|
@ -39,6 +39,7 @@ public:
|
|||
void reset ();
|
||||
|
||||
float integrated_loudness () const;
|
||||
float momentary () const;
|
||||
float max_momentary () const;
|
||||
float dbtp () const;
|
||||
|
||||
|
@ -74,6 +75,8 @@ private:
|
|||
uint32_t _pow_idx;
|
||||
float _thresh_rel;
|
||||
|
||||
float _momentary_l;
|
||||
|
||||
float _maxloudn_M;
|
||||
float _integrated;
|
||||
float _dbtp;
|
||||
|
|
|
@ -76,6 +76,8 @@ public:
|
|||
|
||||
/* a value <= -200 indicates that no data is available */
|
||||
float integrated_loudness () const;
|
||||
float max_momentary () const;
|
||||
float momentary () const;
|
||||
float max_dbtp () const;
|
||||
|
||||
samplecnt_t signal_latency () const;
|
||||
|
|
|
@ -173,6 +173,8 @@ LUFSMeter::run (float const** data, uint32_t n_samples)
|
|||
const float sum_m = sumfrag (4); // 400ms
|
||||
const float loudness_m = -0.691f + 10.f * log10f (sum_m);
|
||||
|
||||
_momentary_l = loudness_m;
|
||||
|
||||
_maxloudn_M = std::max<float> (_maxloudn_M, loudness_m);
|
||||
|
||||
/* observe 400ms window every 100ms */
|
||||
|
@ -256,6 +258,12 @@ LUFSMeter::integrated_loudness () const
|
|||
return _integrated;
|
||||
}
|
||||
|
||||
float
|
||||
LUFSMeter::momentary () const
|
||||
{
|
||||
return _momentary_l;
|
||||
}
|
||||
|
||||
float
|
||||
LUFSMeter::max_momentary () const
|
||||
{
|
||||
|
|
|
@ -277,10 +277,8 @@ SurroundReturn::run (BufferSet& bufs, samplepos_t start_sample, samplepos_t end_
|
|||
_surround_bufs.get_audio (19).data (meter_offset)
|
||||
};
|
||||
|
||||
if (_rolling && (!_exporting || _export_end >= end_sample)) {
|
||||
_lufs_meter.run (data, meter_nframes);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
SurroundReturn::forge_int_msg (uint32_t obj_id, uint32_t key, int val, uint32_t key2, int val2)
|
||||
|
@ -395,6 +393,18 @@ SurroundReturn::finalize_export ()
|
|||
_export_start = _export_end = 0;
|
||||
}
|
||||
|
||||
float
|
||||
SurroundReturn::momentary () const
|
||||
{
|
||||
return _lufs_meter.momentary ();
|
||||
}
|
||||
|
||||
float
|
||||
SurroundReturn::max_momentary () const
|
||||
{
|
||||
return _lufs_meter.max_momentary ();
|
||||
}
|
||||
|
||||
float
|
||||
SurroundReturn::integrated_loudness () const
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue