tweaks to NO_PLUGIN_STATE logic
authorPaul Davis <paul@linuxaudiosystems.com>
Tue, 16 Jul 2013 00:04:37 +0000 (20:04 -0400)
committerPaul Davis <paul@linuxaudiosystems.com>
Thu, 8 Aug 2013 19:23:09 +0000 (15:23 -0400)
libs/ardour/plugin.cc
libs/ardour/route.cc

index e76353e8d53ddd3f2ca8b7b9bbc3c9c4e64ca895..9b2170c349e49bd362c461fa6200337e5261ecfd 100644 (file)
@@ -395,7 +395,7 @@ Plugin::get_state ()
        add_state (root);
 #else
        if (!seen_get_state_message) {
-               info << string_compose (_("Saving AudioUnit settings is not supported in this build of %1. Consider paying for a newer version"),
+               info << string_compose (_("Saving plugin settings is not supported in this build of %1. Consider paying for the full version"),
                                        PROGRAM_NAME)
                     << endmsg;
                seen_get_state_message = true;
index e87cb4b03fad3bb86e171c163445baa95df144a6..9d7dc8792b17ee7b5e9e4ad9614206eb2919b94f 100644 (file)
@@ -2558,21 +2558,25 @@ Route::set_processor_state (const XMLNode& node)
                                        continue;
                                }
 
-#ifndef NO_PLUGIN_STATE
-                               if (processor->set_state (**niter, Stateful::current_state_version) != 0) {
-                                       /* This processor could not be configured.  Turn it into a UnknownProcessor */
-                                       processor.reset (new UnknownProcessor (_session, **niter));
-                               }
-#else
                                if (boost::dynamic_pointer_cast<PluginInsert>(processor)) {     
+#ifndef NO_PLUGIN_STATE
                                        if (processor->set_state (**niter, Stateful::current_state_version) != 0) {
                                                /* This processor could not be configured.  Turn it into a UnknownProcessor */
                                                processor.reset (new UnknownProcessor (_session, **niter));
                                        }
+#else
+                                       /* plugin, with NO_PLUGIN_STATE defined
+                                        * =>::set_state() not allowed. Do not
+                                        * display a message here - things will
+                                        * get too verbose.
+                                        */
+#endif
                                } else {
-                                       /* plugin, but ::set_state() not * allowed no message here - things will get too verbose */
+                                       if (processor->set_state (**niter, Stateful::current_state_version) != 0) {
+                                               /* This processor could not be configured.  Turn it into a UnknownProcessor */
+                                               processor.reset (new UnknownProcessor (_session, **niter));
+                                       }
                                }
-#endif
 
                                /* we have to note the monitor send here, otherwise a new one will be created
                                   and the state of this one will be lost.