2016-05-19 10:29:39 -04:00
|
|
|
/*
|
2023-01-05 18:53:22 -05:00
|
|
|
* Copyright (C) 2016-2023 Robin Gareus <robin@gareus.org>
|
2016-05-19 10:29:39 -04:00
|
|
|
*
|
2019-08-02 17:26:43 -04:00
|
|
|
* 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.
|
2016-05-19 10:29:39 -04:00
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*
|
2019-08-02 17:26:43 -04:00
|
|
|
* 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.
|
2016-05-19 10:29:39 -04:00
|
|
|
*/
|
|
|
|
|
2024-09-25 20:38:59 -04:00
|
|
|
#pragma once
|
2016-05-19 10:29:39 -04:00
|
|
|
|
|
|
|
#include "ardour/plugin_insert.h"
|
|
|
|
#include "ardour/route.h"
|
|
|
|
|
2017-07-15 11:38:28 -04:00
|
|
|
#include "widgets/ardour_button.h"
|
|
|
|
#include "widgets/ardour_dropdown.h"
|
|
|
|
|
2016-05-19 10:29:39 -04:00
|
|
|
#include "ardour_dialog.h"
|
|
|
|
|
|
|
|
class PluginSetupDialog : public ArdourDialog
|
|
|
|
{
|
|
|
|
public:
|
2023-02-16 18:33:28 -05:00
|
|
|
PluginSetupDialog (std::shared_ptr<ARDOUR::Route>, std::shared_ptr<ARDOUR::PluginInsert>, ARDOUR::Route::PluginSetupOptions);
|
2016-05-19 10:29:39 -04:00
|
|
|
|
2017-01-20 18:40:18 -05:00
|
|
|
bool fan_out () const { return _fan_out.get_active () && _fan_out.get_sensitive (); }
|
|
|
|
|
2023-01-05 18:53:22 -05:00
|
|
|
static std::string preset_label (uint32_t);
|
|
|
|
|
2016-05-19 10:29:39 -04:00
|
|
|
private:
|
|
|
|
void setup_output_presets ();
|
|
|
|
void update_sensitivity (uint32_t);
|
|
|
|
bool io_match () const;
|
|
|
|
|
|
|
|
void select_output_preset (uint32_t n_audio);
|
|
|
|
void apply_mapping ();
|
2017-01-20 18:40:18 -05:00
|
|
|
void toggle_fan_out ();
|
2016-05-19 10:29:39 -04:00
|
|
|
|
2023-02-16 18:33:28 -05:00
|
|
|
std::shared_ptr<ARDOUR::Route> _route;
|
|
|
|
std::shared_ptr<ARDOUR::PluginInsert> _pi;
|
2016-05-19 10:29:39 -04:00
|
|
|
|
2017-07-15 11:38:28 -04:00
|
|
|
ArdourWidgets::ArdourDropdown _out_presets;
|
|
|
|
ArdourWidgets::ArdourButton _keep_mapping;
|
|
|
|
ArdourWidgets::ArdourButton _fan_out;
|
2016-05-19 10:29:39 -04:00
|
|
|
ARDOUR::ChanCount _cur_inputs;
|
|
|
|
ARDOUR::ChanCount _cur_outputs;
|
|
|
|
};
|
|
|
|
|