diff options
Diffstat (limited to 'core/math/audio_frame.h')
-rw-r--r-- | core/math/audio_frame.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/core/math/audio_frame.h b/core/math/audio_frame.h index 5ccc9d9e5e..d54f622197 100644 --- a/core/math/audio_frame.h +++ b/core/math/audio_frame.h @@ -102,6 +102,16 @@ struct AudioFrame { r = ::undenormalise(r); } + _FORCE_INLINE_ AudioFrame linear_interpolate(const AudioFrame &p_b, float p_t) const { + + AudioFrame res = *this; + + res.l += (p_t * (p_b.l - l)); + res.r += (p_t * (p_b.r - r)); + + return res; + } + _ALWAYS_INLINE_ AudioFrame(float p_l, float p_r) { l = p_l; r = p_r; |