remove "ardourBuffering" file creation (it was useless, sadly); editor region list now responds to bounds changes; tweak opton in RC config editor
git-svn-id: svn://localhost/ardour2/branches/3.0@7013 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
@@ -920,8 +920,6 @@ ARDOUR_UI::update_buffer_load ()
|
||||
c = _session->capture_load ();
|
||||
p = _session->playback_load ();
|
||||
|
||||
push_buffer_stats (c, p);
|
||||
|
||||
snprintf (buf, sizeof (buf), _("Buffers p:%" PRIu32 "%% c:%" PRIu32 "%%"),
|
||||
_session->playback_load(), _session->capture_load());
|
||||
buffer_load_label.set_text (buf);
|
||||
@@ -3141,62 +3139,11 @@ ARDOUR_UI::xrun_handler(nframes_t where)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::push_buffer_stats (uint32_t capture, uint32_t playback)
|
||||
{
|
||||
time_t now;
|
||||
time (&now);
|
||||
|
||||
while (disk_buffer_stats.size() > 60) {
|
||||
disk_buffer_stats.pop_front ();
|
||||
}
|
||||
|
||||
disk_buffer_stats.push_back (DiskBufferStat (now, capture, playback));
|
||||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::write_buffer_stats ()
|
||||
{
|
||||
std::ofstream fout;
|
||||
struct tm tm;
|
||||
char buf[64];
|
||||
char path[PATH_MAX+1]; int fd;
|
||||
|
||||
strcpy (path, "ardourBufferingXXXXXX");
|
||||
|
||||
if ((fd = mkstemp (path )) < 0) {
|
||||
cerr << X_("cannot find temporary name for buffer stats") << endl;
|
||||
return;
|
||||
}
|
||||
|
||||
fout.open (path);
|
||||
close (fd);
|
||||
|
||||
if (!fout) {
|
||||
cerr << string_compose (X_("cannot open file %1 for buffer stats"), path) << endl;
|
||||
return;
|
||||
}
|
||||
|
||||
for (list<DiskBufferStat>::iterator i = disk_buffer_stats.begin(); i != disk_buffer_stats.end(); ++i) {
|
||||
localtime_r (&(*i).when, &tm);
|
||||
strftime (buf, sizeof (buf), "%T", &tm);
|
||||
fout << buf << ' ' << (*i).capture << ' ' << (*i).playback << endl;
|
||||
}
|
||||
|
||||
disk_buffer_stats.clear ();
|
||||
|
||||
fout.close ();
|
||||
|
||||
cerr << "buffering statistics can be found in: " << path << endl;
|
||||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::disk_overrun_handler ()
|
||||
{
|
||||
ENSURE_GUI_THREAD (*this, &ARDOUR_UI::disk_overrun_handler)
|
||||
|
||||
write_buffer_stats ();
|
||||
|
||||
if (!have_disk_speed_dialog_displayed) {
|
||||
have_disk_speed_dialog_displayed = true;
|
||||
MessageDialog* msg = new MessageDialog (*editor, _("\
|
||||
@@ -3215,8 +3162,6 @@ ARDOUR_UI::disk_underrun_handler ()
|
||||
{
|
||||
ENSURE_GUI_THREAD (*this, &ARDOUR_UI::disk_underrun_handler)
|
||||
|
||||
write_buffer_stats ();
|
||||
|
||||
if (!have_disk_speed_dialog_displayed) {
|
||||
have_disk_speed_dialog_displayed = true;
|
||||
MessageDialog* msg = new MessageDialog (*editor,
|
||||
|
||||
@@ -636,19 +636,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
|
||||
ARDOUR::microseconds_t last_peak_grab;
|
||||
ARDOUR::microseconds_t last_shuttle_request;
|
||||
|
||||
struct DiskBufferStat {
|
||||
time_t when;
|
||||
uint32_t capture;
|
||||
uint32_t playback;
|
||||
|
||||
DiskBufferStat (time_t w, uint32_t c, uint32_t p)
|
||||
: when (w), capture (c), playback (p) {}
|
||||
};
|
||||
|
||||
std::list<DiskBufferStat> disk_buffer_stats;
|
||||
void push_buffer_stats (uint32_t, uint32_t);
|
||||
void write_buffer_stats ();
|
||||
|
||||
bool have_disk_speed_dialog_displayed;
|
||||
void disk_speed_dialog_gone (int ignored_response, Gtk::MessageDialog*);
|
||||
void disk_overrun_handler ();
|
||||
|
||||
@@ -304,8 +304,12 @@ EditorRegions::add_region (boost::shared_ptr<Region> region)
|
||||
void
|
||||
EditorRegions::region_changed (boost::shared_ptr<Region> r, const PropertyChange& what_changed)
|
||||
{
|
||||
if (what_changed.contains (ARDOUR::Properties::name)) {
|
||||
/* find the region in our model and change its name */
|
||||
if (what_changed.contains (ARDOUR::Properties::name) ||
|
||||
what_changed.contains (ARDOUR::Properties::start) ||
|
||||
what_changed.contains (ARDOUR::Properties::position) ||
|
||||
what_changed.contains (ARDOUR::Properties::length)) {
|
||||
|
||||
/* find the region in our model and update its row */
|
||||
TreeModel::Children rows = _model->children ();
|
||||
TreeModel::iterator i = rows.begin ();
|
||||
while (i != rows.end ()) {
|
||||
@@ -320,8 +324,7 @@ EditorRegions::region_changed (boost::shared_ptr<Region> r, const PropertyChange
|
||||
}
|
||||
|
||||
if (j != children.end()) {
|
||||
(*j)[_columns.name] = r->name ();
|
||||
break;
|
||||
populate_row (r, *j);
|
||||
}
|
||||
|
||||
++i;
|
||||
@@ -718,7 +721,7 @@ EditorRegions::populate_row (boost::shared_ptr<Region> region, TreeModel::Row co
|
||||
|
||||
case AudioClock::Frames:
|
||||
snprintf (start_str, sizeof (start_str), "%" PRId64, region->position());
|
||||
snprintf (end_str, sizeof (end_str), "%" PRId64, (region->position() + region->length() - 1));
|
||||
snprintf (end_str, sizeof (end_str), "%" PRId64, (region->last_frame()));
|
||||
snprintf (length_str, sizeof (length_str), "%" PRId64, region->length());
|
||||
snprintf (sync_str, sizeof (sync_str), "%" PRId64, region->sync_position() + region->position());
|
||||
|
||||
|
||||
@@ -1212,7 +1212,7 @@ RCOptionEditor::RCOptionEditor ()
|
||||
add_option (_("Audio"),
|
||||
new BoolOption (
|
||||
"solo-mute-override",
|
||||
_("Override muting"),
|
||||
_("Soloing overrides muting"),
|
||||
sigc::mem_fun (*_rc_config, &RCConfiguration::get_solo_mute_override),
|
||||
sigc::mem_fun (*_rc_config, &RCConfiguration::set_solo_mute_override)
|
||||
));
|
||||
|
||||
Reference in New Issue
Block a user