Merge pull request #113 from vuki/modframes

Allow deriving classes from StkFrames
This commit is contained in:
garyscavone
2021-03-24 09:39:35 -04:00
committed by GitHub

View File

@@ -286,13 +286,13 @@ public:
StkFrames( const StkFloat& value, unsigned int nFrames, unsigned int nChannels ); StkFrames( const StkFloat& value, unsigned int nFrames, unsigned int nChannels );
//! The destructor. //! The destructor.
~StkFrames(); virtual ~StkFrames();
// A copy constructor. // A copy constructor.
StkFrames( const StkFrames& f ); StkFrames( const StkFrames& f );
// Assignment operator that returns a reference to self. // Assignment operator that returns a reference to self.
StkFrames& operator= ( const StkFrames& f ); virtual StkFrames& operator= ( const StkFrames& f );
//! Subscript operator that returns a reference to element \c n of self. //! Subscript operator that returns a reference to element \c n of self.
/*! /*!
@@ -384,7 +384,7 @@ public:
size. Further, no new memory is allocated when the new size is size. Further, no new memory is allocated when the new size is
smaller or equal to a previously allocated size. smaller or equal to a previously allocated size.
*/ */
void resize( size_t nFrames, unsigned int nChannels = 1 ); virtual void resize( size_t nFrames, unsigned int nChannels = 1 );
//! Resize self to represent the specified number of channels and frames and perform element initialization. //! Resize self to represent the specified number of channels and frames and perform element initialization.
/*! /*!
@@ -394,7 +394,7 @@ public:
size. Further, no new memory is allocated when the new size is size. Further, no new memory is allocated when the new size is
smaller or equal to a previously allocated size. smaller or equal to a previously allocated size.
*/ */
void resize( size_t nFrames, unsigned int nChannels, StkFloat value ); virtual void resize( size_t nFrames, unsigned int nChannels, StkFloat value );
//! Retrieves a single channel //! Retrieves a single channel
/*! /*!
@@ -432,7 +432,7 @@ public:
*/ */
StkFloat dataRate( void ) const { return dataRate_; }; StkFloat dataRate( void ) const { return dataRate_; };
private: protected:
StkFloat *data_; StkFloat *data_;
StkFloat dataRate_; StkFloat dataRate_;