mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-11 09:06:33 +01:00
remove last ofstream
This commit is contained in:
parent
8e83ca5753
commit
6ec38e9193
2 changed files with 26 additions and 10 deletions
|
|
@ -22,17 +22,20 @@
|
||||||
#define __ardour_export_handler_h__
|
#define __ardour_export_handler_h__
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <fstream>
|
|
||||||
|
|
||||||
#include <boost/operators.hpp>
|
#include <boost/operators.hpp>
|
||||||
#include <boost/shared_ptr.hpp>
|
#include <boost/shared_ptr.hpp>
|
||||||
|
|
||||||
|
#include "pbd/gstdio_compat.h"
|
||||||
|
|
||||||
#include "ardour/export_pointers.h"
|
#include "ardour/export_pointers.h"
|
||||||
#include "ardour/session.h"
|
#include "ardour/session.h"
|
||||||
#include "ardour/libardour_visibility.h"
|
#include "ardour/libardour_visibility.h"
|
||||||
#include "ardour/types.h"
|
#include "ardour/types.h"
|
||||||
#include "pbd/signals.h"
|
#include "pbd/signals.h"
|
||||||
|
|
||||||
|
#include "i18n.h"
|
||||||
|
|
||||||
namespace AudioGrapher {
|
namespace AudioGrapher {
|
||||||
class BroadcastInfo;
|
class BroadcastInfo;
|
||||||
}
|
}
|
||||||
|
|
@ -156,13 +159,31 @@ class LIBARDOUR_API ExportHandler : public ExportElementFactory, public sigc::tr
|
||||||
struct CDMarkerStatus {
|
struct CDMarkerStatus {
|
||||||
CDMarkerStatus (std::string out_file, ExportTimespanPtr timespan,
|
CDMarkerStatus (std::string out_file, ExportTimespanPtr timespan,
|
||||||
ExportFormatSpecPtr format, std::string filename)
|
ExportFormatSpecPtr format, std::string filename)
|
||||||
: out (out_file.c_str()), timespan (timespan), format (format), filename (filename), marker(0)
|
: path (out_file)
|
||||||
, track_number (1), track_position (0), track_duration (0), track_start_frame (0)
|
, timespan (timespan)
|
||||||
, index_number (1), index_position (0)
|
, format (format)
|
||||||
|
, filename (filename)
|
||||||
|
, marker(0)
|
||||||
|
, track_number (1)
|
||||||
|
, track_position (0)
|
||||||
|
, track_duration (0)
|
||||||
|
, track_start_frame (0)
|
||||||
|
, index_number (1)
|
||||||
|
, index_position (0)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
~CDMarkerStatus () {
|
||||||
|
if (!g_file_set_contents (path.c_str(), out.str().c_str(), -1, NULL)) {
|
||||||
|
PBD::error << string_compose(_("Editor: cannot open \"%1\" as export file for CD marker file"), path) << endmsg;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/* I/O */
|
||||||
|
std::string path;
|
||||||
|
std::stringstream out;
|
||||||
|
|
||||||
/* General info */
|
/* General info */
|
||||||
std::ofstream out;
|
|
||||||
ExportTimespanPtr timespan;
|
ExportTimespanPtr timespan;
|
||||||
ExportFormatSpecPtr format;
|
ExportFormatSpecPtr format;
|
||||||
std::string filename;
|
std::string filename;
|
||||||
|
|
|
||||||
|
|
@ -425,11 +425,6 @@ ExportHandler::export_cd_marker_file (ExportTimespanPtr timespan, ExportFormatSp
|
||||||
|
|
||||||
CDMarkerStatus status (filepath, timespan, file_format, filename);
|
CDMarkerStatus status (filepath, timespan, file_format, filename);
|
||||||
|
|
||||||
if (!status.out) {
|
|
||||||
error << string_compose(_("Editor: cannot open \"%1\" as export file for CD marker file"), filepath) << endmsg;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
(this->*header_func) (status);
|
(this->*header_func) (status);
|
||||||
|
|
||||||
/* Get locations and sort */
|
/* Get locations and sort */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue