From 98ebd8fd5420b6755a1367a6f4f018ef3ca75477 Mon Sep 17 00:00:00 2001 From: Charbel Jacquin Date: Thu, 8 Jul 2021 19:41:54 +0200 Subject: [PATCH] envelope points: restore H2Core::Object inheritance --- src/core/Basics/Sample.cpp | 7 ++++--- src/core/Basics/Sample.h | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/core/Basics/Sample.cpp b/src/core/Basics/Sample.cpp index b7dd969d2..5e59212c9 100644 --- a/src/core/Basics/Sample.cpp +++ b/src/core/Basics/Sample.cpp @@ -39,6 +39,7 @@ namespace H2Core { +const char* EnvelopePoint::__class_name = "EnvelopePoint"; const char* Sample::__class_name = "Sample"; const std::vector Sample::__loop_modes = { "forward", "reverse", "pingpong" }; @@ -50,15 +51,15 @@ static RubberBand::RubberBandStretcher::Options compute_rubberband_options( cons /* EnvelopePoint */ -EnvelopePoint::EnvelopePoint() : frame( 0 ), value( 0 ) +EnvelopePoint::EnvelopePoint() : Object( __class_name ), frame( 0 ), value( 0 ) { } -EnvelopePoint::EnvelopePoint( int f, int v ) : frame( f ), value( v ) +EnvelopePoint::EnvelopePoint( int f, int v ) : Object ( __class_name), frame( f ), value( v ) { } -EnvelopePoint::EnvelopePoint( const EnvelopePoint & other ) +EnvelopePoint::EnvelopePoint( const EnvelopePoint& other ) : Object( __class_name ) { frame = other.frame; value = other.value; diff --git a/src/core/Basics/Sample.h b/src/core/Basics/Sample.h index c6bad4d75..8470ecc6c 100644 --- a/src/core/Basics/Sample.h +++ b/src/core/Basics/Sample.h @@ -37,8 +37,9 @@ namespace H2Core */ /** an envelope point within a frame */ -class EnvelopePoint +class EnvelopePoint: H2Core::Object { + H2_OBJECT public: int frame; ///< frame index int value; ///< value