From f6fdd8dcbf41f864e9f0cc32dabe81fe3533ddfe Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 17 Dec 2009 18:24:23 +0000 Subject: switch to using boost::signals2 instead of sigc++, at least for libardour. not finished yet, but compiles, loads sessions, records and can close a session without a crash git-svn-id: svn://localhost/ardour2/branches/3.0@6372 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/session_export.cc | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'libs/ardour/session_export.cc') diff --git a/libs/ardour/session_export.cc b/libs/ardour/session_export.cc index da18ceb3cb..8b56271e42 100644 --- a/libs/ardour/session_export.cc +++ b/libs/ardour/session_export.cc @@ -17,7 +17,6 @@ */ -#include #include "pbd/error.h" #include @@ -92,8 +91,8 @@ Session::pre_export () _exporting = true; export_status->running = true; - export_status->Aborting.connect (sigc::hide_return (sigc::mem_fun (*this, &Session::stop_audio_export))); - export_status->Finished.connect (sigc::hide_return (sigc::mem_fun (*this, &Session::finalize_audio_export))); + scoped_connect (export_status->Aborting, boost::bind (&Session::stop_audio_export, this)); + scoped_connect (export_status->Finished, boost::bind (&Session::finalize_audio_export, this)); return 0; } @@ -151,7 +150,7 @@ Session::start_audio_export (nframes_t position, bool realtime) last_process_function = process_function; process_function = &Session::process_export; } else { - export_freewheel_connection = _engine.Freewheel.connect (sigc::mem_fun (*this, &Session::process_export_fw)); + export_freewheel_connection = _engine.Freewheel.connect (boost::bind (&Session::process_export_fw, this, _1)); return _engine.freewheel (true); } @@ -180,7 +179,7 @@ Session::process_export (nframes_t nframes) process_without_events (nframes); - /* handle export */ + /* handle export - XXX what about error handling? */ ProcessExport (nframes); @@ -236,8 +235,11 @@ Session::finalize_audio_export () /* Clean up */ - ProcessExport.clear(); - ExportReadFinished.clear(); + /* BOOST SIGNAL are these necessary? + ProcessExport.clear(); + ExportReadFinished.clear(); + */ + export_freewheel_connection.disconnect(); export_handler.reset(); export_status.reset(); -- cgit v1.2.3