Make import GUI report if you are importing a file of a name that
[ardour.git] / libs / ardour / ardour / audioengine.h
index 7f42aff40cfade02a2a0dc84e28a9b7605d889ca..3329a036e428b5cbb86393c8ae58eb412f363dd2 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__
@@ -53,6 +52,8 @@ class AudioEngine : public sigc::trackable
        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 ();
@@ -61,7 +62,7 @@ class AudioEngine : public sigc::trackable
        bool will_reconnect_at_halt ();
        void set_reconnect_at_halt (bool);
 
-       int stop ();
+       int stop (bool forever = false);
        int start ();
        bool running() const { return _running; }
 
@@ -102,7 +103,13 @@ class AudioEngine : public sigc::trackable
 
        class PortRegistrationFailure : public std::exception {
          public:
-               virtual const char *what() const throw() { return "failed port registration"; }
+               PortRegistrationFailure (const char* why) {
+                       reason = why;
+               }
+               virtual const char *what() const throw() { return reason; }
+
+         private:
+               const char* reason;
        };
 
        class NoBackendAvailable : public std::exception {
@@ -120,18 +127,18 @@ class AudioEngine : public sigc::trackable
        
        const char ** get_ports (const std::string& port_name_pattern, const std::string& type_name_pattern, uint32_t flags);
 
-       uint32_t n_physical_outputs () const;
-       uint32_t n_physical_inputs () const;
+       uint32_t n_physical_audio_outputs () const;
+       uint32_t n_physical_audio_inputs () const;
 
-       void get_physical_outputs (std::vector<std::string>&);
-       void get_physical_inputs (std::vector<std::string>&);
+       void get_physical_audio_outputs (std::vector<std::string>&);
+       void get_physical_audio_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_audio_output (uint32_t n) {
+               return get_nth_physical_audio (n, JackPortIsInput);
        }
 
-       std::string get_nth_physical_input (uint32_t n) {
-               return get_nth_physical (n, JackPortIsOutput);
+       std::string get_nth_physical_audio_input (uint32_t n) {
+               return get_nth_physical_audio (n, JackPortIsOutput);
        }
 
        nframes_t get_port_total_latency (const Port&);
@@ -197,8 +204,7 @@ class AudioEngine : public sigc::trackable
        jack_client_t       *_jack;
        std::string           jack_client_name;
        Glib::Mutex           _process_lock;
-       Glib::Mutex           session_remove_lock;
-    Glib::Cond            session_removed;
+       Glib::Cond            session_removed;
        bool                  session_remove_pending;
        bool                 _running;
        bool                 _has_run;
@@ -225,7 +231,9 @@ class AudioEngine : public sigc::trackable
        PortConnections port_connections;
        void   remove_connections_for (Port*);
 
-       std::string get_nth_physical (uint32_t which, int flags);
+       std::string get_nth_physical_audio (uint32_t which, int flags);
+
+       void port_registration_failure (const std::string& portname);
 
        static int  _xrun_callback (void *arg);
        static int  _graph_order_callback (void *arg);