disk space reflects number of inputs per track; more libsndfile debuggin
git-svn-id: svn://localhost/ardour2/trunk@1037 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
d99758ff37
commit
1d48090c52
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user