// // Programmer: Craig Stuart Sapp // Creation Date: Sun Apr 27 00:51:22 GMT-0800 1997 // Last Modified: Sun Apr 27 00:51:22 GMT-0800 1997 // Filename: ...sig/maint/code/Filter/DelayLine/Delay.h // Web Address: http://sig.sapp.org/include/sig/Delay.h // Documentation: http://sig.sapp.org/doc/classes/Delay // Syntax: C++ // #ifndef _DELAY_H_INCLUDED #define _DELAY_H_INCLUDED #include "sigTypes.h" typedef unsigned long ulong; class Delay { public: Delay (int size = 1); ~Delay (); ulong getSize (void); sampleType& operator[] (long readIndex); sampleType& operator[] (int readIndex); sampleType operator[] (float readIndex); sampleType operator[] (double readIndex); void setSize (long size); void write (sampleType sample); void zero (void); protected: ulong allocSize; ulong writeIndex; sampleType* array; ulong indexMask; ulong nextPowerOfTwo (ulong num); sampleType& read (long index); sampleType read (float index); }; #endif /* _DELAY_H_INCLUDED */ // md5sum: 25ae645ff0cbe410cc103f5e8d2fa6da Delay.h [20010708]