_info.samplerate = rate;
_info.format = fmt;
- /* do not open the file here - do that in write_unlocked() as needed
- */
+ if (_flags & Destructive) {
+ if (open()) {
+ throw failed_constructor();
+ }
+ } else {
+ /* normal mode: do not open the file here - do that in write_unlocked() as needed
+ */
+ }
}
void
if (_info.channels == 1) {
framecnt_t ret = sf_read_float (sf, dst, file_cnt);
- _read_data_count = ret * sizeof(float);
if (ret != file_cnt) {
char errbuf[256];
sf_error_str (0, errbuf, sizeof (errbuf) - 1);
ptr += _info.channels;
}
- _read_data_count = cnt * sizeof(float);
-
_descriptor->release ();
return nread;
}
compute_and_write_peaks (data, frame_pos, cnt, false, true);
}
- _write_data_count = cnt;
-
return cnt;
}