summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2006-10-31 16:19:29 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2006-10-31 16:19:29 +0000
commit1d48090c5264013297bf9d310529f09c0db3ccb2 (patch)
tree0fa20f68af73e2651060e16f08bfac202d516d8a
parentd99758ff374876660a304356b8398299aa1cb61a (diff)
disk space reflects number of inputs per track; more libsndfile debuggin
git-svn-id: svn://localhost/ardour2/trunk@1037 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r--gtk2_ardour/ardour_ui.cc12
-rw-r--r--gtk2_ardour/ardour_ui.h4
-rw-r--r--libs/ardour/sndfilesource.cc8
3 files changed, 14 insertions, 10 deletions
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc
index 18cb808eeb..ff75d50cd0 100644
--- a/gtk2_ardour/ardour_ui.cc
+++ b/gtk2_ardour/ardour_ui.cc
@@ -538,11 +538,11 @@ ARDOUR_UI::update_buffer_load ()
}
void
-ARDOUR_UI::count_recenabled_diskstreams (Route& route)
+ARDOUR_UI::count_recenabled_streams (Route& route)
{
Track* track = dynamic_cast<Track*>(&route);
if (track && track->diskstream()->record_enabled()) {
- rec_enabled_diskstreams++;
+ rec_enabled_streams += track->n_inputs();
}
}
@@ -564,11 +564,11 @@ ARDOUR_UI::update_disk_space()
int secs;
nframes_t fr = session->frame_rate();
- rec_enabled_diskstreams = 0;
- session->foreach_route (this, &ARDOUR_UI::count_recenabled_diskstreams);
+ rec_enabled_streams = 0;
+ session->foreach_route (this, &ARDOUR_UI::count_recenabled_streams);
- if (rec_enabled_diskstreams) {
- frames /= rec_enabled_diskstreams;
+ if (rec_enabled_streams) {
+ frames /= rec_enabled_streams;
}
hrs = frames / (fr * 3600);
diff --git a/gtk2_ardour/ardour_ui.h b/gtk2_ardour/ardour_ui.h
index 3b941b6b3c..6854b15364 100644
--- a/gtk2_ardour/ardour_ui.h
+++ b/gtk2_ardour/ardour_ui.h
@@ -578,8 +578,8 @@ class ARDOUR_UI : public Gtkmm2ext::UI
void toggle_record_enable (uint32_t);
- uint32_t rec_enabled_diskstreams;
- void count_recenabled_diskstreams (ARDOUR::Route&);
+ uint32_t rec_enabled_streams;
+ void count_recenabled_streams (ARDOUR::Route&);
About* about;
bool shown_flag;
diff --git a/libs/ardour/sndfilesource.cc b/libs/ardour/sndfilesource.cc
index 0443ffcc55..5e6f512e53 100644
--- a/libs/ardour/sndfilesource.cc
+++ b/libs/ardour/sndfilesource.cc
@@ -507,10 +507,14 @@ SndFileSource::set_header_timeline_position ()
nframes_t
SndFileSource::write_float (Sample* data, nframes_t frame_pos, nframes_t cnt)
{
- if (sf_seek (sf, frame_pos, SEEK_SET|SFM_WRITE) != frame_pos) {
+ nframes_t where;
+
+ where = sf_seek (sf, frame_pos, SEEK_SET|SFM_WRITE);
+
+ if (where != frame_pos) {
char errbuf[256];
sf_error_str (0, errbuf, sizeof (errbuf) - 1);
- error << string_compose (_("%1: cannot seek to %2 (libsndfile error: %3"), _path, frame_pos, errbuf) << endmsg;
+ error << string_compose (_("%1: cannot seek to %2, now at %3 (libsndfile error: %4"), _path, frame_pos, where, errbuf) << endmsg;
return 0;
}