2010-10-25 20:30:22 -04:00
|
|
|
/*
|
2019-08-02 17:26:43 -04:00
|
|
|
* Copyright (C) 2010 Carl Hetherington <carl@carlh.net>
|
|
|
|
* Copyright (C) 2016-2017 Robin Gareus <robin@gareus.org>
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
*/
|
2010-10-25 20:30:22 -04:00
|
|
|
|
|
|
|
#include "ardour_dialog.h"
|
2010-10-27 10:22:24 -04:00
|
|
|
#include "progress_reporter.h"
|
2010-10-25 20:30:22 -04:00
|
|
|
|
|
|
|
namespace Gtk {
|
|
|
|
class RadioButton;
|
|
|
|
class SpinButton;
|
|
|
|
class ProgressBar;
|
2021-07-19 22:31:13 -04:00
|
|
|
class ComboBoxText;
|
2010-10-25 20:30:22 -04:00
|
|
|
}
|
|
|
|
|
2010-10-27 10:22:24 -04:00
|
|
|
class NormalizeDialog : public ArdourDialog, public ProgressReporter
|
2010-10-25 20:30:22 -04:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
NormalizeDialog (bool);
|
|
|
|
|
|
|
|
bool normalize_individually () const;
|
2021-07-19 22:31:13 -04:00
|
|
|
bool use_true_peak () const;
|
2016-08-13 08:50:59 -04:00
|
|
|
bool constrain_rms () const;
|
2021-07-19 22:31:13 -04:00
|
|
|
bool constrain_lufs () const;
|
|
|
|
|
2016-08-13 08:50:59 -04:00
|
|
|
double target_peak () const;
|
|
|
|
double target_rms () const;
|
2021-07-19 22:31:13 -04:00
|
|
|
double target_lufs () const;
|
|
|
|
|
2010-10-28 13:01:15 -04:00
|
|
|
int run ();
|
2010-10-25 20:30:22 -04:00
|
|
|
|
2017-04-20 13:03:52 -04:00
|
|
|
void on_response (int response_id) {
|
|
|
|
Gtk::Dialog::on_response (response_id);
|
|
|
|
}
|
|
|
|
|
2010-10-25 20:30:22 -04:00
|
|
|
private:
|
2010-10-27 10:22:24 -04:00
|
|
|
void update_progress_gui (float);
|
2010-10-28 13:09:32 -04:00
|
|
|
void button_clicked (int);
|
2016-08-13 08:50:59 -04:00
|
|
|
void update_sensitivity ();
|
2011-06-01 13:00:29 -04:00
|
|
|
|
2021-07-19 22:31:13 -04:00
|
|
|
Gtk::ComboBoxText* _dbfs_dbtp;
|
|
|
|
Gtk::RadioButton* _normalize_individually;
|
|
|
|
Gtk::CheckButton* _constrain_rms;
|
|
|
|
Gtk::CheckButton* _constrain_lufs;
|
|
|
|
Gtk::SpinButton* _spin_peak;
|
|
|
|
Gtk::SpinButton* _spin_rms;
|
|
|
|
Gtk::SpinButton* _spin_lufs;
|
|
|
|
Gtk::ProgressBar* _progress_bar;
|
2010-10-25 20:30:22 -04:00
|
|
|
|
|
|
|
static double _last_normalization_value;
|
2016-08-13 08:50:59 -04:00
|
|
|
static double _last_rms_target_value;
|
2021-07-19 22:31:13 -04:00
|
|
|
static double _last_lufs_target_value;
|
|
|
|
|
2010-10-28 20:40:08 -04:00
|
|
|
static bool _last_normalize_individually;
|
2021-07-19 22:31:13 -04:00
|
|
|
static bool _last_normalize_true_peak;
|
2016-08-13 08:50:59 -04:00
|
|
|
static bool _last_constrain_rms;
|
2021-07-19 22:31:13 -04:00
|
|
|
static bool _last_constrain_lufs;
|
2010-10-25 20:30:22 -04:00
|
|
|
};
|