projects
/
ardour.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Unhardode log-message domain when logging to stdout
[ardour.git]
/
gtk2_ardour
/
sfdb_ui.cc
diff --git
a/gtk2_ardour/sfdb_ui.cc
b/gtk2_ardour/sfdb_ui.cc
index e9000fa096eb455a12b65873b138d4048b9b7bcd..37a9126a8ca6916f419639bf1f683f992982740e 100644
(file)
--- a/
gtk2_ardour/sfdb_ui.cc
+++ b/
gtk2_ardour/sfdb_ui.cc
@@
-21,8
+21,6
@@
#include "gtk2ardour-config.h"
#endif
#include "gtk2ardour-config.h"
#endif
-#include "pbd/i18n.h"
-
#include <map>
#include <cerrno>
#include <sstream>
#include <map>
#include <cerrno>
#include <sstream>
@@
-31,6
+29,7
@@
#include <limits.h>
#include <gtkmm/box.h>
#include <limits.h>
#include <gtkmm/box.h>
+#include <gtkmm/scrolledwindow.h>
#include <gtkmm/stock.h>
#include "pbd/gstdio_compat.h"
#include <gtkmm/stock.h>
#include "pbd/gstdio_compat.h"
@@
-62,7
+61,6
@@
#include "ardour_ui.h"
#include "editing.h"
#include "gui_thread.h"
#include "ardour_ui.h"
#include "editing.h"
#include "gui_thread.h"
-#include "prompter.h"
#include "sfdb_ui.h"
#include "editing.h"
#include "gain_meter.h"
#include "sfdb_ui.h"
#include "editing.h"
#include "gain_meter.h"
@@
-73,6
+71,8
@@
#include "sfdb_freesound_mootcher.h"
#include "sfdb_freesound_mootcher.h"
+#include "pbd/i18n.h"
+
using namespace ARDOUR;
using namespace PBD;
using namespace std;
using namespace ARDOUR;
using namespace PBD;
using namespace std;
@@
-199,7
+199,7
@@
SoundFileBox::SoundFileBox (bool /*persistent*/)
table.attach (timecode_clock, 1, 2, 5, 6, FILL, FILL);
table.attach (tempomap_value, 1, 2, 6, 7, FILL, FILL);
table.attach (timecode_clock, 1, 2, 5, 6, FILL, FILL);
table.attach (tempomap_value, 1, 2, 6, 7, FILL, FILL);
- length_clock.set_mode (ARDOUR_UI::instance()->
second
ary_clock->mode());
+ length_clock.set_mode (ARDOUR_UI::instance()->
prim
ary_clock->mode());
timecode_clock.set_mode (AudioClock::Timecode);
main_box.pack_start (table, false, false);
timecode_clock.set_mode (AudioClock::Timecode);
main_box.pack_start (table, false, false);
@@
-275,7
+275,7
@@
SoundFileBox::audition_active(bool active) {
}
void
}
void
-SoundFileBox::audition_progress(ARDOUR::
framecnt_t pos, ARDOUR::fram
ecnt_t len) {
+SoundFileBox::audition_progress(ARDOUR::
samplecnt_t pos, ARDOUR::sampl
ecnt_t len) {
if (!_seeking) {
seek_slider.set_value( 1000.0 * pos / len);
seek_slider.set_sensitive (true);
if (!_seeking) {
seek_slider.set_value( 1000.0 * pos / len);
seek_slider.set_sensitive (true);
@@
-397,7
+397,7
@@
SoundFileBox::setup_labels (const string& filename)
format_text.set_text (n);
channels_value.set_text (to_string (sf_info.channels));
format_text.set_text (n);
channels_value.set_text (to_string (sf_info.channels));
- if (_session && sf_info.samplerate != _session->
fram
e_rate()) {
+ if (_session && sf_info.samplerate != _session->
sampl
e_rate()) {
samplerate.set_markup (string_compose ("<b>%1</b>", _("Sample rate:")));
samplerate_value.set_markup (string_compose (X_("<b>%1 Hz</b>"), sf_info.samplerate));
samplerate_value.set_name ("NewSessionSR1Label");
samplerate.set_markup (string_compose ("<b>%1</b>", _("Sample rate:")));
samplerate_value.set_markup (string_compose (X_("<b>%1 Hz</b>"), sf_info.samplerate));
samplerate_value.set_name ("NewSessionSR1Label");
@@
-409,7
+409,7
@@
SoundFileBox::setup_labels (const string& filename)
samplerate.set_name ("NewSessionSR2Label");
}
samplerate.set_name ("NewSessionSR2Label");
}
-
framecnt_t const nfr = _session ? _session->nominal_fram
e_rate() : 25;
+
samplecnt_t const nfr = _session ? _session->nominal_sampl
e_rate() : 25;
double src_coef = (double) nfr / sf_info.samplerate;
length_clock.set (sf_info.length * src_coef + 0.5, true);
double src_coef = (double) nfr / sf_info.samplerate;
length_clock.set (sf_info.length * src_coef + 0.5, true);
@@
-516,7
+516,7
@@
SoundFileBox::audition ()
SourceFactory::createExternal (DataType::AUDIO, *_session,
path, n,
Source::Flag (ARDOUR::AudioFileSource::NoPeakFile), false));
SourceFactory::createExternal (DataType::AUDIO, *_session,
path, n,
Source::Flag (ARDOUR::AudioFileSource::NoPeakFile), false));
- if (afs->sample_rate() != _session->nominal_
fram
e_rate()) {
+ if (afs->sample_rate() != _session->nominal_
sampl
e_rate()) {
boost::shared_ptr<SrcFileSource> sfs (new SrcFileSource(*_session, afs, _src_quality));
srclist.push_back(sfs);
} else {
boost::shared_ptr<SrcFileSource> sfs (new SrcFileSource(*_session, afs, _src_quality));
srclist.push_back(sfs);
} else {
@@
-549,16
+549,16
@@
SoundFileBox::audition ()
r = boost::dynamic_pointer_cast<AudioRegion> (RegionFactory::create (srclist, plist, false));
}
r = boost::dynamic_pointer_cast<AudioRegion> (RegionFactory::create (srclist, plist, false));
}
-
fram
eoffset_t audition_position = 0;
+
sampl
eoffset_t audition_position = 0;
switch(_import_position) {
case ImportAtTimestamp:
audition_position = 0;
break;
case ImportAtPlayhead:
switch(_import_position) {
case ImportAtTimestamp:
audition_position = 0;
break;
case ImportAtPlayhead:
- audition_position = _session->transport_
fram
e();
+ audition_position = _session->transport_
sampl
e();
break;
case ImportAtStart:
break;
case ImportAtStart:
- audition_position = _session->current_start_
fram
e();
+ audition_position = _session->current_start_
sampl
e();
break;
case ImportAtEditPoint:
audition_position = PublicEditor::instance().get_preferred_edit_position ();
break;
case ImportAtEditPoint:
audition_position = PublicEditor::instance().get_preferred_edit_position ();
@@
-855,6
+855,7
@@
void
SoundFileBrowser::on_show ()
{
ArdourWindow::on_show ();
SoundFileBrowser::on_show ()
{
ArdourWindow::on_show ();
+ reset_options ();
start_metering ();
}
start_metering ();
}
@@
-1636,7
+1637,7
@@
bool
SoundFileOmega::check_info (const vector<string>& paths, bool& same_size, bool& src_needed, bool& multichannel)
{
SoundFileInfo info;
SoundFileOmega::check_info (const vector<string>& paths, bool& same_size, bool& src_needed, bool& multichannel)
{
SoundFileInfo info;
-
fram
epos_t sz = 0;
+
sampl
epos_t sz = 0;
bool err = false;
string errmsg;
bool err = false;
string errmsg;
@@
-1658,7
+1659,7
@@
SoundFileOmega::check_info (const vector<string>& paths, bool& same_size, bool&
}
}
}
}
- if (info.samplerate != _session->
fram
e_rate()) {
+ if (info.samplerate != _session->
sampl
e_rate()) {
src_needed = true;
}
src_needed = true;
}
@@
-2028,13
+2029,15
@@
SoundFileOmega::reset (uint32_t selected_audio_tracks, uint32_t selected_midi_tr
chooser.set_filter (audio_and_midi_filter);
}
chooser.set_filter (audio_and_midi_filter);
}
- reset_options ();
+ if (is_visible()) {
+ reset_options ();
+ }
}
void
SoundFileOmega::file_selection_changed ()
{
}
void
SoundFileOmega::file_selection_changed ()
{
- if (resetting_ourselves) {
+ if (resetting_ourselves
|| !is_visible ()
) {
return;
}
return;
}
@@
-2054,7
+2057,7
@@
SoundFileOmega::do_something (int action)
{
SoundFileBrowser::do_something (action);
{
SoundFileBrowser::do_something (action);
- if (action == RESPONSE_CLOSE) {
+ if (action == RESPONSE_CLOSE
|| !ARDOUR_UI_UTILS::engine_is_running ()
) {
hide ();
return;
}
hide ();
return;
}
@@
-2066,7
+2069,7
@@
SoundFileOmega::do_something (int action)
ImportMode mode = get_mode ();
ImportDisposition chns = get_channel_disposition ();
PluginInfoPtr instrument = instrument_combo.selected_instrument();
ImportMode mode = get_mode ();
ImportDisposition chns = get_channel_disposition ();
PluginInfoPtr instrument = instrument_combo.selected_instrument();
-
fram
epos_t where;
+
sampl
epos_t where;
MidiTrackNameSource mts = get_midi_track_name_source ();
MidiTempoMapDisposition mtd = (get_use_smf_tempo_map () ? SMFTempoUse : SMFTempoIgnore);
MidiTrackNameSource mts = get_midi_track_name_source ();
MidiTempoMapDisposition mtd = (get_use_smf_tempo_map () ? SMFTempoUse : SMFTempoIgnore);
@@
-2078,10
+2081,10
@@
SoundFileOmega::do_something (int action)
where = -1;
break;
case ImportAtPlayhead:
where = -1;
break;
case ImportAtPlayhead:
- where = _session->transport_
fram
e();
+ where = _session->transport_
sampl
e();
break;
case ImportAtStart:
break;
case ImportAtStart:
- where = _session->current_start_
fram
e();
+ where = _session->current_start_
sampl
e();
break;
}
break;
}