1 #ifndef _session_utils_common_h_
2 #define _session_utils_common_h_
4 #include "pbd/transmitter.h"
5 #include "pbd/receiver.h"
7 #include "ardour/ardour.h"
8 #include "ardour/session.h"
10 class TestReceiver : public Receiver
13 void receive (Transmitter::Channel chn, const char * str);
16 namespace SessionUtils {
18 /** initialize libardour */
19 void init (bool print_log = true);
21 /** clean up, stop Processing Engine
22 * @param s Session to close (may me NULL)
26 /** @param dir Session directory.
27 * @param state Session state file, without .ardour suffix.
28 * @returns an ardour session object (free with \ref unload_session) or NULL
30 ARDOUR::Session* load_session (std::string dir, std::string state, bool exit_at_failure = true);
32 /** @param dir Session directory.
33 * @param state Session state file, without .ardour suffix.
34 * @returns an ardour session object (free with \ref unload_session) or NULL on error
36 ARDOUR::Session* create_session (std::string dir, std::string state, float sample_rate);
38 /** close session and stop engine
39 * @param s Session to close (may me NULL)
41 void unload_session (ARDOUR::Session *s);
45 #endif /* _session_utils_misc_h_ */