+ void set_frame_ready_callback(Output output, new_frame_ready_callback_t callback)
+ {
+ output_channel[output].set_frame_ready_callback(callback);
+ }
+
+ typedef std::function<void(float level_lufs, float peak_db,
+ float global_level_lufs, float range_low_lufs, float range_high_lufs,
+ float gain_staging_db, float final_makeup_gain_db)> audio_level_callback_t;
+ void set_audio_level_callback(audio_level_callback_t callback)
+ {
+ audio_level_callback = callback;
+ }
+
+ std::vector<std::string> get_transition_names()
+ {
+ return theme->get_transition_names(pts());
+ }
+
+ unsigned get_num_channels() const
+ {
+ return theme->get_num_channels();
+ }
+
+ std::string get_channel_name(unsigned channel) const
+ {
+ return theme->get_channel_name(channel);
+ }
+
+ bool get_supports_set_wb(unsigned channel) const
+ {
+ return theme->get_supports_set_wb(channel);
+ }
+
+ void set_wb(unsigned channel, double r, double g, double b) const
+ {
+ theme->set_wb(channel, r, g, b);
+ }
+
+ void set_locut_cutoff(float cutoff_hz)
+ {
+ locut_cutoff_hz = cutoff_hz;
+ }
+
+ float get_limiter_threshold_dbfs()
+ {
+ return limiter_threshold_dbfs;
+ }
+
+ float get_compressor_threshold_dbfs()
+ {
+ return compressor_threshold_dbfs;
+ }
+
+ void set_limiter_threshold_dbfs(float threshold_dbfs)
+ {
+ limiter_threshold_dbfs = threshold_dbfs;
+ }
+
+ void set_compressor_threshold_dbfs(float threshold_dbfs)
+ {
+ compressor_threshold_dbfs = threshold_dbfs;
+ }
+
+ void set_limiter_enabled(bool enabled)
+ {
+ limiter_enabled = enabled;
+ }
+
+ void set_compressor_enabled(bool enabled)
+ {
+ compressor_enabled = enabled;
+ }
+
+ void set_gain_staging_db(float gain_db)
+ {
+ std::unique_lock<std::mutex> lock(compressor_mutex);
+ level_compressor_enabled = false;
+ gain_staging_db = gain_db;
+ }
+
+ void set_gain_staging_auto(bool enabled)
+ {
+ std::unique_lock<std::mutex> lock(compressor_mutex);
+ level_compressor_enabled = enabled;
+ }
+
+ void set_final_makeup_gain_db(float gain_db)
+ {
+ std::unique_lock<std::mutex> lock(compressor_mutex);
+ final_makeup_gain_auto = false;
+ final_makeup_gain = pow(10.0f, gain_db / 20.0f);
+ }
+
+ void set_final_makeup_gain_auto(bool enabled)
+ {
+ std::unique_lock<std::mutex> lock(compressor_mutex);
+ final_makeup_gain_auto = enabled;
+ }
+
+ void schedule_cut()
+ {
+ should_cut = true;
+ }
+
+ void reset_meters();