mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-24 07:27:44 +01:00
[Summary] Blocked import for multichannel files. Added setting default conversion for imported files to Best (when needed).
This commit is contained in:
parent
d4fb0c6f86
commit
9dd92eba38
2 changed files with 23 additions and 3 deletions
|
|
@ -26,6 +26,7 @@
|
|||
#include "ardour/profile.h"
|
||||
#include "ardour/rc_configuration.h"
|
||||
#include "ardour/smf_source.h"
|
||||
#include "ardour/audiofilesource.h"
|
||||
|
||||
#include "canvas/canvas.h"
|
||||
#include "canvas/rectangle.h"
|
||||
|
|
@ -457,7 +458,23 @@ Editor::track_canvas_drag_data_received (const RefPtr<Gdk::DragContext>& context
|
|||
bool
|
||||
Editor::idle_drop_paths (vector<string> paths, framepos_t frame, double ypos, bool copy)
|
||||
{
|
||||
drop_paths_part_two (paths, frame, ypos, copy);
|
||||
ARDOUR::SoundFileInfo info;
|
||||
std::string errmsg;
|
||||
bool go_ahead = true;
|
||||
|
||||
for (std::vector<std::string>::const_iterator i = paths.begin(); i != paths.end(); ++i) {
|
||||
if (ARDOUR::AudioFileSource::get_soundfile_info (*i, info, errmsg)) {
|
||||
if (info.channels > 2 ) {
|
||||
WavesMessageDialog msg ("", string_compose (_("One or more of the selected files\ncannot be used by %1"), PROGRAM_NAME));
|
||||
msg.run ();
|
||||
go_ahead = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (go_ahead) {
|
||||
drop_paths_part_two (paths, frame, ypos, copy);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -70,6 +70,7 @@ WavesImportDialog::WavesImportDialog (ARDOUR::Session* session, uint32_t selecte
|
|||
|
||||
_insert_at_dropdown.set_current_item (0);
|
||||
_mapping_dropdown.set_current_item (0);
|
||||
_quality_dropdown.set_current_item (0);
|
||||
|
||||
get_waves_button ("import_button").signal_clicked.connect (sigc::mem_fun (*this, &WavesImportDialog::_on_import_button));
|
||||
get_waves_button ("cancel_button").signal_clicked.connect (sigc::mem_fun (*this, &WavesImportDialog::_on_cancel_button));
|
||||
|
|
@ -350,8 +351,10 @@ WavesImportDialog::_check_info (bool& same_size, bool& src_needed, bool& multich
|
|||
multichannel = false;
|
||||
|
||||
for (std::vector<std::string>::const_iterator i = _files_to_import.begin(); i != _files_to_import.end(); ++i) {
|
||||
|
||||
if (ARDOUR::AudioFileSource::get_soundfile_info (*i, info, errmsg)) {
|
||||
if (info.channels > 2 ) {
|
||||
err = true;
|
||||
}
|
||||
if (info.channels > 1) {
|
||||
multichannel = true;
|
||||
}
|
||||
|
|
@ -376,7 +379,7 @@ WavesImportDialog::_check_info (bool& same_size, bool& src_needed, bool& multich
|
|||
/* XXX we need err = true handling here in case
|
||||
we can't check the file
|
||||
*/
|
||||
|
||||
err = true;
|
||||
} else {
|
||||
err = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue