Move file suffixes out of the Session class and into filename_extensions.h/cc
[ardour.git] / libs / ardour / ardour / audioengine.h
index 7274f5646e451e4153222bf89ca1504d328f0a76..fca3c2df9aa684aedb7167c7d0c7b21be94e279d 100644 (file)
@@ -15,7 +15,6 @@
     along with this program; if not, write to the Free Software
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
-    $Id$
 */
 
 #ifndef __ardour_audioengine_h__
@@ -47,12 +46,16 @@ class Port;
 class AudioEngine : public sigc::trackable
 {
    public:
+       typedef std::set<Port*> Ports;
+
        AudioEngine (std::string client_name);
        virtual ~AudioEngine ();
        
        jack_client_t* jack() const { return _jack; }
        bool connected() const { return _jack != 0; }
 
+       bool is_realtime () const;
+
        std::string client_name() const { return jack_client_name; }
 
        int reconnect_to_jack ();
@@ -112,11 +115,11 @@ class AudioEngine : public sigc::trackable
 
        Port *register_input_port (DataType type, const std::string& portname);
        Port *register_output_port (DataType type, const std::string& portname);
-       int   unregister_port (Port *);
+       int   unregister_port (Port &);
        
        int connect (const std::string& source, const std::string& destination);
        int disconnect (const std::string& source, const std::string& destination);
-       int disconnect (Port *);
+       int disconnect (Port &);
        
        const char ** get_ports (const std::string& port_name_pattern, const std::string& type_name_pattern, uint32_t flags);
 
@@ -126,21 +129,19 @@ class AudioEngine : public sigc::trackable
        void get_physical_outputs (std::vector<std::string>&);
        void get_physical_inputs (std::vector<std::string>&);
 
-       std::string get_nth_physical_output (uint32_t n) {
-               return get_nth_physical (n, JackPortIsInput);
+       std::string get_nth_physical_output (DataType type, uint32_t n) {
+               return get_nth_physical (type, n, JackPortIsInput);
        }
 
-       std::string get_nth_physical_input (uint32_t n) {
-               return get_nth_physical (n, JackPortIsOutput);
+       std::string get_nth_physical_input (DataType type, uint32_t n) {
+               return get_nth_physical (type, n, JackPortIsOutput);
        }
 
        nframes_t get_port_total_latency (const Port&);
        void update_total_latencies ();
 
-       /* the caller may not delete the object pointed to by 
-          the return value
+       /** Caller may not delete the object pointed to by the return value
        */
-
        Port *get_port_by_name (const std::string& name, bool keep = true);
 
        enum TransportState {
@@ -193,27 +194,28 @@ class AudioEngine : public sigc::trackable
        std::string make_port_name_non_relative (std::string);
 
   private:
-       ARDOUR::Session      *session;
-       jack_client_t       *_jack;
-       std::string           jack_client_name;
-       Glib::Mutex           _process_lock;
-       Glib::Mutex           session_remove_lock;
-    Glib::Cond            session_removed;
-       bool                  session_remove_pending;
-       bool                 _running;
-       bool                 _has_run;
-       nframes_t       _buffer_size;
-       nframes_t       _frame_rate;
-       nframes_t        monitor_check_interval;
-       nframes_t        last_monitor_check;
-       nframes_t       _processed_frames;
-       bool                 _freewheeling;
-       bool                 _freewheel_thread_registered;
-       sigc::slot<int,nframes_t>  freewheel_action;
-       bool                  reconnect_on_halt;
-       int                  _usecs_per_cycle;
+       ARDOUR::Session *session;
+       jack_client_t *_jack;
+       std::string jack_client_name;
+       Glib::Mutex _process_lock;
+       Glib::Cond session_removed;
+       bool session_remove_pending;
+       bool _running;
+       bool _has_run;
+       nframes_t _buffer_size;
+       nframes_t _frame_rate;
+       /// number of frames between each check for changes in monitor input
+       nframes_t monitor_check_interval;
+       /// time of the last monitor check in frames
+       nframes_t last_monitor_check;
+       /// the number of frames processed since start() was called
+       nframes_t _processed_frames;
+       bool _freewheeling;
+       bool _freewheel_thread_registered;
+       sigc::slot<int,nframes_t> freewheel_action;
+       bool reconnect_on_halt;
+       int _usecs_per_cycle;
 
-       typedef std::set<Port*> Ports;
        SerializedRCUManager<Ports> ports;
 
        int    process_callback (nframes_t nframes);
@@ -223,9 +225,9 @@ class AudioEngine : public sigc::trackable
        typedef std::list<PortConnection> PortConnections;
 
        PortConnections port_connections;
-       void   remove_connections_for (Port*);
+       void   remove_connections_for (Port&);
 
-       std::string get_nth_physical (uint32_t which, int flags);
+       std::string get_nth_physical (DataType type, uint32_t n, int flags);
 
        static int  _xrun_callback (void *arg);
        static int  _graph_order_callback (void *arg);