PluginInfo::type added to copy constructor. But why is the copy constructor defined...
[ardour.git] / libs / ardour / utils.cc
index 45d77f46a516244fde259a559c9c092ee7815941..98b51cb5786be34d9922d65ef1ea4a724c69d9ac 100644 (file)
@@ -94,7 +94,7 @@ legalize_for_path (ustring str)
        ustring::size_type pos;
        ustring legal_chars = "abcdefghijklmnopqrtsuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_+=: ";
        ustring legal;
-
+       
        legal = str;
        pos = 0;
 
@@ -340,7 +340,7 @@ compute_equal_power_fades (nframes_t nframes, float* in, float* out)
 {
        double step;
 
-       step = 1.0/nframes;
+       step = 1.0/(nframes-1);
 
        in[0] = 0.0f;
        
@@ -582,6 +582,14 @@ ARDOUR::auto_style_to_string (AutoStyle as)
        return "";
 }
 
+bool
+string_is_affirmative (const std::string& str)
+{
+       /* to be used only with XML data - not intended to handle user input */
+
+       return str == "1" || str == "y" || str == "Y" || (!g_strncasecmp(str.c_str(), "yes", str.length()));
+}
+
 extern "C" {
        void c_stacktrace() { stacktrace (cerr); }
 }