Now that notify_length_changed() just calls
[ardour.git] / libs / ardour / ardour / session.h
index ad42ee768ba15852b6b512a735a19cebb9ebaa93..2ef4960b8ef15aa4a7179bbbe2060a14bb69ecce 100644 (file)
@@ -56,6 +56,7 @@
 #include "ardour/session_event.h"
 #include "ardour/location.h"
 #include "ardour/interpolation.h"
+#include "ardour/route_graph.h"
 
 #ifdef HAVE_JACK_SESSION
 #include <jack/session.h>
@@ -63,7 +64,8 @@
 
 class XMLTree;
 class XMLNode;
-class AEffect;
+struct _AEffect;
+typedef struct _AEffect AEffect;
 
 namespace MIDI {
        class Port;
@@ -126,7 +128,7 @@ class Source;
 class Speakers;
 class TempoMap;
 class Track;
-class VSTPlugin;
+class WindowsVSTPlugin;
 
 extern void setup_enum_writer ();
 
@@ -236,10 +238,12 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
        template<class T> void foreach_route (T *obj, void (T::*func)(boost::shared_ptr<Route>));
        template<class T, class A> void foreach_route (T *obj, void (T::*func)(Route&, A), A arg);
 
+       static char session_name_is_legal (const std::string&);
        bool io_name_is_legal (const std::string&);
        boost::shared_ptr<Route> route_by_name (std::string);
        boost::shared_ptr<Route> route_by_id (PBD::ID);
        boost::shared_ptr<Route> route_by_remote_id (uint32_t id);
+       boost::shared_ptr<Track> track_by_diskstream_id (PBD::ID);
        void routes_using_input_from (const std::string& str, RouteList& rl);
 
        bool route_name_unique (std::string) const;
@@ -386,9 +390,6 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
        void remove_pending_capture_state ();
        int rename (const std::string&);
 
-       static int rename_template (std::string old_name, std::string new_name);
-       static int delete_template (std::string name);
-
        PBD::Signal1<void,std::string> StateSaved;
        PBD::Signal0<void> StateReady;
 
@@ -738,22 +739,15 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
 
        /* VST support */
 
-       static long vst_callback (AEffect* effect,
-                       long opcode,
-                       long index,
-                       long value,
-                       void* ptr,
-                       float opt);
+       static intptr_t vst_callback (
+               AEffect* effect,
+               int32_t opcode,
+               int32_t index,
+               intptr_t value,
+               void* ptr,
+               float opt
+               );
                        
-       /*Native linuxVST support*/
-       
-       static intptr_t lxvst_callback (AEffect* effect,
-                                 int32_t opcode,
-                                 int32_t index,
-                                 intptr_t value,
-                                 void* ptr,
-                                 float opt);
-
        static PBD::Signal0<void> SendFeedback;
 
        /* Speakers */
@@ -826,6 +820,17 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
 
        std::list<std::string> unknown_processors () const;
 
+       /** Emitted when a feedback cycle has been detected within Ardour's signal
+           processing path.  Until it is fixed (by the user) some (unspecified)
+           routes will not be run.
+       */
+       static PBD::Signal0<void> FeedbackDetected;
+
+       /** Emitted when a graph sort has successfully completed, which means
+           that it has no feedback cycles.
+       */
+       static PBD::Signal0<void> SuccessfulGraphSort;
+
        /* handlers can return an integer value:
           0: config.set_audio_search_path() or config.set_midi_search_path() was used
           to modify the search path and we should try to find it again.
@@ -1206,7 +1211,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
 
        /* routes stuff */
 
-       boost::shared_ptr<Graph> route_graph;
+       boost::shared_ptr<Graph> _process_graph;
 
        SerializedRCUManager<RouteList>  routes;
 
@@ -1351,8 +1356,6 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
        XMLNode* _bundle_xml_node;
        int load_bundles (XMLNode const &);
 
-       void reverse_track_buffers ();
-
        UndoHistory      _history;
        /** current undo transaction, or 0 */
        UndoTransaction* _current_trans;
@@ -1408,14 +1411,16 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
        boost::shared_ptr<Route> _master_out;
        boost::shared_ptr<Route> _monitor_out;
 
-       /* VST support */
+       /* Windows VST support */
 
-       long _vst_callback (VSTPlugin*,
-                       long opcode,
-                       long index,
-                       long value,
-                       void* ptr,
-                       float opt);
+       long _windows_vst_callback (
+               WindowsVSTPlugin*,
+               long opcode,
+               long index,
+               long value,
+               void* ptr,
+               float opt
+               );
 
        /* number of hardware ports we're using,
           based on max (requested,available)
@@ -1500,6 +1505,11 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
 
        boost::shared_ptr<Speakers> _speakers;
        void load_nested_sources (const XMLNode& node);
+
+       /** The directed graph of routes that is currently being used for audio processing
+           and solo/mute computations.
+       */
+       GraphEdges _current_route_graph;
 };
 
 } // namespace ARDOUR