locut_cutoff_hz = cutoff_hz;
}
- void set_locut_enabled(bool enabled)
+ void set_locut_enabled(unsigned bus, bool enabled)
{
- locut_enabled = enabled;
+ locut_enabled[bus] = enabled;
}
- bool get_locut_enabled() const
+ bool get_locut_enabled(unsigned bus)
{
- return locut_enabled;
+ return locut_enabled[bus];
}
float get_limiter_threshold_dbfs() const
}
typedef std::function<void(float level_lufs, float peak_db,
+ std::vector<float> bus_level_lufs,
float global_level_lufs, float range_low_lufs, float range_high_lufs,
float gain_staging_db, float final_makeup_gain_db,
float correlation)> audio_level_callback_t;
void reset_alsa_mutex_held(DeviceSpec device_spec);
std::map<DeviceSpec, DeviceInfo> get_devices_mutex_held() const;
void update_meters(const std::vector<float> &samples);
+ void measure_bus_levels(unsigned bus_index, const std::vector<float> &left, const std::vector<float> &right);
void send_audio_level_callback();
unsigned num_cards;
AudioDevice alsa_inputs[MAX_ALSA_CARDS]; // Under audio_mutex.
std::vector<ALSAInput::Device> available_alsa_cards;
- StereoFilter locut; // Default cutoff 120 Hz, 24 dB/oct.
std::atomic<float> locut_cutoff_hz;
- std::atomic<bool> locut_enabled{true};
+ StereoFilter locut[MAX_BUSES]; // Default cutoff 120 Hz, 24 dB/oct.
+ std::atomic<bool> locut_enabled[MAX_BUSES];
// First compressor; takes us up to about -12 dBFS.
mutable std::mutex compressor_mutex;
CorrelationMeasurer correlation; // Under audio_measure_mutex.
Resampler peak_resampler; // Under audio_measure_mutex.
std::atomic<float> peak{0.0f};
+
+ // Under audio_measure_mutex. Note that Ebu_r128_proc has a broken
+ // copy constructor (it uses the default, but holds arrays),
+ // so we can't just use raw Ebu_r128_proc elements, but need to use
+ // unique_ptrs.
+ std::vector<std::unique_ptr<Ebu_r128_proc>> bus_r128;
};
#endif // !defined(_AUDIO_MIXER_H)