]> git.sesse.net Git - casparcg/blobdiff - core/frame/frame_transform.cpp
2.1.0: -ffmpeg_producer: Removed "audio_resampler" in favor of "swresample" API....
[casparcg] / core / frame / frame_transform.cpp
index c08521240528ef3614ea8a375f7d0a7929eebd0a..5ebac4740a878dd1c4c5134a746c53696f831f82 100644 (file)
@@ -141,12 +141,14 @@ bool operator!=(const image_transform& lhs, const image_transform& rhs)
                \r
 audio_transform::audio_transform() \r
        : volume(1.0)\r
+       , is_still(false)\r
 {\r
 }\r
 \r
 audio_transform& audio_transform::operator*=(const audio_transform &other)\r
 {\r
-       volume                                  *= other.volume;        \r
+       volume   *= other.volume;       \r
+       is_still |= other.is_still;\r
        return *this;\r
 }\r
 \r
@@ -163,6 +165,7 @@ audio_transform audio_transform::tween(double time, const audio_transform& sourc
        };\r
        \r
        audio_transform result; \r
+       result.is_still                 = source.is_still | dest.is_still;\r
        result.volume                   = do_tween(time, source.volume,                         dest.volume,                    duration, tween);\r
        \r
        return result;\r
@@ -175,7 +178,7 @@ bool operator==(const audio_transform& lhs, const audio_transform& rhs)
                return std::abs(lhs - rhs) < 5e-8;\r
        };\r
 \r
-       return eq(lhs.volume, rhs.volume);\r
+       return eq(lhs.volume, rhs.volume) && lhs.is_still == rhs.is_still;\r
 }\r
 \r
 bool operator!=(const audio_transform& lhs, const audio_transform& rhs)\r