2010-10-25 20:30:22 -04:00
|
|
|
/*
|
|
|
|
Copyright (C) 2010 Paul Davis
|
|
|
|
|
|
|
|
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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
#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;
|
|
|
|
}
|
|
|
|
|
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;
|
2016-08-13 08:50:59 -04:00
|
|
|
bool constrain_rms () const;
|
|
|
|
double target_peak () const;
|
|
|
|
double target_rms () const;
|
2010-10-28 13:01:15 -04:00
|
|
|
int run ();
|
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
|
|
|
|
2010-10-25 20:30:22 -04:00
|
|
|
Gtk::RadioButton* _normalize_individually;
|
2016-08-13 08:50:59 -04:00
|
|
|
Gtk::CheckButton* _constrain_rms;
|
|
|
|
Gtk::SpinButton* _spin_peak;
|
|
|
|
Gtk::SpinButton* _spin_rms;
|
2010-10-25 20:30:22 -04:00
|
|
|
Gtk::ProgressBar* _progress_bar;
|
|
|
|
|
|
|
|
static double _last_normalization_value;
|
2016-08-13 08:50:59 -04:00
|
|
|
static double _last_rms_target_value;
|
2010-10-28 20:40:08 -04:00
|
|
|
static bool _last_normalize_individually;
|
2016-08-13 08:50:59 -04:00
|
|
|
static bool _last_constrain_rms;
|
2010-10-25 20:30:22 -04:00
|
|
|
};
|