View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0003023 | ardour | bugs | public | 2010-02-09 08:10 | 2010-04-24 10:30 |
| Reporter | giso | Assigned To | |||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | new | Resolution | open | ||
| Product Version | 2.8.4 | ||||
| Summary | 0003023: 24hrs+ available disk space display misleading | ||||
| Description | The available disk space display is displaying '24hrs+' whenever the available space in frames is at least max_frames (=2^32-1). This can be less than 24hrs if more than one stream is activated or if the sampling rate is above 44/48 kHz. | ||||
| Additional Information | A workaround would be to display the correct time (based on rec_enabled_streams) instead of 24hrs+. The better solution would be to use a 64bit type for the return value of 'available_capture_duration'. | ||||
| Tags | No tags attached. | ||||
|
|
The version is all 2.x; source code in 2.8.7 is 'ardour_ui.cc' line 942 and below. The bug was observed while running out of disk space in a multi-channel recording session. |
|
|
If I remember correctly rec armed streams are (or were) taken into consideration for the record time remaining, maybe a bug has crept in. |
|
|
The rec armed streams are taken into consideration only if available_capture_duration() returns less than 'max_frames' frames. For multichannel sessions this might be only a few hours or minutes before the disk is full (in my case it was about 2 hours before the disk was completely full, although it should have been more than 3 hours - I have to check those details). I guess the assumption was made that 2^32 available frames is always enough for a recording session, but that is not necessarily true. I am not sure, but I think it was the same behavior in 0.99, but I cannot remember. It would be nice to fix it in 3.0 (I will try a workaround locally, and will send/upload a patch if it works). |
|
2010-02-09 20:25
|
diskspace_24hrs.patch (1,486 bytes)
--- ../../orig/ardour-2.8.7/gtk2_ardour/ardour_ui.cc 2010-01-16 22:26:07.000000000 +0100
+++ ardour_ui.cc 2010-02-09 21:07:12.919781001 +0100
@@ -940,31 +940,31 @@
}
nframes_t frames = session->available_capture_duration();
+ bool max_frames_reached = (frames==max_frames);
char buf[64];
- if (frames == max_frames) {
- strcpy (buf, _("Disk: 24hrs+"));
- } else {
- int hrs;
- int mins;
- int secs;
- nframes_t fr = session->frame_rate();
-
- rec_enabled_streams = 0;
- session->foreach_route (this, &ARDOUR_UI::count_recenabled_streams);
-
- if (rec_enabled_streams) {
- frames /= rec_enabled_streams;
- }
-
- hrs = frames / (fr * 3600);
- frames -= hrs * fr * 3600;
- mins = frames / (fr * 60);
- frames -= mins * fr * 60;
- secs = frames / fr;
-
- snprintf (buf, sizeof(buf), _("Disk: %02dh:%02dm:%02ds"), hrs, mins, secs);
- }
+ int hrs;
+ int mins;
+ int secs;
+ nframes_t fr = session->frame_rate();
+
+ rec_enabled_streams = 0;
+ session->foreach_route (this, &ARDOUR_UI::count_recenabled_streams);
+
+ if (rec_enabled_streams) {
+ frames /= rec_enabled_streams;
+ }
+
+ hrs = frames / (fr * 3600);
+ frames -= hrs * fr * 3600;
+ mins = frames / (fr * 60);
+ frames -= mins * fr * 60;
+ secs = frames / fr;
+
+ if (max_frames_reached)
+ snprintf (buf, sizeof(buf), _("Disk: > %02dh:%02dm"), hrs, mins);
+ else
+ snprintf (buf, sizeof(buf), _("Disk: %02dh:%02dm:%02ds"), hrs, mins, secs);
disk_space_label.set_text (buf);
}
|
|
|
The attached patch will introduce the above mentioned workaround into ARDOUR_UI::update_disk_space() (ardour 2.8.7): If available_capture_duration() returns less than 'max_frames' everything is as before, otherwise instead of just saying "24hrs+" max_frames is translated into hours:minutes based on current settings and the message is "Disk: > %02d:%02d" (hours:minutes). |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2010-02-09 08:10 | giso | New Issue | |
| 2010-02-09 08:11 | giso | Note Added: 0007354 | |
| 2010-02-09 13:09 | oofus | Note Added: 0007355 | |
| 2010-02-09 14:23 | giso | Note Added: 0007356 | |
| 2010-02-09 20:25 | giso | File Added: diskspace_24hrs.patch | |
| 2010-02-09 20:30 | giso | Note Added: 0007357 | |
| 2010-04-24 10:28 | cth103 | Category | bugs => bugs2 |
| 2010-04-24 10:30 | cth103 | Category | bugs2 => bugs |