#include <sstream>
+#include "pbd/filesystem.h"
+
#include "ardour/audioengine.h"
#include "ardour/sndfile_helpers.h"
string filepath = get_target_filepath(
get_selected_file_name(),
currentLocation->name(),
- sndfile_file_ending_from_string(get_selected_header_format()));
+ get_selected_header_format());
initSpec(filepath);
// directory needs to exist and be writable
string dirpath = Glib::path_get_dirname (filepath);
- if (::access (dirpath.c_str(), W_OK) != 0) {
+ if (!exists_and_writable (sys::path (dirpath))) {
string txt = _("Cannot write file in: ") + dirpath;
MessageDialog msg (*this, txt, false, MESSAGE_ERROR, BUTTONS_OK, true);
msg.run();
// flush vector
range_markers_durations_aggregated.resize(0);
- nframes_t duration_before_current_location = 0;
+ framecnt_t duration_before_current_location = 0;
Locations::LocationList::iterator locationIter;
for (locationIter = locations.begin(); locationIter != locations.end(); ++locationIter) {
if(currentLocation->is_range_marker()){
range_markers_durations_aggregated.push_back (duration_before_current_location);
- nframes_t duration = currentLocation->end() - currentLocation->start();
+ framecnt_t duration = currentLocation->end() - currentLocation->start();
range_markers_durations.push_back (duration);
duration_before_current_location += duration;