int test_main( int /* argc */, char* /* argv */[] ) { const char * testfile = boost::archive::tmpnam(NULL); BOOST_REQUIRE(NULL != testfile); save_derived(testfile); load_derived(testfile); std::remove(testfile); return EXIT_SUCCESS; }
int Track::copy(double start, double end, FileXML *file, const char *output_path) { // Use a copy of the selection in converted units // So copy_automation doesn't reconvert. int64_t start_unit = to_units(start, 0); int64_t end_unit = to_units(end, 1); file->tag.set_title("TRACK"); file->tag.set_property("RECORD", record); file->tag.set_property("NUDGE", nudge); file->tag.set_property("PLAY", play); file->tag.set_property("GANG", gang); file->tag.set_property("DRAW", draw); file->tag.set_property("EXPAND", expand_view); file->tag.set_property("TRACK_W", track_w); file->tag.set_property("TRACK_H", track_h); save_header(file); file->append_tag(); file->append_newline(); save_derived(file); file->tag.set_title("TITLE"); file->append_tag(); file->append_text(title); file->tag.set_title("/TITLE"); file->append_tag(); file->append_newline(); // if(data_type == TRACK_AUDIO) // file->tag.set_property("TYPE", "AUDIO"); // else // file->tag.set_property("TYPE", "VIDEO"); // // file->append_tag(); // file->append_newline(); edits->copy(start_unit, end_unit, file, output_path); AutoConf auto_conf; auto_conf.set_all(1); automation->copy(start_unit, end_unit, file, 0, 0); for(int i = 0; i < plugin_set.total; i++) { plugin_set.values[i]->copy(start_unit, end_unit, file); } copy_derived(start_unit, end_unit, file); file->tag.set_title("/TRACK"); file->append_tag(); file->append_newline(); file->append_newline(); file->append_newline(); file->append_newline(); return 0; }