full compilation and linking (coding not finished, will not run)
[ardour.git] / libs / ardour / session_state.cc
index ff7da665ed00508238d990ca29bde17e28a69f61..cae3b9720acf7233030d13206066a4617a45de63 100644 (file)
 #include <unistd.h>
 #include <sys/stat.h>
 #include <climits>
+#include <fcntl.h>
+#include <poll.h>
 #include <signal.h>
+#include <sys/mman.h>
 #include <sys/time.h>
 
 #ifdef HAVE_SYS_VFS_H
 #include <sys/vfs.h>
+#else
+#include <sys/param.h>
+#include <sys/mount.h>
 #endif
 
 #ifdef HAVE_SYS_STATVFS_H
@@ -149,7 +155,7 @@ Session::first_stage_init (string fullpath, string snapshot_name)
 
        set_history_depth (Config->get_history_depth());
 
-       _current_frame_rate = _engine.frame_rate ();
+       _current_frame_rate = _engine.sample_rate ();
        _nominal_frame_rate = _current_frame_rate;
        _base_frame_rate = _current_frame_rate;
 
@@ -730,7 +736,15 @@ Session::jack_session_event (jack_session_event_t * event)
                 }
         }
 
-       jack_session_reply (_engine.jack(), event);
+       /* this won't be called if the port engine in use is not JACK, so we do 
+          not have to worry about the type of PortEngine::private_handle()
+       */
+
+       jack_client_t* jack_client = (jack_client_t*) AudioEngine::instance()->port_engine().private_handle();
+       
+       if (jack_client) {
+               jack_session_reply (jack_client, event);
+       }
 
        if (event->type == JackSessionSaveAndQuit) {
                Quit (); /* EMIT SIGNAL */