From a0638ad024841dad7069a5cee6aa649486731373 Mon Sep 17 00:00:00 2001 From: Graham Percival Date: Mon, 14 Apr 2014 16:19:15 +0800 Subject: [PATCH] add clear() to abstract Instrumnt.h This simplies code which uses different instruments. --- include/Instrmnt.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/Instrmnt.h b/include/Instrmnt.h index 8acb5a0..0317375 100644 --- a/include/Instrmnt.h +++ b/include/Instrmnt.h @@ -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;