Skip to content

Commit

Permalink
envelope points: restore H2Core::Object inheritance
Browse files Browse the repository at this point in the history
  • Loading branch information
charbeljc committed Jul 15, 2021
1 parent 962fba5 commit 98ebd8f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/core/Basics/Sample.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
namespace H2Core
{

const char* EnvelopePoint::__class_name = "EnvelopePoint";
const char* Sample::__class_name = "Sample";

const std::vector<QString> Sample::__loop_modes = { "forward", "reverse", "pingpong" };
Expand All @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion src/core/Basics/Sample.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 98ebd8f

Please sign in to comment.