add clear() to abstract Instrumnt.h

This simplies code which uses different instruments.
This commit is contained in:
Graham Percival
2014-04-14 16:19:15 +08:00
parent 3ad1a59585
commit a0638ad024

View File

@@ -22,6 +22,12 @@ class Instrmnt : public Stk
//! Class constructor.
Instrmnt( void ) { lastFrame_.resize( 1, 1, 0.0 ); };
//! Reset and clear all internal state (for subclasses).
/*!
Not all subclasses implement a clear() function.
*/
virtual void clear( void ) {};
//! Start a note with the given frequency and amplitude.
virtual void noteOn( StkFloat frequency, StkFloat amplitude ) = 0;