Credit Andrew - fix vorbis audio which was scratchy and ensure aging plugin does...
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / automation.h
index 47df6eca0859b63ee6f2dc2ebc2fcf7504522462..cae68d54a5afa281d0fa0009d1a81e18594bfaec 100644 (file)
@@ -2,6 +2,7 @@
 /*
  * CINELERRA
  * Copyright (C) 2008-2013 Adam Williams <broadcast at earthling dot net>
+ * Copyright (C) 2003-2016 Cinelerra CV contributors
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
                value = INFINITYGAIN;                                   \
        if (autogrouptype == AUTOGROUPTYPE_VIDEO_FADE)                  \
                CLAMP(value, 0, 100);                                   \
-       if (autogrouptype == AUTOGROUPTYPE_ZOOM && value < 0)           \
-               value = 0;                                              \
-       else if (autogrouptype == AUTOGROUPTYPE_SPEED && value < 0.001) \
-               value = 0.001;
+       if (autogrouptype == AUTOGROUPTYPE_ZOOM && value < ZOOM_MIN)    \
+               value = ZOOM_MIN;                                       \
+       else if (autogrouptype == AUTOGROUPTYPE_SPEED && value < SPEED_MIN) \
+               value = SPEED_MIN;
 
 #define AUTOMATIONVIEWCLAMPS(value, autogrouptype)                     \
        if (autogrouptype == AUTOGROUPTYPE_ZOOM && value < 0)           \
                value = 0;                                              \
-       else if (autogrouptype == AUTOGROUPTYPE_SPEED && value < 0)     \
-               value = 0;
+       else if (autogrouptype == AUTOGROUPTYPE_SPEED && value < SPEED_MIN)     \
+               value = SPEED_MIN;
 
 
 class Automation
@@ -62,7 +63,7 @@ public:
        Automation(EDL *edl, Track *track);
        virtual ~Automation();
 
-       int autogrouptype(int autoidx, Track *track);
+       static int autogrouptype(int type, Track *track);
        virtual void create_objects();
        void equivalent_output(Automation *automation, int64_t *result);
        virtual Automation& operator=(Automation& automation);