mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-07 22:25:46 +01:00
[Summary] Fill Session_Settings tab (FILE TYPE and BIT DEPTH) in Preference_Panel
[Review] GZharun
This commit is contained in:
parent
913d5a04b3
commit
d7c034f15a
7 changed files with 388 additions and 16 deletions
|
|
@ -2934,8 +2934,6 @@ ARDOUR_UI::get_session_parameters (bool quit_on_cancel, bool should_be_new, stri
|
|||
|
||||
if (likely_new && !nsm) {
|
||||
|
||||
bool do_not_create_session = false;
|
||||
|
||||
// Replace session only if file with extension '.ardour' was chosen
|
||||
string suffix = string(statefile_suffix);
|
||||
|
||||
|
|
@ -3140,7 +3138,6 @@ ARDOUR_UI::load_session (const std::string& path, const std::string& snap_name,
|
|||
(void) msg.run ();
|
||||
msg.hide ();
|
||||
}
|
||||
|
||||
|
||||
/* Now the session been created, add the transport controls */
|
||||
new_session->add_controllable(roll_controllable);
|
||||
|
|
@ -3154,6 +3151,8 @@ ARDOUR_UI::load_session (const std::string& path, const std::string& snap_name,
|
|||
set_session (new_session);
|
||||
|
||||
session_loaded = true;
|
||||
|
||||
tracks_control_panel->refresh_session_settings_info();
|
||||
|
||||
goto_editor_window ();
|
||||
|
||||
|
|
@ -3202,6 +3201,9 @@ ARDOUR_UI::build_session (const std::string& path, const std::string& snap_name,
|
|||
msg.run ();
|
||||
return -1;
|
||||
}
|
||||
|
||||
new_session->config.set_native_file_header_format(this->_header_format);
|
||||
new_session->config.set_native_file_data_format (this->_sample_format);
|
||||
|
||||
/* Give the new session the default GUI state, if such things exist */
|
||||
|
||||
|
|
|
|||
|
|
@ -301,6 +301,10 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
|
|||
int disconnect_from_engine ();
|
||||
int reconnect_to_engine ();
|
||||
|
||||
void set_sample_format(ARDOUR::SampleFormat sf) {_sample_format = sf;}
|
||||
void set_header_format(ARDOUR::HeaderFormat hf) {_header_format = hf;}
|
||||
void update_format ();
|
||||
|
||||
protected:
|
||||
friend class PublicEditor;
|
||||
|
||||
|
|
@ -551,7 +555,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
|
|||
void update_sample_rate (ARDOUR::framecnt_t);
|
||||
|
||||
Gtk::Label format_label;
|
||||
void update_format ();
|
||||
|
||||
gint every_second ();
|
||||
gint every_point_one_seconds ();
|
||||
|
|
@ -771,6 +774,10 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
|
|||
void check_announcements ();
|
||||
|
||||
int do_engine_setup(ARDOUR::framecnt_t desired_sample_rate);
|
||||
|
||||
ARDOUR::SampleFormat _sample_format;
|
||||
ARDOUR::HeaderFormat _header_format;
|
||||
|
||||
};
|
||||
|
||||
#endif /* __ardour_gui_h__ */
|
||||
|
|
|
|||
|
|
@ -269,6 +269,7 @@
|
|||
43279460194F0062003C9FEA /* tracks_preferences.xml in Resources */ = {isa = PBXBuildFile; fileRef = 43279430194F0062003C9FEA /* tracks_preferences.xml */; };
|
||||
4327947F194F009E003C9FEA /* tracks.menus.in in Resources */ = {isa = PBXBuildFile; fileRef = 43279475194F009E003C9FEA /* tracks.menus.in */; };
|
||||
43B351ED194F04E00038C140 /* step_editing.bindings in Resources */ = {isa = PBXBuildFile; fileRef = 43B351C0194F04E00038C140 /* step_editing.bindings */; };
|
||||
CEDB41321951C668006E6F77 /* buildlog.txt in Resources */ = {isa = PBXBuildFile; fileRef = CEDB41311951C668006E6F77 /* buildlog.txt */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
|
|
@ -1075,6 +1076,7 @@
|
|||
43B351EE194F12FB0038C140 /* waves_audiobackend.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = waves_audiobackend.xcodeproj; path = ../../libs/backends/wavesaudio/macosx/waves_audiobackend.xcodeproj; sourceTree = "<group>"; };
|
||||
43B351F4194F130C0038C140 /* libardour.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = libardour.xcodeproj; path = ../../libs/ardour/macosx/libardour.xcodeproj; sourceTree = "<group>"; };
|
||||
43B351FA194F131D0038C140 /* pbd.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = pbd.xcodeproj; path = ../../libs/pbd/macosx/pbd.xcodeproj; sourceTree = "<group>"; };
|
||||
CEDB41311951C668006E6F77 /* buildlog.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = buildlog.txt; path = ../../../buildlog.txt; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
|
|
@ -1092,6 +1094,7 @@
|
|||
43279039194EFF24003C9FEA = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
CEDB41311951C668006E6F77 /* buildlog.txt */,
|
||||
43B351FA194F131D0038C140 /* pbd.xcodeproj */,
|
||||
43B351F4194F130C0038C140 /* libardour.xcodeproj */,
|
||||
43B351EE194F12FB0038C140 /* waves_audiobackend.xcodeproj */,
|
||||
|
|
@ -1110,6 +1113,8 @@
|
|||
43279040194EFF38003C9FEA /* source */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
43279210194EFFBA003C9FEA /* tracks_control_panel.cc */,
|
||||
43279212194EFFBA003C9FEA /* tracks_control_panel.logic.cc */,
|
||||
43279043194EFFB9003C9FEA /* actions.cc */,
|
||||
43279045194EFFB9003C9FEA /* add_route_dialog.cc */,
|
||||
43279047194EFFB9003C9FEA /* add_video_dialog.cc */,
|
||||
|
|
@ -1344,8 +1349,6 @@
|
|||
4327920B194EFFBA003C9FEA /* timecode_tester.cc */,
|
||||
4327920C194EFFBA003C9FEA /* track_selection.cc */,
|
||||
4327920E194EFFBA003C9FEA /* track_view_list.cc */,
|
||||
43279210194EFFBA003C9FEA /* tracks_control_panel.cc */,
|
||||
43279212194EFFBA003C9FEA /* tracks_control_panel.logic.cc */,
|
||||
43279214194EFFBA003C9FEA /* transcode_ffmpeg.cc */,
|
||||
43279216194EFFBA003C9FEA /* transcode_video_dialog.cc */,
|
||||
43279218194EFFBA003C9FEA /* transpose_dialog.cc */,
|
||||
|
|
@ -1718,6 +1721,8 @@
|
|||
43279480194F00CB003C9FEA /* headers */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
43B351D4194F04E00038C140 /* tracks_control_panel.h */,
|
||||
43B351D5194F04E00038C140 /* tracks_control_panel.logic.h */,
|
||||
43B350F0194F04E00038C140 /* about.h */,
|
||||
43B350F1194F04E00038C140 /* actions.h */,
|
||||
43B350F2194F04E00038C140 /* add_route_dialog.h */,
|
||||
|
|
@ -1945,8 +1950,6 @@
|
|||
43B351D1194F04E00038C140 /* time_selection.h */,
|
||||
43B351D2194F04E00038C140 /* track_selection.h */,
|
||||
43B351D3194F04E00038C140 /* track_view_list.h */,
|
||||
43B351D4194F04E00038C140 /* tracks_control_panel.h */,
|
||||
43B351D5194F04E00038C140 /* tracks_control_panel.logic.h */,
|
||||
43B351D6194F04E00038C140 /* transcode_ffmpeg.h */,
|
||||
43B351D7194F04E00038C140 /* transcode_video_dialog.h */,
|
||||
43B351D8194F04E00038C140 /* transpose_dialog.h */,
|
||||
|
|
@ -2345,6 +2348,7 @@
|
|||
43279460194F0062003C9FEA /* tracks_preferences.xml in Resources */,
|
||||
4327947F194F009E003C9FEA /* tracks.menus.in in Resources */,
|
||||
43B351ED194F04E00038C140 /* step_editing.bindings in Resources */,
|
||||
CEDB41321951C668006E6F77 /* buildlog.txt in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -89,6 +89,9 @@ TracksControlPanel::TracksControlPanel ()
|
|||
, _stereo_out_button(get_waves_button ("stereo_out_button"))
|
||||
, _name_tracks_after_driver(get_waves_button ("name_tracks_after_driver_button"))
|
||||
, _reset_tracks_name_to_default(get_waves_button ("reset_tracks_name_to_default_button"))
|
||||
, _file_type_combo (get_combo_box_text ("file_type_combo"))
|
||||
, _bit_depth_combo (get_combo_box_text ("bit_depth_combo"))
|
||||
, _frame_rate_combo (get_combo_box_text ("frame_rate_combo"))
|
||||
, _browse_button(get_waves_button("browse_default_folder"))
|
||||
, _have_control (false)
|
||||
, _ignore_changes (0)
|
||||
|
|
|
|||
|
|
@ -71,6 +71,9 @@ class TracksControlPanel : public WavesDialog, public PBD::ScopedConnectionList
|
|||
Gtk::ComboBoxText& _device_combo;
|
||||
Gtk::ComboBoxText& _sample_rate_combo;
|
||||
Gtk::ComboBoxText& _buffer_size_combo;
|
||||
Gtk::ComboBoxText& _file_type_combo;
|
||||
Gtk::ComboBoxText& _bit_depth_combo;
|
||||
Gtk::ComboBoxText& _frame_rate_combo;
|
||||
Gtk::Label& _latency_label;
|
||||
Gtk::Label& _default_open_path;
|
||||
|
||||
|
|
|
|||
|
|
@ -27,6 +27,8 @@
|
|||
|
||||
#include "ardour/engine_state_controller.h"
|
||||
#include "ardour/rc_configuration.h"
|
||||
#include "ardour/recent_sessions.h"
|
||||
#include "ardour/filename_extensions.h"
|
||||
|
||||
#include "ardour/utils.h"
|
||||
#include "ardour_ui.h"
|
||||
|
|
@ -85,7 +87,6 @@ TracksControlPanel::init ()
|
|||
_audio_settings_tab_button.signal_clicked.connect (sigc::mem_fun (*this, &TracksControlPanel::on_audio_settings));
|
||||
_midi_settings_tab_button.signal_clicked.connect (sigc::mem_fun (*this, &TracksControlPanel::on_midi_settings));
|
||||
_session_settings_tab_button.signal_clicked.connect (sigc::mem_fun (*this, &TracksControlPanel::on_session_settings));
|
||||
_control_panel_button.signal_clicked.connect (sigc::mem_fun (*this, &TracksControlPanel::on_control_panel));
|
||||
|
||||
_all_inputs_on_button.signal_clicked.connect (sigc::mem_fun (*this, &TracksControlPanel::on_all_inputs_on_button));
|
||||
_all_inputs_off_button.signal_clicked.connect (sigc::mem_fun (*this, &TracksControlPanel::on_all_inputs_off_button));
|
||||
|
|
@ -117,6 +118,11 @@ TracksControlPanel::init ()
|
|||
_device_combo.signal_changed().connect (sigc::bind (sigc::mem_fun (*this, &TracksControlPanel::device_changed), true) );
|
||||
_sample_rate_combo.signal_changed().connect (sigc::mem_fun (*this, &TracksControlPanel::sample_rate_changed));
|
||||
_buffer_size_combo.signal_changed().connect (sigc::mem_fun (*this, &TracksControlPanel::buffer_size_changed));
|
||||
|
||||
/* Session configuration parameters update */
|
||||
_file_type_combo.signal_changed().connect (sigc::mem_fun (*this, &TracksControlPanel::file_type_changed));
|
||||
_bit_depth_combo.signal_changed().connect (sigc::mem_fun (*this, &TracksControlPanel::bit_depth_changed));
|
||||
_frame_rate_combo.signal_changed().connect (sigc::mem_fun (*this, &TracksControlPanel::frame_rate_changed));
|
||||
|
||||
_name_tracks_after_driver.signal_clicked.connect(sigc::mem_fun (*this, &TracksControlPanel::on_name_tracks_after_driver));
|
||||
_reset_tracks_name_to_default.signal_clicked.connect(sigc::mem_fun (*this, &TracksControlPanel::on_reset_tracks_name_to_default));
|
||||
|
|
@ -136,6 +142,12 @@ TracksControlPanel::init ()
|
|||
populate_midi_ports();
|
||||
populate_default_session_path();
|
||||
|
||||
// Init session Settings
|
||||
populate_file_type_combo();
|
||||
populate_bit_depth_combo();
|
||||
populate_frame_rate_combo();
|
||||
populate_auto_lock_timer();
|
||||
|
||||
_audio_settings_tab_button.set_active(true);
|
||||
}
|
||||
|
||||
|
|
@ -197,6 +209,288 @@ MidiDeviceConnectionControl& TracksControlPanel::add_midi_device_control(const s
|
|||
return midi_device_control;
|
||||
}
|
||||
|
||||
namespace {
|
||||
// Strings which show to user in the Preference panel
|
||||
const std::string string_CAF = "Caf";
|
||||
const std::string string_BWav = "BWav";
|
||||
const std::string string_Aiff = "Aiff";
|
||||
const std::string string_Wav64 = "Wave64";
|
||||
// Strings which stores in projectfiles
|
||||
const std::string xml_string_CAF = "CAF";
|
||||
const std::string xml_string_BWav = "BWF";
|
||||
const std::string xml_string_Aiff = "AIFF";
|
||||
const std::string xml_string_Wav64 = "WAVE64";
|
||||
|
||||
std::string
|
||||
HeaderFormat_to_string(HeaderFormat header_format)
|
||||
{
|
||||
using namespace std;
|
||||
|
||||
switch (header_format) {
|
||||
case CAF:
|
||||
return string_CAF;
|
||||
case BWF:
|
||||
return string_BWav;
|
||||
case AIFF:
|
||||
return string_Aiff;
|
||||
case WAVE64:
|
||||
return string_Wav64;
|
||||
default:
|
||||
return string("");
|
||||
}
|
||||
|
||||
return string("");
|
||||
}
|
||||
|
||||
HeaderFormat
|
||||
string_to_HeaderFormat(std::string s)
|
||||
{
|
||||
if(s == string_CAF)
|
||||
return CAF;
|
||||
|
||||
if(s == string_BWav)
|
||||
return BWF;
|
||||
|
||||
if(s == string_Aiff)
|
||||
return AIFF;
|
||||
|
||||
if(s == string_Wav64)
|
||||
return WAVE64;
|
||||
|
||||
//defaul value
|
||||
return BWF;
|
||||
}
|
||||
|
||||
std::string
|
||||
xml_string_to_user_string(std::string xml_string);
|
||||
|
||||
enum SessionProperty {
|
||||
Native_File_Header_Format,
|
||||
Native_File_Data_Format
|
||||
};
|
||||
|
||||
std::string
|
||||
read_property_from_last_session(SessionProperty session_property)
|
||||
{
|
||||
using namespace std;
|
||||
|
||||
ARDOUR::RecentSessions rs;
|
||||
ARDOUR::read_recent_sessions (rs);
|
||||
|
||||
if( rs.size() > 0 )
|
||||
{
|
||||
string full_session_name = Glib::build_filename( rs[0].second, rs[0].first );
|
||||
full_session_name += statefile_suffix;
|
||||
|
||||
// read property from session projectfile
|
||||
boost::shared_ptr<XMLTree> state_tree(new XMLTree());
|
||||
|
||||
if (!state_tree->read (full_session_name))
|
||||
return string("");
|
||||
|
||||
XMLNode& root (*state_tree->root());
|
||||
|
||||
if (root.name() != X_("Session"))
|
||||
return string("");
|
||||
|
||||
XMLNode* config_main_node = root.child ("Config");
|
||||
if( !config_main_node )
|
||||
return string("");
|
||||
|
||||
XMLNodeList config_nodes_list = config_main_node->children();
|
||||
XMLNodeConstIterator config_node_iter = config_nodes_list.begin();
|
||||
|
||||
string required_property_name;
|
||||
|
||||
switch (session_property) {
|
||||
case Native_File_Header_Format:
|
||||
required_property_name = "native-file-header-format";
|
||||
break;
|
||||
case Native_File_Data_Format:
|
||||
required_property_name = "native-file-data-format";
|
||||
break;
|
||||
default:
|
||||
|
||||
return string("");
|
||||
}
|
||||
|
||||
for (; config_node_iter != config_nodes_list.end(); ++config_node_iter)
|
||||
{
|
||||
XMLNode* config_node = *config_node_iter;
|
||||
XMLProperty* prop = NULL;
|
||||
|
||||
if ( (prop = config_node->property ("name")) != 0 )
|
||||
if( prop->value() == required_property_name )
|
||||
if ( (prop = config_node->property ("value")) != 0 )
|
||||
return xml_string_to_user_string( prop->value() );
|
||||
}
|
||||
}
|
||||
|
||||
return string("");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
TracksControlPanel::populate_file_type_combo()
|
||||
{
|
||||
using namespace std;
|
||||
|
||||
vector<string> file_type_strings;
|
||||
file_type_strings.push_back( HeaderFormat_to_string(CAF) );
|
||||
file_type_strings.push_back( HeaderFormat_to_string(BWF) );
|
||||
file_type_strings.push_back( HeaderFormat_to_string(AIFF) );
|
||||
file_type_strings.push_back( HeaderFormat_to_string(WAVE64) );
|
||||
|
||||
// Get FILE_TYPE from last used session
|
||||
string header_format_string = read_property_from_last_session(Native_File_Header_Format);
|
||||
|
||||
ARDOUR_UI* ardour_ui = ARDOUR_UI::instance();
|
||||
HeaderFormat header_format = string_to_HeaderFormat(header_format_string);
|
||||
ardour_ui->set_header_format( header_format );
|
||||
|
||||
{
|
||||
// set _ignore_changes flag to ignore changes in combo-box callbacks
|
||||
PBD::Unwinder<uint32_t> protect_ignore_changes (_ignore_changes, _ignore_changes + 1);
|
||||
set_popdown_strings (_file_type_combo, file_type_strings);
|
||||
_file_type_combo.set_sensitive (file_type_strings.size() > 1);
|
||||
_file_type_combo.set_active_text( HeaderFormat_to_string(header_format) );
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
namespace {
|
||||
// Strings which show to user in the Preference panel
|
||||
const std::string string_bit32 = "32 bit floating point";
|
||||
const std::string string_bit24 = "24 bit";
|
||||
const std::string string_bit16 = "16 bit";
|
||||
// Strings which stores in projectfiles
|
||||
const std::string xml_string_bit32 = "FormatFloat";
|
||||
const std::string xml_string_bit24 = "FormatInt24";
|
||||
const std::string xml_string_bit16 = "FormatInt16";
|
||||
|
||||
std::string
|
||||
xml_string_to_user_string(std::string xml_string)
|
||||
{
|
||||
// Sample format (Bit depth)
|
||||
if(xml_string == xml_string_bit32)
|
||||
return string_bit32;
|
||||
|
||||
if(xml_string == xml_string_bit24)
|
||||
return string_bit24;
|
||||
|
||||
if(xml_string == xml_string_bit32)
|
||||
return string_bit32;
|
||||
|
||||
if(xml_string == xml_string_bit16)
|
||||
return string_bit16;
|
||||
|
||||
|
||||
// Header format (File type)
|
||||
if(xml_string == xml_string_CAF)
|
||||
return string_CAF;
|
||||
|
||||
if(xml_string == xml_string_BWav)
|
||||
return string_BWav;
|
||||
|
||||
if(xml_string == xml_string_Aiff)
|
||||
return string_Aiff;
|
||||
|
||||
if(xml_string == xml_string_Wav64)
|
||||
return string_Wav64;
|
||||
|
||||
|
||||
return std::string("");
|
||||
}
|
||||
|
||||
std::string
|
||||
SampleFormat_to_string(SampleFormat sample_format)
|
||||
{
|
||||
using namespace std;
|
||||
|
||||
switch (sample_format) {
|
||||
case FormatFloat:
|
||||
return string_bit32;
|
||||
case FormatInt24:
|
||||
return string_bit24;
|
||||
case FormatInt16:
|
||||
return string_bit16;
|
||||
}
|
||||
|
||||
return string("");
|
||||
}
|
||||
|
||||
SampleFormat
|
||||
string_to_SampleFormat(std::string s)
|
||||
{
|
||||
if(s == string_bit32)
|
||||
return FormatFloat;
|
||||
|
||||
if(s == string_bit24)
|
||||
return FormatInt24;
|
||||
|
||||
if(s == string_bit16)
|
||||
return FormatInt16;
|
||||
|
||||
// default value
|
||||
return FormatInt24;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
TracksControlPanel::populate_bit_depth_combo()
|
||||
{
|
||||
using namespace std;
|
||||
|
||||
vector<string> bit_depth_strings;
|
||||
bit_depth_strings.push_back(SampleFormat_to_string(FormatInt16));
|
||||
bit_depth_strings.push_back(SampleFormat_to_string(FormatInt24));
|
||||
bit_depth_strings.push_back(SampleFormat_to_string(FormatFloat));
|
||||
|
||||
// Get BIT_DEPTH from last used session
|
||||
string sample_format_string = read_property_from_last_session(Native_File_Data_Format);
|
||||
|
||||
ARDOUR_UI* ardour_ui = ARDOUR_UI::instance();
|
||||
SampleFormat sample_format = string_to_SampleFormat(sample_format_string);
|
||||
ardour_ui->set_sample_format( sample_format );
|
||||
|
||||
{
|
||||
// set _ignore_changes flag to ignore changes in combo-box callbacks
|
||||
PBD::Unwinder<uint32_t> protect_ignore_changes (_ignore_changes, _ignore_changes + 1);
|
||||
set_popdown_strings (_bit_depth_combo, bit_depth_strings);
|
||||
_bit_depth_combo.set_sensitive (bit_depth_strings.size() > 1);
|
||||
_bit_depth_combo.set_active_text ( SampleFormat_to_string(sample_format) );
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
TracksControlPanel::populate_frame_rate_combo()
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
TracksControlPanel::refresh_session_settings_info()
|
||||
{
|
||||
ARDOUR_UI* ardour_ui = ARDOUR_UI::instance();
|
||||
if( !ardour_ui )
|
||||
return;
|
||||
|
||||
Session* session = ardour_ui->the_session();
|
||||
if( !session )
|
||||
return;
|
||||
_bit_depth_combo.set_active_text( SampleFormat_to_string(session->config.get_native_file_data_format()) );
|
||||
_file_type_combo.set_active_text( HeaderFormat_to_string(session->config.get_native_file_header_format()) );
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
TracksControlPanel::populate_auto_lock_timer()
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
TracksControlPanel::populate_default_session_path()
|
||||
{
|
||||
|
|
@ -519,12 +813,6 @@ TracksControlPanel::cleanup_midi_device_list()
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
TracksControlPanel::on_control_panel(WavesButton*)
|
||||
{
|
||||
}
|
||||
|
||||
void TracksControlPanel::engine_changed ()
|
||||
{
|
||||
if (_ignore_changes) {
|
||||
|
|
@ -660,6 +948,40 @@ TracksControlPanel::on_all_outputs_off_button(WavesButton*)
|
|||
EngineStateController::instance()->set_state_to_all_outputs(false);
|
||||
}
|
||||
|
||||
void
|
||||
TracksControlPanel::file_type_changed()
|
||||
{
|
||||
if (_ignore_changes) {
|
||||
return;
|
||||
}
|
||||
|
||||
std::string s = _file_type_combo.get_active_text();
|
||||
ARDOUR::HeaderFormat header_format = string_to_HeaderFormat(s);
|
||||
|
||||
ARDOUR_UI* ardour_ui = ARDOUR_UI::instance();
|
||||
ardour_ui->set_header_format( header_format );
|
||||
}
|
||||
|
||||
void
|
||||
TracksControlPanel::bit_depth_changed()
|
||||
{
|
||||
if (_ignore_changes) {
|
||||
return;
|
||||
}
|
||||
|
||||
std::string s = _bit_depth_combo.get_active_text();
|
||||
ARDOUR::SampleFormat sample_format = string_to_SampleFormat(s);
|
||||
|
||||
ARDOUR_UI* ardour_ui = ARDOUR_UI::instance();
|
||||
ardour_ui->set_sample_format( sample_format );
|
||||
}
|
||||
|
||||
void
|
||||
TracksControlPanel::frame_rate_changed()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
TracksControlPanel::buffer_size_changed()
|
||||
{
|
||||
|
|
@ -833,6 +1155,25 @@ TracksControlPanel::save_default_session_path()
|
|||
}
|
||||
}
|
||||
|
||||
void TracksControlPanel::update_session_config ()
|
||||
{
|
||||
ARDOUR_UI* ardour_ui = ARDOUR_UI::instance();
|
||||
|
||||
if( ardour_ui )
|
||||
{
|
||||
ARDOUR::Session* session = ardour_ui->the_session();
|
||||
|
||||
if( session )
|
||||
{
|
||||
session->config.set_native_file_header_format( string_to_HeaderFormat(_file_type_combo.get_active_text()) );
|
||||
session->config.set_native_file_data_format ( string_to_SampleFormat(_bit_depth_combo.get_active_text()) );
|
||||
|
||||
ardour_ui->update_format();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
TracksControlPanel::on_ok (WavesButton*)
|
||||
{
|
||||
|
|
@ -840,6 +1181,7 @@ TracksControlPanel::on_ok (WavesButton*)
|
|||
EngineStateController::instance()->push_current_state_to_backend(true);
|
||||
response(Gtk::RESPONSE_OK);
|
||||
|
||||
update_session_config();
|
||||
save_default_session_path();
|
||||
}
|
||||
|
||||
|
|
@ -859,6 +1201,7 @@ TracksControlPanel::on_apply (WavesButton*)
|
|||
EngineStateController::instance()->push_current_state_to_backend(true);
|
||||
response(Gtk::RESPONSE_APPLY);
|
||||
|
||||
update_session_config();
|
||||
save_default_session_path();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
|
||||
// class TracksControlPanel : public WavesDialog {
|
||||
public:
|
||||
void refresh_session_settings_info ();
|
||||
|
||||
private:
|
||||
|
||||
|
|
@ -50,7 +51,6 @@
|
|||
void on_audio_settings (WavesButton*);
|
||||
void on_midi_settings (WavesButton*);
|
||||
void on_session_settings (WavesButton*);
|
||||
void on_control_panel (WavesButton*);
|
||||
void on_multi_out (WavesButton*);
|
||||
void on_stereo_out (WavesButton*);
|
||||
void on_browse_button (WavesButton*);
|
||||
|
|
@ -58,6 +58,7 @@
|
|||
void on_ok(WavesButton*);
|
||||
void on_cancel(WavesButton*);
|
||||
void on_apply(WavesButton*);
|
||||
void update_session_config();
|
||||
void on_capture_active_changed (DeviceConnectionControl* capture_control, bool active);
|
||||
void on_playback_active_changed (DeviceConnectionControl* playback_control, bool active);
|
||||
void on_midi_capture_active_changed (MidiDeviceConnectionControl* control, bool active);
|
||||
|
|
@ -79,6 +80,9 @@
|
|||
void sample_rate_changed ();
|
||||
void engine_running ();
|
||||
void engine_stopped ();
|
||||
void file_type_changed ();
|
||||
void bit_depth_changed ();
|
||||
void frame_rate_changed ();
|
||||
|
||||
void populate_engine_combo ();
|
||||
void populate_device_combo ();
|
||||
|
|
@ -90,6 +94,12 @@
|
|||
void populate_midi_ports();
|
||||
void populate_default_session_path();
|
||||
|
||||
// Session Settings
|
||||
void populate_file_type_combo();
|
||||
void populate_bit_depth_combo();
|
||||
void populate_frame_rate_combo();
|
||||
void populate_auto_lock_timer();
|
||||
|
||||
// Engine State update callback handlers
|
||||
void on_port_registration_update();
|
||||
void on_buffer_size_update ();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue